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

login
register
mail settings
Submitter phabricator
Date May 25, 2018, 9:14 p.m.
Message ID <d6aa9163931308fe9a7ebc4074d1951f@localhost.localdomain>
Download mbox | patch
Permalink /patch/31872/
State Not Applicable
Headers show

Comments

phabricator - May 25, 2018, 9:14 p.m.
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




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

Patch

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 = ''