Source

thg-qt-mq / 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()