1806 |
1806 |
1807 while newnode.obsolete(): |
1807 while newnode.obsolete(): |
1808 newnode = newnode.parents()[0] |
1808 newnode = newnode.parents()[0] |
1809 |
1809 |
1810 if newnode.node() != wdp.node(): |
1810 if newnode.node() != wdp.node(): |
|
1811 bookactive = bmactive(repo) |
|
1812 # Active bookmark that we don't want to delete (with -B option) |
|
1813 # we deactivate and move it before the update and reactivate it |
|
1814 # after |
|
1815 movebookmark = bookactive and not bookmark |
|
1816 if movebookmark: |
|
1817 bookmarks.deactivate(repo) |
|
1818 repo._bookmarks[bookactive] = newnode.node() |
|
1819 repo._bookmarks.write() |
1811 commands.update(ui, repo, newnode.rev()) |
1820 commands.update(ui, repo, newnode.rev()) |
1812 ui.status(_('working directory now at %s\n') % newnode) |
1821 ui.status(_('working directory now at %s\n') % newnode) |
|
1822 if movebookmark: |
|
1823 bookmarks.activate(repo, bookactive) |
|
1824 |
1813 # update bookmarks |
1825 # update bookmarks |
1814 if bookmark: |
1826 if bookmark: |
1815 _deletebookmark(ui, marks, bookmark) |
1827 _deletebookmark(ui, marks, bookmark) |
1816 for ctx in repo.unfiltered().set('bookmark() and %ld', precs): |
1828 for ctx in repo.unfiltered().set('bookmark() and %ld', precs): |
1817 # used to be: |
1829 # used to be: |