Mercurial > public > mercurial-scm > hg
comparison mercurial/localrepo.py @ 16707:f8dee1a8f844
localrepo: introduce bookmarkheads
Similar to branch heads we introduce the notion of bookmarkheads.
Bookmarkheads are changests that are bookmarked with the given bookmark
or a diverged version
author | David Soria Parra <dsp@php.net> |
---|---|
date | Sun, 13 May 2012 11:54:58 +0200 |
parents | a270ec977ba6 |
children | 0311a6abd38a |
comparison
equal
deleted
inserted
replaced
16706:a270ec977ba6 | 16707:f8dee1a8f844 |
---|---|
177 def _bookmarkcurrent(self): | 177 def _bookmarkcurrent(self): |
178 return bookmarks.readcurrent(self) | 178 return bookmarks.readcurrent(self) |
179 | 179 |
180 def _writebookmarks(self, marks): | 180 def _writebookmarks(self, marks): |
181 bookmarks.write(self) | 181 bookmarks.write(self) |
182 | |
183 def bookmarkheads(self, bookmark): | |
184 name = bookmark.split('@', 1)[0] | |
185 heads = [] | |
186 for mark, n in self._bookmarks.iteritems(): | |
187 if mark.split('@', 1)[0] == name: | |
188 heads.append(n) | |
189 return heads | |
182 | 190 |
183 @storecache('phaseroots') | 191 @storecache('phaseroots') |
184 def _phasecache(self): | 192 def _phasecache(self): |
185 return phases.phasecache(self, self._phasedefaults) | 193 return phases.phasecache(self, self._phasedefaults) |
186 | 194 |