comparison mercurial/bookmarks.py @ 37301:a494cccb673e

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
author Martin von Zweigbergk <martinvonz@google.com>
date Tue, 03 Apr 2018 08:46:58 -0700
parents a5eefc9cccc5
children e27298bf11dd
comparison
equal deleted inserted replaced
37300:2f859ad7ed8c 37301:a494cccb673e
202 If force is supplied, then forcibly move the bookmark to a new commit 202 If force is supplied, then forcibly move the bookmark to a new commit
203 regardless if it is a move forward. 203 regardless if it is a move forward.
204 204
205 If divergent bookmark are to be deleted, they will be returned as list. 205 If divergent bookmark are to be deleted, they will be returned as list.
206 """ 206 """
207 cur = self._repo.changectx('.').node() 207 cur = self._repo['.'].node()
208 if mark in self and not force: 208 if mark in self and not force:
209 if target: 209 if target:
210 if self[mark] == target and target == cur: 210 if self[mark] == target and target == cur:
211 # re-activating a bookmark 211 # re-activating a bookmark
212 return [] 212 return []
816 first bookmark is activated. 816 first bookmark is activated.
817 817
818 Raises an abort error if old is not in the bookmark store. 818 Raises an abort error if old is not in the bookmark store.
819 """ 819 """
820 marks = repo._bookmarks 820 marks = repo._bookmarks
821 cur = repo.changectx('.').node() 821 cur = repo['.'].node()
822 newact = None 822 newact = None
823 changes = [] 823 changes = []
824 hiddenrev = None 824 hiddenrev = None
825 825
826 # unhide revs if any 826 # unhide revs if any