Commits

Yuya Nishihara committed 8c28413

remove deprecated

Comments (0)

Files changed (4)

lossless-commit.diff

-# HG changeset patch
-# Parent 52f06c48d94467081827cfe053787b652d38ace9
-diff --git a/tortoisehg/hgqt/commit.py b/tortoisehg/hgqt/commit.py
---- a/tortoisehg/hgqt/commit.py
-+++ b/tortoisehg/hgqt/commit.py
-@@ -388,11 +388,7 @@ class CommitWidget(QWidget):
- 
-     def getMessage(self):
-         text = self.msgte.text()
--        try:
--            text = hglib.fromunicode(text, 'strict')
--        except UnicodeEncodeError:
--            pass # TODO
--        return text
-+        return hglib.fromunicode(text, 'replace')
- 
-     def msgSelected(self, message):
-         if self.msgte.text() and self.msgte.isModified():
-@@ -600,7 +596,7 @@ class CommitWidget(QWidget):
-             self.showMessage.emit(err)
-             dcmd = []
-         cmdline = ['commit', '--repository', repo.root, '--verbose',
--                   '--user', user, '--message='+msg]
-+                   '--user', user, '--message', msg]
-         cmdline += dcmd + brcmd + [repo.wjoin(f) for f in files]
-         for fname in self.opts.get('autoinc', '').split(','):
-             fname = fname.strip()

losslesslocalstr-more.diff

-# HG changeset patch
-# Parent 3b25fe7eca71fc7e9e9a604011b6dbcb5f6b7fc7
-
-diff --git a/tortoisehg/util/hglib.py b/tortoisehg/util/hglib.py
---- a/tortoisehg/util/hglib.py
-+++ b/tortoisehg/util/hglib.py
-@@ -64,7 +64,8 @@ def fromunicode(s, errors='strict'):
-         except UnicodeEncodeError:
-             pass
- 
--    return s.encode(_encoding, errors)  # last ditch
-+    # XXX Matt comments this case "can't round-trip", at encoding.tolocal()
-+    return encoding.localstr(s.encode('utf-8'), s.encode(_encoding, errors))
- 
- def toutf(s):
-     """

losslesslocalstr.diff

-# HG changeset patch
-# Parent 8f1b91111b43da784f44e05c81725fd407ebae0f
-diff --git a/tests/hglib_encoding_test.py b/tests/hglib_encoding_test.py
---- a/tests/hglib_encoding_test.py
-+++ b/tests/hglib_encoding_test.py
-@@ -69,7 +69,6 @@ def test_tounicode_fallback():
-     assert_equals(JAPANESE_KANA_I,
-                   hglib.tounicode(JAPANESE_KANA_I.encode('euc-jp')))
- 
--
- @with_encoding('euc-jp')
- def test_toutf():
-     assert_equals(JAPANESE_KANA_I.encode('utf-8'),
-diff --git a/tortoisehg/util/hglib.py b/tortoisehg/util/hglib.py
---- a/tortoisehg/util/hglib.py
-+++ b/tortoisehg/util/hglib.py
-@@ -46,6 +46,8 @@ def tounicode(s):
-         return None
-     if isinstance(s, unicode):
-         return s
-+    if isinstance(s, encoding.localstr):
-+        return unicode(s._utf8, 'utf-8')
-     for e in ('utf-8', _encoding):
-         try:
-             return s.decode(e, 'strict')
-@@ -67,7 +69,7 @@ def fromunicode(s, errors='strict'):
-     s = unicode(s)  # s can be QtCore.QString
-     for enc in (_encoding, _fallbackencoding):
-         try:
--            return s.encode(enc)
-+            return encoding.localstr(s.encode('utf-8'), s.encode(enc))
-         except UnicodeEncodeError:
-             pass
- 
 workbench-hidestatusbar.diff
 init-complete.diff
 destroy-tasktab-on-switch.diff
-losslesslocalstr.diff
-losslesslocalstr-more.diff
-lossless-commit.diff
 stretch.diff
 annotate-wc.diff
 email-base.diff
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.