Patchwork D3088: extdatasource: use repo.lookup() for converting to node

login
register
mail settings
Submitter phabricator
Date April 4, 2018, 10:54 p.m.
Message ID <differential-rev-PHID-DREV-dsc5sg3nbvl6snl6hknu-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/30304/
State Superseded
Headers show

Comments

phabricator - April 4, 2018, 10:54 p.m.
martinvonz created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  It's unclear what we want to support here. Perhaps it should just be
  nodeids? It doesn't make much sense to share revnums between repos,
  and bookmarks are probably too unstable. I used repo.lookup() to
  preserve the current behavior. We can change later if we want to.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  mercurial/scmutil.py

CHANGE DETAILS




To: martinvonz, #hg-reviewers
Cc: mercurial-devel
phabricator - April 5, 2018, 1:26 p.m.
yuja accepted this revision.
yuja added a comment.
This revision is now accepted and ready to land.


  > Perhaps it should just be nodeids?
  
  I think it should be, but the test disagree. Maybe we can make BC since
  it's still an experimental feature.

REPOSITORY
  rHG Mercurial

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

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

Patch

diff --git a/mercurial/scmutil.py b/mercurial/scmutil.py
--- a/mercurial/scmutil.py
+++ b/mercurial/scmutil.py
@@ -1134,7 +1134,7 @@ 
 
             k = encoding.tolocal(k)
             try:
-                data[repo[k].rev()] = encoding.tolocal(v)
+                data[revsingle(repo, k).rev()] = encoding.tolocal(v)
             except (error.LookupError, error.RepoLookupError):
                 pass # we ignore data for nodes that don't exist locally
     finally: