Show More
@@ -348,17 +348,16 b' def headsforactive(repo):' | |||||
348 | heads.append(n) |
|
348 | heads.append(n) | |
349 | return heads |
|
349 | return heads | |
350 |
|
350 | |||
351 |
def calculateupdate(ui, repo |
|
351 | def calculateupdate(ui, repo): | |
352 | '''Return a tuple (activemark, movemarkfrom) indicating the active bookmark |
|
352 | '''Return a tuple (activemark, movemarkfrom) indicating the active bookmark | |
353 | and where to move the active bookmark from, if needed.''' |
|
353 | and where to move the active bookmark from, if needed.''' | |
354 | movemarkfrom = None |
|
354 | checkout, movemarkfrom = None, None | |
355 | if checkout is None: |
|
355 | activemark = repo._activebookmark | |
356 | activemark = repo._activebookmark |
|
356 | if isactivewdirparent(repo): | |
357 | if isactivewdirparent(repo): |
|
357 | movemarkfrom = repo['.'].node() | |
358 | movemarkfrom = repo['.'].node() |
|
358 | elif activemark: | |
359 | elif activemark: |
|
359 | ui.status(_("updating to active bookmark %s\n") % activemark) | |
360 | ui.status(_("updating to active bookmark %s\n") % activemark) |
|
360 | checkout = activemark | |
361 | checkout = activemark |
|
|||
362 | return (checkout, movemarkfrom) |
|
361 | return (checkout, movemarkfrom) | |
363 |
|
362 | |||
364 | def update(repo, parents, node): |
|
363 | def update(repo, parents, node): |
@@ -56,7 +56,7 b' def _destupdatebook(repo, clean):' | |||||
56 | """decide on an update destination from active bookmark""" |
|
56 | """decide on an update destination from active bookmark""" | |
57 | # we also move the active bookmark, if any |
|
57 | # we also move the active bookmark, if any | |
58 | node = None |
|
58 | node = None | |
59 |
activemark, movemark = bookmarks.calculateupdate(repo.ui, repo |
|
59 | activemark, movemark = bookmarks.calculateupdate(repo.ui, repo) | |
60 | if activemark is not None: |
|
60 | if activemark is not None: | |
61 | node = repo.lookup(activemark) |
|
61 | node = repo.lookup(activemark) | |
62 | return node, movemark, activemark |
|
62 | return node, movemark, activemark |
General Comments 0
You need to be logged in to leave comments.
Login now