diff mercurial/commands.py @ 27173:8a8f5d71a49a

graft: improve --continue abort message before, if you ran hg graft --user ... --date ... --log ... revs, and if it failed, it would suggest "hg graft --continue", but if you did that, your --user / --date / --log options were lost, because they were not persisted anywhere...
author timeless <timeless@mozdev.org>
date Wed, 02 Dec 2015 06:33:52 +0000
parents 4d61c847e06c
children 54ace3372f84
line wrap: on
line diff
--- a/mercurial/commands.py	Wed Dec 02 06:31:12 2015 +0000
+++ b/mercurial/commands.py	Wed Dec 02 06:33:52 2015 +0000
@@ -3867,9 +3867,17 @@
                     # write out state for --continue
                     nodelines = [repo[rev].hex() + "\n" for rev in revs[pos:]]
                     repo.vfs.write('graftstate', ''.join(nodelines))
+                    extra = ''
+                    if opts.get('user'):
+                        extra += ' --user %s' % opts['user']
+                    if opts.get('date'):
+                        extra += ' --date %s' % opts['date']
+                    if opts.get('log'):
+                        extra += ' --log'
+                    hint=_('use hg resolve and hg graft --continue%s') % extra
                     raise error.Abort(
                         _("unresolved conflicts, can't continue"),
-                        hint=_('use hg resolve and hg graft --continue'))
+                        hint=hint)
             else:
                 cont = False