Patchwork D10860: dog-raft: keep opts dict str-keyed a bit longer

login
register
mail settings
Submitter phabricator
Date June 10, 2021, 11:22 p.m.
Message ID <differential-rev-PHID-DREV-7mayzgljgmnjc45dgdxj-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/49180/
State Superseded
Headers show

Comments

phabricator - June 10, 2021, 11:22 p.m.
martinvonz created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  mercurial/commands.py

CHANGE DETAILS




To: martinvonz, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -3071,8 +3071,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 '
@@ -3081,12 +3080,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(