# HG changeset patch # User Paul Molodowitch # Date 1286484257 25200 # Node ID 175fb1b193f494683801c3156a338da477b82bb0 # Parent 8b438cb84c5746bea2bd8ec6cc3e98f6d1086173 bookmarks: better fix for issue2016 (lookup infinite recursion) 741290486877 partially reverted by Patrick Mézard diff -r 8b438cb84c57 -r 175fb1b193f4 hgext/bookmarks.py --- a/hgext/bookmarks.py Mon Aug 02 07:15:47 2010 +0300 +++ b/hgext/bookmarks.py Thu Oct 07 13:44:17 2010 -0700 @@ -225,15 +225,13 @@ in the .hg/bookmarks file. Read the file and return a (name=>nodeid) dictionary ''' - self._loadingbookmarks = True try: bookmarks = {} for line in self.opener('bookmarks'): sha, refspec = line.strip().split(' ', 1) - bookmarks[refspec] = super(bookmark_repo, self).lookup(sha) + bookmarks[refspec] = self.changelog.lookup(sha) except: pass - self._loadingbookmarks = False return bookmarks @util.propertycache @@ -260,9 +258,8 @@ return super(bookmark_repo, self).rollback(*args) def lookup(self, key): - if not getattr(self, '_loadingbookmarks', False): - if key in self._bookmarks: - key = self._bookmarks[key] + if key in self._bookmarks: + key = self._bookmarks[key] return super(bookmark_repo, self).lookup(key) def _bookmarksupdate(self, parents, node): @@ -361,8 +358,7 @@ def _findtags(self): """Merge bookmarks with normal tags""" (tags, tagtypes) = super(bookmark_repo, self)._findtags() - if not getattr(self, '_loadingbookmarks', False): - tags.update(self._bookmarks) + tags.update(self._bookmarks) return (tags, tagtypes) if hasattr(repo, 'invalidate'):