Patchwork D2157: py3: use string for "close" value in commit extras

login
register
mail settings
Submitter phabricator
Date Feb. 12, 2018, 2:36 a.m.
Message ID <differential-rev-PHID-DREV-xbqllan3gv27emklftb7-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/27633/
State Superseded
Headers show

Comments

phabricator - Feb. 12, 2018, 2:36 a.m.
indygreg created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  The extras dict on commits has string keys and values. Before this
  commit, we passed "close" as an integer, which Python 2 gladly
  coerced to a string during a %s formatting in the bowels of
  changelog.py.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  mercurial/commands.py

CHANGE DETAILS




To: indygreg, #hg-reviewers
Cc: mercurial-devel
phabricator - Feb. 12, 2018, 7:23 a.m.
pulkit accepted this revision.
pulkit added a comment.


  Maybe # skip-blame?

REPOSITORY
  rHG Mercurial

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

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

Patch

diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -1551,7 +1551,7 @@ 
 
     extra = {}
     if opts.get('close_branch'):
-        extra['close'] = 1
+        extra['close'] = '1'
 
         if not bheads:
             raise error.Abort(_('can only close branch heads'))