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

Comments (0)

Files changed (1)


 # 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
                 if qtlib.QuestionMsgBox(_('Manually resolve rejected chunks?'),
                                         hglib.tounicode(line) + u'<br><br>' +
                                         _('Edit patched file and rejects?'),