Patchwork D3662: graft: reuse the --log value passed initially in `hg graft --continue` (BC)

login
register
mail settings
Submitter phabricator
Date June 5, 2018, 12:03 p.m.
Message ID <c09ae1260fc2969cb256dfefec490194@localhost.localdomain>
Download mbox | patch
Permalink /patch/31980/
State Not Applicable
Headers show

Comments

phabricator - June 5, 2018, 12:03 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG2b8c8b8d1a06: graft: reuse the --log value passed initially in `hg graft --continue` (BC) (authored by pulkit, committed by ).

CHANGED PRIOR TO COMMIT
  https://phab.mercurial-scm.org/D3662?vs=8907&id=8985#toc

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D3662?vs=8907&id=8985

REVISION DETAIL
  https://phab.mercurial-scm.org/D3662

AFFECTED FILES
  mercurial/commands.py
  tests/test-graft.t

CHANGE DETAILS




To: pulkit, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/tests/test-graft.t b/tests/test-graft.t
--- a/tests/test-graft.t
+++ b/tests/test-graft.t
@@ -213,7 +213,7 @@ 
   my e@1905859650ec+ other e@9c233e8e184d ancestor e@4c60f11aa304
   warning: conflicts while merging e! (edit, then use 'hg resolve --mark')
   abort: unresolved conflicts, can't continue
-  (use 'hg resolve' and 'hg graft --continue --log')
+  (use 'hg resolve' and 'hg graft --continue')
   [255]
 
 Summary should mention graft:
@@ -1545,7 +1545,7 @@ 
   merging b
   warning: conflicts while merging b! (edit, then use 'hg resolve --mark')
   abort: unresolved conflicts, can't continue
-  (use 'hg resolve' and 'hg graft --continue --log')
+  (use 'hg resolve' and 'hg graft --continue')
   [255]
 
   $ echo foobar > b
@@ -1558,10 +1558,10 @@ 
   grafting 2:8be98ac1a569 "added c"
 
   $ hg log -GT "{rev}:{node|short} {desc}" -r '.^^::.'
-  @  11:7ee8d3496b19 added c
-  |
-  o  10:802f1eae3af3 added b
-  |
+  @  11:30c1050a58b2 added c
+  |  (grafted from 8be98ac1a56990c2d9ca6861041b8390af7bd6f3)
+  o  10:ec7eda2313e2 added b
+  |  (grafted from 80e6d2c47cfe5b3185519568327a17a061c7efb6)
   o  3:9e887f7a939c bar to b
   |
   ~
diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -2230,6 +2230,8 @@ 
                 opts['date'] = statedata['date']
             if statedata.get('user'):
                 opts['user'] = statedata['user']
+            if statedata.get('log'):
+                opts['log'] = True
             nodes = statedata['nodes']
             revs = [repo[node].rev() for node in nodes]
         else:
@@ -2344,6 +2346,7 @@ 
         message = ctx.description()
         if opts.get('log'):
             message += '\n(grafted from %s)' % ctx.hex()
+            statedata['log'] = True
 
         # we don't merge the first commit when continuing
         if not cont:
@@ -2363,10 +2366,7 @@ 
                 statedata['nodes'] = nodes
                 stateversion = 1
                 graftstate.save(stateversion, statedata)
-                extra = ''
-                if opts.get('log'):
-                    extra += ' --log'
-                hint=_("use 'hg resolve' and 'hg graft --continue%s'") % extra
+                hint = _("use 'hg resolve' and 'hg graft --continue'")
                 raise error.Abort(
                     _("unresolved conflicts, can't continue"),
                     hint=hint)