--- a/mercurial/bookmarks.py Wed Sep 19 14:00:23 2012 +0200
+++ b/mercurial/bookmarks.py Tue Sep 18 21:39:12 2012 +0900
@@ -257,11 +257,11 @@
"""Is the new bookmark destination a valid update from the old one"""
if old == new:
# Old == new -> nothing to update.
- validdests = ()
+ return False
elif not old:
# old is nullrev, anything is valid.
# (new != nullrev has been excluded by the previous check)
- validdests = (new,)
+ return True
elif repo.obsstore:
# We only need this complicated logic if there is obsolescence
# XXX will probably deserve an optimised rset.
@@ -279,6 +279,6 @@
c.node()))
validdests = set(repo.set('%ln::', succs))
validdests.remove(old)
+ return new in validdests
else:
- validdests = old.descendants()
- return new in validdests
+ return new in old.descendants()