# HG changeset patch # User David Soria Parra # Date 2011-03-14 08:36:17 # Node ID c0c59970984693d7fcd5b37e2a36d95e5c3a71eb # Parent 31eac42d912333557d0e974d3235a6254fc8126a bookmarks: remove API limitation in setcurrent setcurrent refuses to set a new current bookmark if the current bookmark points to the current dirstate. This restriction is not needed. A current bookmark can point to a different bookmark. diff --git a/mercurial/bookmarks.py b/mercurial/bookmarks.py --- a/mercurial/bookmarks.py +++ b/mercurial/bookmarks.py @@ -101,13 +101,7 @@ def setcurrent(repo, mark): if current == mark: return - refs = repo._bookmarks - - # do not update if we do update to a rev equal to the current bookmark - if (mark and mark not in refs and - current and refs[current] == repo.changectx('.').node()): - return - if mark not in refs: + if mark not in repo._bookmarks: mark = '' if not valid(mark): raise util.Abort(_("bookmark '%s' contains illegal "