mercurial/commands.py
branchstable
changeset 19111 6439d78e14fb
parent 19109 26c51e87e807
child 19112 23f785b38af3
--- a/mercurial/commands.py	Wed May 01 15:34:45 2013 -0500
+++ b/mercurial/commands.py	Tue Apr 30 21:12:49 2013 -0500
@@ -818,6 +818,14 @@
                 bmctx = repo[marks[mark]]
                 divs = [repo[b].node() for b in marks
                         if b.split('@', 1)[0] == mark.split('@', 1)[0]]
+
+                # allow resolving a single divergent bookmark even if moving
+                # the bookmark across branches when a revision is specified
+                # that contains a divergent bookmark
+                if bmctx.rev() not in anc and target in divs:
+                    bookmarks.deletedivergent(repo, [target], mark)
+                    return
+
                 deletefrom = [b for b in divs
                               if repo[b].rev() in anc or b == target]
                 bookmarks.deletedivergent(repo, deletefrom, mark)