Show More
@@ -167,6 +167,8 b' class branchcache(dict):' | |||||
167 | return False |
|
167 | return False | |
168 |
|
168 | |||
169 | def _branchtip(self, heads): |
|
169 | def _branchtip(self, heads): | |
|
170 | '''Return tuple with last open head in heads and false, | |||
|
171 | otherwise return last closed head and true.''' | |||
170 | tip = heads[-1] |
|
172 | tip = heads[-1] | |
171 | closed = True |
|
173 | closed = True | |
172 | for h in reversed(heads): |
|
174 | for h in reversed(heads): | |
@@ -177,6 +179,9 b' class branchcache(dict):' | |||||
177 | return tip, closed |
|
179 | return tip, closed | |
178 |
|
180 | |||
179 | def branchtip(self, branch): |
|
181 | def branchtip(self, branch): | |
|
182 | '''Return the tipmost open head on branch head, otherwise return the | |||
|
183 | tipmost closed head on branch. | |||
|
184 | Raise KeyError for unknown branch.''' | |||
180 | return self._branchtip(self[branch])[0] |
|
185 | return self._branchtip(self[branch])[0] | |
181 |
|
186 | |||
182 | def branchheads(self, branch, closed=False): |
|
187 | def branchheads(self, branch, closed=False): |
@@ -14,9 +14,9 b' of exactly one full-length identifier.' | |||||
14 |
|
14 | |||
15 | Any other string is treated as a bookmark, tag, or branch name. A |
|
15 | Any other string is treated as a bookmark, tag, or branch name. A | |
16 | bookmark is a movable pointer to a revision. A tag is a permanent name |
|
16 | bookmark is a movable pointer to a revision. A tag is a permanent name | |
17 |
associated with a revision. A branch name denotes the tipmost |
|
17 | associated with a revision. A branch name denotes the tipmost open branch head | |
18 | of that branch. Bookmark, tag, and branch names must not contain the ":" |
|
18 | of that branch - or if they are all closed, the tipmost closed head of the | |
19 | character. |
|
19 | branch. Bookmark, tag, and branch names must not contain the ":" character. | |
20 |
|
20 | |||
21 | The reserved name "tip" always identifies the most recent revision. |
|
21 | The reserved name "tip" always identifies the most recent revision. | |
22 |
|
22 |
@@ -655,7 +655,8 b' class localrepository(object):' | |||||
655 | return sorted(marks) |
|
655 | return sorted(marks) | |
656 |
|
656 | |||
657 | def branchmap(self): |
|
657 | def branchmap(self): | |
658 |
'''returns a dictionary {branch: [branchheads]} |
|
658 | '''returns a dictionary {branch: [branchheads]} with branchheads | |
|
659 | ordered by increasing revision number''' | |||
659 | branchmap.updatecache(self) |
|
660 | branchmap.updatecache(self) | |
660 | return self._branchcaches[self.filtername] |
|
661 | return self._branchcaches[self.filtername] | |
661 |
|
662 |
@@ -723,7 +723,8 b' Test a help topic' | |||||
723 |
|
723 | |||
724 | Any other string is treated as a bookmark, tag, or branch name. A bookmark |
|
724 | Any other string is treated as a bookmark, tag, or branch name. A bookmark | |
725 | is a movable pointer to a revision. A tag is a permanent name associated |
|
725 | is a movable pointer to a revision. A tag is a permanent name associated | |
726 |
with a revision. A branch name denotes the tipmost |
|
726 | with a revision. A branch name denotes the tipmost open branch head of | |
|
727 | that branch - or if they are all closed, the tipmost closed head of the | |||
727 | branch. Bookmark, tag, and branch names must not contain the ":" |
|
728 | branch. Bookmark, tag, and branch names must not contain the ":" | |
728 | character. |
|
729 | character. | |
729 |
|
730 | |||
@@ -1878,9 +1879,9 b' Dish up an empty repo; serve it cold.' | |||||
1878 | <p> |
|
1879 | <p> | |
1879 | Any other string is treated as a bookmark, tag, or branch name. A |
|
1880 | Any other string is treated as a bookmark, tag, or branch name. A | |
1880 | bookmark is a movable pointer to a revision. A tag is a permanent name |
|
1881 | bookmark is a movable pointer to a revision. A tag is a permanent name | |
1881 |
associated with a revision. A branch name denotes the tipmost |
|
1882 | associated with a revision. A branch name denotes the tipmost open branch head | |
1882 | of that branch. Bookmark, tag, and branch names must not contain the ":" |
|
1883 | of that branch - or if they are all closed, the tipmost closed head of the | |
1883 | character. |
|
1884 | branch. Bookmark, tag, and branch names must not contain the ":" character. | |
1884 | </p> |
|
1885 | </p> | |
1885 | <p> |
|
1886 | <p> | |
1886 | The reserved name "tip" always identifies the most recent revision. |
|
1887 | The reserved name "tip" always identifies the most recent revision. |
General Comments 0
You need to be logged in to leave comments.
Login now