D3657: graft: store user passed date and user information in graftstate

pulkit (Pulkit Goyal) phabricator at mercurial-scm.org
Fri May 25 17:14:17 EDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rHG63553c2bef7e: graft: store user passed date and user information in graftstate (authored by pulkit, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D3657?vs=8897&id=8902

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

AFFECTED FILES
  mercurial/commands.py

CHANGE DETAILS

diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -2207,6 +2207,8 @@
 
     revs = list(revs)
     revs.extend(opts.get('rev'))
+    # a dict of data to be stored in state file
+    statedata = {}
 
     if not opts.get('user') and opts.get('currentuser'):
         opts['user'] = ui.username()
@@ -2330,9 +2332,11 @@
         user = ctx.user()
         if opts.get('user'):
             user = opts['user']
+            statedata['user'] = user
         date = ctx.date()
         if opts.get('date'):
             date = opts['date']
+            statedata['date'] = date
         message = ctx.description()
         if opts.get('log'):
             message += '\n(grafted from %s)' % ctx.hex()
@@ -2352,7 +2356,7 @@
             if stats.unresolvedcount > 0:
                 # write out state for --continue
                 nodes = [repo[rev].hex() for rev in revs[pos:]]
-                statedata = {'nodes': nodes}
+                statedata['nodes'] = nodes
                 stateversion = 1
                 graftstate.save(stateversion, statedata)
                 extra = ''



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


More information about the Mercurial-devel mailing list