Mercurial > hg
changeset 13647:c0c599709846
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.
author | David Soria Parra <dsp@php.net> |
---|---|
date | Mon, 14 Mar 2011 09:36:17 +0100 |
parents | 31eac42d9123 |
children | d943efb9701f |
files | mercurial/bookmarks.py |
diffstat | 1 files changed, 1 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/bookmarks.py Mon Mar 14 00:10:43 2011 +0100 +++ b/mercurial/bookmarks.py Mon Mar 14 09:36:17 2011 +0100 @@ -101,13 +101,7 @@ 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 "