diff hgsubversion/wrappers.py @ 1045:67e11b650e94

handle invalid UTF-8 in commit messages consistently 312f36a425f0 fixed this for replay, but not for stupid mode; we address this by consolidating our means of generating a Mercurial commit message in a single function in 'util.py'.
author Dan Villiom Podlaski Christiansen <dan@cabo.dk>
date Thu, 08 Aug 2013 09:38:55 +0200
parents ada2400241c4
children fb0715c9347d
line wrap: on
line diff
--- a/hgsubversion/wrappers.py
+++ b/hgsubversion/wrappers.py
@@ -403,12 +403,8 @@ def pull(repo, source, heads=[], force=F
                 converted = False
                 while not converted:
                     try:
-                        msg = ''
-                        if r.message:
-                            msg = r.message.strip()
-                        if not msg:
-                            msg = util.default_commit_msg(ui)
-                        else:
+                        msg = util.getmessage(ui, r).strip()
+                        if msg:
                             msg = [s.strip() for s in msg.splitlines() if s][0]
                         if getattr(ui, 'termwidth', False):
                             w = ui.termwidth()