diff --git a/hgext/rebase.py b/hgext/rebase.py index 3e39f67ef663b593ad870070220fad14e4504a51_aGdleHQvcmViYXNlLnB5..08ec11e3ae4cd12a2a2a32bc628cbeae6f046383_aGdleHQvcmViYXNlLnB5 100644 --- a/hgext/rebase.py +++ b/hgext/rebase.py @@ -360,7 +360,7 @@ currentbookmarks = repo._bookmarks.copy() activebookmark = activebookmark or repo._bookmarkcurrent if activebookmark: - bookmarks.unsetcurrent(repo) + bookmarks.deactivate(repo) extrafn = _makeextrafn(extrafns) diff --git a/hgext/strip.py b/hgext/strip.py index 3e39f67ef663b593ad870070220fad14e4504a51_aGdleHQvc3RyaXAucHk=..08ec11e3ae4cd12a2a2a32bc628cbeae6f046383_aGdleHQvc3RyaXAucHk= 100644 --- a/hgext/strip.py +++ b/hgext/strip.py @@ -61,7 +61,7 @@ marks = repo._bookmarks if bookmark: if bookmark == repo._bookmarkcurrent: - bookmarks.unsetcurrent(repo) + bookmarks.deactivate(repo) del marks[bookmark] marks.write() ui.write(_("bookmark '%s' deleted\n") % bookmark) diff --git a/mercurial/bookmarks.py b/mercurial/bookmarks.py index 3e39f67ef663b593ad870070220fad14e4504a51_bWVyY3VyaWFsL2Jvb2ttYXJrcy5weQ==..08ec11e3ae4cd12a2a2a32bc628cbeae6f046383_bWVyY3VyaWFsL2Jvb2ttYXJrcy5weQ== 100644 --- a/mercurial/bookmarks.py +++ b/mercurial/bookmarks.py @@ -84,7 +84,7 @@ def _writerepo(self, repo): """Factored out for extensibility""" if repo._bookmarkcurrent not in self: - unsetcurrent(repo) + deactivate(repo) wlock = repo.wlock() try: @@ -151,7 +151,10 @@ wlock.release() repo._bookmarkcurrent = mark -def unsetcurrent(repo): +def deactivate(repo): + """ + Unset the active bookmark in this reposiotry. + """ wlock = repo.wlock() try: try: diff --git a/mercurial/commands.py b/mercurial/commands.py index 3e39f67ef663b593ad870070220fad14e4504a51_bWVyY3VyaWFsL2NvbW1hbmRzLnB5..08ec11e3ae4cd12a2a2a32bc628cbeae6f046383_bWVyY3VyaWFsL2NvbW1hbmRzLnB5 100644 --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -980,7 +980,7 @@ raise util.Abort(_("bookmark '%s' does not exist") % mark) if mark == repo._bookmarkcurrent: - bookmarks.unsetcurrent(repo) + bookmarks.deactivate(repo) del marks[mark] marks.write() @@ -1006,7 +1006,7 @@ if newact is None: newact = mark if inactive and mark == repo._bookmarkcurrent: - bookmarks.unsetcurrent(repo) + bookmarks.deactivate(repo) return tgt = cur if rev: @@ -1016,7 +1016,7 @@ if not inactive and cur == marks[newact] and not rev: bookmarks.setcurrent(repo, newact) elif cur != tgt and newact == repo._bookmarkcurrent: - bookmarks.unsetcurrent(repo) + bookmarks.deactivate(repo) marks.write() elif inactive: @@ -1025,7 +1025,7 @@ elif not repo._bookmarkcurrent: ui.status(_("no active bookmark\n")) else: - bookmarks.unsetcurrent(repo) + bookmarks.deactivate(repo) finally: wlock.release() else: # show bookmarks @@ -6413,7 +6413,7 @@ if repo._bookmarkcurrent: ui.status(_("(leaving bookmark %s)\n") % repo._bookmarkcurrent) - bookmarks.unsetcurrent(repo) + bookmarks.deactivate(repo) return ret