Mercurial > public > mercurial-scm > hg-stable
diff mercurial/discovery.py @ 42980:e3bb2a58af1e
bookmarks: remove changectx() method from bmstore (API)
All the callsites of this method have access to the repo, and I'd
rather not have to duplicate this across alternative bmstore
implementations. Besides, it feels like a bit of a layering violation.
.. api::
`mercurial.bookmarks.bmstore` no longer has a convenience method
for looking up changectx instances from a bookmark name. Use
`repo[repo.bookmarks[name]]` intead of
`repo.bookmarks.changectx(name)`.
Differential Revision: https://phab.mercurial-scm.org/D6884
author | Augie Fackler <augie@google.com> |
---|---|
date | Wed, 25 Sep 2019 17:57:16 -0400 |
parents | d0e773ad9077 |
children | 6e8582ccf76d |
line wrap: on
line diff
--- a/mercurial/discovery.py Wed Sep 25 13:50:48 2019 -0400 +++ b/mercurial/discovery.py Wed Sep 25 17:57:16 2019 -0400 @@ -301,7 +301,7 @@ for bm in localbookmarks: rnode = remotebookmarks.get(bm) if rnode and rnode in repo: - lctx, rctx = localbookmarks.changectx(bm), repo[rnode] + lctx, rctx = repo[localbookmarks[bm]], repo[rnode] if bookmarks.validdest(repo, rctx, lctx): bookmarkedheads.add(lctx.node()) else: