mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 15:27:13 +03:00
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
This commit is contained in:
parent
7ffe2b2eb4
commit
2ce902d434
@ -180,6 +180,14 @@ class localrepository(repo.repository):
|
||||
def _writebookmarks(self, marks):
|
||||
bookmarks.write(self)
|
||||
|
||||
def bookmarkheads(self, bookmark):
|
||||
name = bookmark.split('@', 1)[0]
|
||||
heads = []
|
||||
for mark, n in self._bookmarks.iteritems():
|
||||
if mark.split('@', 1)[0] == name:
|
||||
heads.append(n)
|
||||
return heads
|
||||
|
||||
@storecache('phaseroots')
|
||||
def _phasecache(self):
|
||||
return phases.phasecache(self, self._phasedefaults)
|
||||
|
Loading…
Reference in New Issue
Block a user