changeset 24962:eecd48369caa

bookmarks: remove unused updatecurrentbookmark function (API) This function was not used anywhere in core and there is no indication that it is used elsewhere either.
author Ryan McElroy <rmcelroy@fb.com>
date Tue, 14 Apr 2015 13:31:50 -0700
parents 8d81b36fa6ce
children d78dea2248b1
files mercurial/bookmarks.py
diffstat 1 files changed, 1 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/bookmarks.py	Sun May 10 11:39:01 2015 -0500
+++ b/mercurial/bookmarks.py	Tue Apr 14 13:31:50 2015 -0700
@@ -8,7 +8,7 @@
 import os
 from mercurial.i18n import _
 from mercurial.node import hex, bin
-from mercurial import encoding, error, util, obsolete, lock as lockmod
+from mercurial import encoding, util, obsolete, lock as lockmod
 import errno
 
 class bmstore(dict):
@@ -178,15 +178,6 @@
     marks = repo._bookmarks
     return (mark in marks and marks[mark] in parents)
 
-def updatecurrentbookmark(repo, oldnode, curbranch):
-    try:
-        return update(repo, oldnode, repo.branchtip(curbranch))
-    except error.RepoLookupError:
-        if curbranch == "default": # no default branch!
-            return update(repo, oldnode, repo.lookup("tip"))
-        else:
-            raise util.Abort(_("branch %s not found") % curbranch)
-
 def deletedivergent(repo, deletefrom, bm):
     '''Delete divergent versions of bm on nodes in deletefrom.