diff mercurial/bundlerepo.py @ 18568:cd403d6d96ef stable

incoming: fix incoming when a local head is remotely filtered (issue3805) In its current state discovery may return (remotely) filtered elements in "common". This has usually no impact as "missing" is kept clear of filtered elements. However when the "remote" repo is a local repo (disk accessible, and directly created in memory) the incoming code takes a shortcut and directly uses the "remote" repo to generate the incoming output. When some common elements are filtered this led to a crash. We now ensure we use an unfiltered repository to generate the incoming output. This does not change the behavior as missing is clear of filtered revision. Now that we have proper low level filtering, incoming code needs a deeper cleanup but it is already planned.
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
date Wed, 06 Feb 2013 07:55:29 +0000
parents e72126135252
children cc28a84db8c9
line wrap: on
line diff
--- a/mercurial/bundlerepo.py	Tue Feb 05 11:31:43 2013 -0600
+++ b/mercurial/bundlerepo.py	Wed Feb 06 07:55:29 2013 +0000
@@ -367,6 +367,11 @@
             localrepo = bundlerepo = bundlerepository(ui, repo.root, fname)
             # this repo contains local and other now, so filter out local again
             common = repo.heads()
+    if localrepo:
+        # Part of common may be remotely filtered
+        # So use an unfiltered version
+        # The discovery process probably need cleanup to avoid that
+        localrepo = localrepo.unfiltered()
 
     csets = localrepo.changelog.findmissing(common, rheads)