Mercurial > hg
comparison mercurial/commands.py @ 13620:8ee4b00ddfd8 stable
bookmarks: fix update of the current bookmark during rename
We need to get rid of the previous bookmark after changing current bookmark.
author | Benoit Boissinot <benoit.boissinot@ens-lyon.org> |
---|---|
date | Sun, 13 Mar 2011 15:42:24 +0100 |
parents | 0fb2ff949790 |
children | 0e217d479c16 adf3c4401c5d |
comparison
equal
deleted
inserted
replaced
13610:7359cb753a54 | 13620:8ee4b00ddfd8 |
---|---|
485 if mark in marks and not force: | 485 if mark in marks and not force: |
486 raise util.Abort(_("a bookmark of the same name already exists")) | 486 raise util.Abort(_("a bookmark of the same name already exists")) |
487 if mark is None: | 487 if mark is None: |
488 raise util.Abort(_("new bookmark name required")) | 488 raise util.Abort(_("new bookmark name required")) |
489 marks[mark] = marks[rename] | 489 marks[mark] = marks[rename] |
490 del marks[rename] | |
491 if repo._bookmarkcurrent == rename: | 490 if repo._bookmarkcurrent == rename: |
492 bookmarks.setcurrent(repo, mark) | 491 bookmarks.setcurrent(repo, mark) |
492 del marks[rename] | |
493 bookmarks.write(repo) | 493 bookmarks.write(repo) |
494 return | 494 return |
495 | 495 |
496 if delete: | 496 if delete: |
497 if mark is None: | 497 if mark is None: |