Patchwork D3033: bookmarks: switch from repo.changectx('.') to repo['.']

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

Comments

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

REVISION SUMMARY
  The two forms are synonymous and the new form is by far the more
  common form.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  mercurial/bookmarks.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/bookmarks.py b/mercurial/bookmarks.py
--- a/mercurial/bookmarks.py
+++ b/mercurial/bookmarks.py
@@ -204,7 +204,7 @@ 
 
         If divergent bookmark are to be deleted, they will be returned as list.
         """
-        cur = self._repo.changectx('.').node()
+        cur = self._repo['.'].node()
         if mark in self and not force:
             if target:
                 if self[mark] == target and target == cur:
@@ -818,7 +818,7 @@ 
     Raises an abort error if old is not in the bookmark store.
     """
     marks = repo._bookmarks
-    cur = repo.changectx('.').node()
+    cur = repo['.'].node()
     newact = None
     changes = []
     hiddenrev = None