changeset 47429:5c49e0aa7fad

dog-raft: keep opts dict str-keyed a bit longer Differential Revision: https://phab.mercurial-scm.org/D10860
author Martin von Zweigbergk <martinvonz@google.com>
date Thu, 10 Jun 2021 14:36:26 -0700
parents 54849b65dc5f
children 3ee036c6f834
files mercurial/commands.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/commands.py	Thu Jun 10 14:25:16 2021 -0700
+++ b/mercurial/commands.py	Thu Jun 10 14:36:26 2021 -0700
@@ -3088,8 +3088,7 @@
 
 
 def _dograft(ui, repo, *revs, **opts):
-    opts = pycompat.byteskwargs(opts)
-    if revs and opts.get(b'rev'):
+    if revs and opts.get('rev'):
         ui.warn(
             _(
                 b'warning: inconsistent use of --rev might give unexpected '
@@ -3098,12 +3097,13 @@
         )
 
     revs = list(revs)
-    revs.extend(opts.get(b'rev'))
+    revs.extend(opts.get('rev'))
     # a dict of data to be stored in state file
     statedata = {}
     # list of new nodes created by ongoing graft
     statedata[b'newnodes'] = []
 
+    opts = pycompat.byteskwargs(opts)
     cmdutil.resolvecommitoptions(ui, opts)
 
     editor = cmdutil.getcommiteditor(