--- a/mercurial/discovery.py Sun Aug 26 00:27:44 2012 +0200
+++ b/mercurial/discovery.py Sun Aug 26 00:28:56 2012 +0200
@@ -7,7 +7,7 @@
from node import nullid, short
from i18n import _
-import util, setdiscovery, treediscovery, phases, obsolete
+import util, setdiscovery, treediscovery, phases, obsolete, bookmarks
def findcommonincoming(repo, remote, heads=None, force=False):
"""Return a tuple (common, anyincoming, heads) used to identify the common
@@ -255,7 +255,7 @@
rnode = remotebookmarks.get(bm)
if rnode and rnode in repo:
lctx, rctx = repo[bm], repo[rnode]
- if rctx == lctx.ancestor(rctx):
+ if bookmarks.validdest(repo, rctx, lctx):
bookmarkedheads.add(lctx.node())
# 3. Check for new heads.