bookmarks: switch from repo.changectx('.') to repo['.']
authorMartin von Zweigbergk <martinvonz@google.com>
Tue, 03 Apr 2018 08:46:58 -0700
changeset 37301 a494cccb673e
parent 37300 2f859ad7ed8c
child 37302 00f18dd1d3d6
bookmarks: switch from repo.changectx('.') to repo['.'] The two forms are synonymous and the new form is by far the more common form. Differential Revision: https://phab.mercurial-scm.org/D3033
mercurial/bookmarks.py
--- a/mercurial/bookmarks.py	Wed Mar 28 14:52:57 2018 -0700
+++ b/mercurial/bookmarks.py	Tue Apr 03 08:46:58 2018 -0700
@@ -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