diff --git a/hgext/rebase.py b/hgext/rebase.py index 08ec11e3ae4cd12a2a2a32bc628cbeae6f046383_aGdleHQvcmViYXNlLnB5..e0b0fbd47491e0ec8039f7d530b05280195bbe4b_aGdleHQvcmViYXNlLnB5 100644 --- a/hgext/rebase.py +++ b/hgext/rebase.py @@ -498,7 +498,7 @@ if (activebookmark and repo['.'].node() == repo._bookmarks[activebookmark]): - bookmarks.setcurrent(repo, activebookmark) + bookmarks.activate(repo, activebookmark) finally: release(lock, wlock) @@ -888,7 +888,7 @@ repair.strip(repo.ui, repo, strippoints) if activebookmark: - bookmarks.setcurrent(repo, activebookmark) + bookmarks.activate(repo, activebookmark) clearstatus(repo) repo.ui.warn(_('rebase aborted\n')) diff --git a/mercurial/bookmarks.py b/mercurial/bookmarks.py index 08ec11e3ae4cd12a2a2a32bc628cbeae6f046383_bWVyY3VyaWFsL2Jvb2ttYXJrcy5weQ==..e0b0fbd47491e0ec8039f7d530b05280195bbe4b_bWVyY3VyaWFsL2Jvb2ttYXJrcy5weQ== 100644 --- a/mercurial/bookmarks.py +++ b/mercurial/bookmarks.py @@ -129,8 +129,8 @@ file.close() return mark -def setcurrent(repo, mark): - '''Set the name of the bookmark that we are currently on - - Set the name of the bookmark that we are on (hg update <bookmark>). +def activate(repo, mark): + """ + Set the given bookmark to be 'active', meaning that this bookmark will + follow new commits that are made. The name is recorded in .hg/bookmarks.current @@ -136,5 +136,5 @@ The name is recorded in .hg/bookmarks.current - ''' + """ if mark not in repo._bookmarks: raise AssertionError('bookmark %s does not exist!' % mark) diff --git a/mercurial/commands.py b/mercurial/commands.py index 08ec11e3ae4cd12a2a2a32bc628cbeae6f046383_bWVyY3VyaWFsL2NvbW1hbmRzLnB5..e0b0fbd47491e0ec8039f7d530b05280195bbe4b_bWVyY3VyaWFsL2NvbW1hbmRzLnB5 100644 --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -995,7 +995,7 @@ checkconflict(repo, mark, cur, force) marks[mark] = marks[rename] if repo._bookmarkcurrent == rename and not inactive: - bookmarks.setcurrent(repo, mark) + bookmarks.activate(repo, mark) del marks[rename] marks.write() @@ -1014,7 +1014,7 @@ checkconflict(repo, mark, cur, force, tgt) marks[mark] = tgt if not inactive and cur == marks[newact] and not rev: - bookmarks.setcurrent(repo, newact) + bookmarks.activate(repo, newact) elif cur != tgt and newact == repo._bookmarkcurrent: bookmarks.deactivate(repo) marks.write() @@ -1519,7 +1519,7 @@ for bm in marks: newmarks[bm] = node if bm == current: - bookmarks.setcurrent(repo, bm) + bookmarks.activate(repo, bm) newmarks.write() else: def commitfunc(ui, repo, message, match, opts): @@ -6407,7 +6407,7 @@ if bookmarks.update(repo, [movemarkfrom], repo['.'].node()): ui.status(_("updating bookmark %s\n") % repo._bookmarkcurrent) elif brev in repo._bookmarks: - bookmarks.setcurrent(repo, brev) + bookmarks.activate(repo, brev) ui.status(_("(activating bookmark %s)\n") % brev) elif brev: if repo._bookmarkcurrent: diff --git a/mercurial/hg.py b/mercurial/hg.py index 08ec11e3ae4cd12a2a2a32bc628cbeae6f046383_bWVyY3VyaWFsL2hnLnB5..e0b0fbd47491e0ec8039f7d530b05280195bbe4b_bWVyY3VyaWFsL2hnLnB5 100644 --- a/mercurial/hg.py +++ b/mercurial/hg.py @@ -497,7 +497,7 @@ destrepo.ui.status(status) _update(destrepo, uprev) if update in destrepo._bookmarks: - bookmarks.setcurrent(destrepo, update) + bookmarks.activate(destrepo, update) finally: release(srclock, destlock) if cleandir is not None: