# HG changeset patch # User Martin Geisler # Date 1300090821 -3600 # Node ID c8df759ee5eda709a71254f8fb9bba8624ab5104 # Parent 4f31220d67c72b9ece927b8495c74d351e9feddf# Parent 71a96f6c205dcbfbe6a770d11133cc9447f3351b merge with stable diff -r 4f31220d67c7 -r c8df759ee5ed mercurial/bookmarks.py --- a/mercurial/bookmarks.py Mon Mar 14 09:20:05 2011 +0100 +++ b/mercurial/bookmarks.py Mon Mar 14 09:20:21 2011 +0100 @@ -45,7 +45,7 @@ file = repo.opener('bookmarks.current') # No readline() in posixfile_nt, reading everything is cheap mark = encoding.tolocal((file.readlines() or [''])[0]) - if mark == '': + if mark == '' or mark not in repo._bookmarks: mark = None file.close() return mark diff -r 4f31220d67c7 -r c8df759ee5ed tests/test-bookmarks-strip.t --- a/tests/test-bookmarks-strip.t Mon Mar 14 09:20:05 2011 +0100 +++ b/tests/test-bookmarks-strip.t Mon Mar 14 09:20:21 2011 +0100 @@ -84,19 +84,33 @@ $ hg bookmarks no bookmarks set +can we commit? (issue2692) + + $ echo c > c + $ hg ci -Am rockon + adding c + can you be added again? $ hg bookmarks markb $ hg bookmarks - * markb 0:07f494440405 + * markb 1:fdb34407462c rollback dry run with rollback information $ hg rollback -n + repository tip rolled back to revision 0 (undo commit) + $ hg bookmarks + * markb 1:fdb34407462c + +rollback dry run with rollback information and no commit undo + + $ rm .hg/store/undo + $ hg rollback -n no rollback information available [1] $ hg bookmarks - * markb 0:07f494440405 + * markb 1:fdb34407462c $ cd ..