mercurial/bookmarks.py
changeset 20281 67ee87a371b2
parent 20100 0f01d0692bc5
child 20352 58300f61b139
--- a/mercurial/bookmarks.py	Wed Jan 15 16:41:18 2014 -0600
+++ b/mercurial/bookmarks.py	Wed Jan 15 17:48:48 2014 -0600
@@ -192,13 +192,12 @@
         return False
 
     if marks[cur] in parents:
-        old = repo[marks[cur]]
         new = repo[node]
         divs = [repo[b] for b in marks
                 if b.split('@', 1)[0] == cur.split('@', 1)[0]]
         anc = repo.changelog.ancestors([new.rev()])
         deletefrom = [b.node() for b in divs if b.rev() in anc or b == new]
-        if old.descendant(new):
+        if validdest(repo, repo[marks[cur]], new):
             marks[cur] = new.node()
             update = True