equal
deleted
inserted
replaced
223 if mark and marks[mark] in deletefrom: |
223 if mark and marks[mark] in deletefrom: |
224 if mark != bm: |
224 if mark != bm: |
225 del marks[mark] |
225 del marks[mark] |
226 deleted = True |
226 deleted = True |
227 return deleted |
227 return deleted |
|
228 |
|
229 def headsforactive(repo): |
|
230 """Given a repo with an active bookmark, return divergent bookmark nodes. |
|
231 |
|
232 Args: |
|
233 repo: A repository with an active bookmark. |
|
234 |
|
235 Returns: |
|
236 A list of binary node ids that is the full list of other |
|
237 revisions with bookmarks divergent from the active bookmark. If |
|
238 there were no divergent bookmarks, then this list will contain |
|
239 only one entry. |
|
240 """ |
|
241 if not repo._activebookmark: |
|
242 raise ValueError( |
|
243 'headsforactive() only makes sense with an active bookmark') |
|
244 name = repo._activebookmark.split('@', 1)[0] |
|
245 heads = [] |
|
246 for mark, n in repo._bookmarks.iteritems(): |
|
247 if mark.split('@', 1)[0] == name: |
|
248 heads.append(n) |
|
249 return heads |
228 |
250 |
229 def calculateupdate(ui, repo, checkout): |
251 def calculateupdate(ui, repo, checkout): |
230 '''Return a tuple (targetrev, movemarkfrom) indicating the rev to |
252 '''Return a tuple (targetrev, movemarkfrom) indicating the rev to |
231 check out and where to move the active bookmark from, if needed.''' |
253 check out and where to move the active bookmark from, if needed.''' |
232 movemarkfrom = None |
254 movemarkfrom = None |