Patchwork D3141: mq: avoid a silly conversion from binary nodeid to hex

login
register
mail settings
Submitter phabricator
Date April 5, 2018, 7:17 p.m.
Message ID <differential-rev-PHID-DREV-neaf5nis3y7zzxjpderb-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/30399/
State Superseded
Headers show

Comments

phabricator - April 5, 2018, 7:17 p.m.
martinvonz created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  We generally deal with binary nodeids in code. In this case the hex
  nodeid was passed to strip.checksubstate() where it was passed to
  repo.__getitem__, which of course accepts a binary nodeid.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  hgext/mq.py

CHANGE DETAILS




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

Patch

diff --git a/hgext/mq.py b/hgext/mq.py
--- a/hgext/mq.py
+++ b/hgext/mq.py
@@ -1664,7 +1664,7 @@ 
             cparents = repo.changelog.parents(top)
             patchparent = self.qparents(repo, top)
 
-            inclsubs = checksubstate(repo, hex(patchparent))
+            inclsubs = checksubstate(repo, patchparent)
             if inclsubs:
                 substatestate = repo.dirstate['.hgsubstate']