1. Steve Test
  2. My test repo


Yuya Nishihara  committed 41f14e3

chunks: use regexp to capture .rej filename from non-English message

If "saving rejects to file %s" is translated, it does not always end with

  • Participants
  • Parent commits c04997b
  • Branches stable

Comments (0)

Files changed (1)

File tortoisehg/hgqt/chunks.py

View file
 # of the GNU General Public License, incorporated herein by reference.
 import cStringIO
-import os
+import os, re
 from mercurial import hg, util, patch, commands, cmdutil
 from mercurial import match as matchmod, ui as uimod
         except (patch.PatchError, EnvironmentError), err:
             ok = False
+        rejfilere = re.compile(r'\b%s\.rej\b' % re.escape(wfile))
         for line in ui.popbuffer().splitlines():
-            if line.endswith(wfile + '.rej'):
+            if rejfilere.search(line):
                 if qtlib.QuestionMsgBox(_('Manually resolve rejected chunks?'),
                                         hglib.tounicode(line) + u'<br><br>' +
                                         _('Edit patched file and rejects?'),