Patchwork D3165: infinitepush: look up bookmarks only among bookmarks

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

Comments

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

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  hgext/infinitepush/bundleparts.py

CHANGE DETAILS




To: martinvonz, #hg-reviewers
Cc: mercurial-devel
phabricator - April 7, 2018, 5:36 a.m.
indygreg added subscribers: smf, indygreg.
indygreg accepted this revision.
indygreg added a comment.
This revision is now accepted and ready to land.


  These changes all seem reasonable to me. And I'm pretty sure I use you and @smf discussing this in IRC. So LGTM.

REPOSITORY
  rHG Mercurial

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

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

Patch

diff --git a/hgext/infinitepush/bundleparts.py b/hgext/infinitepush/bundleparts.py
--- a/hgext/infinitepush/bundleparts.py
+++ b/hgext/infinitepush/bundleparts.py
@@ -46,8 +46,9 @@ 
         params['bookmark'] = bookmark
         # 'prevbooknode' is necessary for pushkey reply part
         params['bookprevnode'] = ''
-        if bookmark in repo:
-            params['bookprevnode'] = repo[bookmark].hex()
+        bookmarks = repo._bookmarks
+        if bookmark in bookmarks:
+            params['bookprevnode'] = bookmarks.ctx(bookmark).hex()
 
     # Do not send pushback bundle2 part with bookmarks if remotenames extension
     # is enabled. It will be handled manually in `_push()`