--- a/mercurial/bookmarks.py Tue Feb 28 10:06:35 2012 +0100
+++ b/mercurial/bookmarks.py Tue Feb 28 23:47:46 2012 +0200
@@ -126,6 +126,17 @@
wlock.release()
repo._bookmarkcurrent = mark
+def unsetcurrent(repo):
+ wlock = repo.wlock()
+ try:
+ util.unlink(repo.join('bookmarks.current'))
+ repo._bookmarkcurrent = None
+ except OSError, inst:
+ if inst.errno != errno.ENOENT:
+ raise
+ finally:
+ wlock.release()
+
def updatecurrentbookmark(repo, oldnode, curbranch):
try:
return update(repo, oldnode, repo.branchtags()[curbranch])