[PATCH 4 of 7] pull: run findcommon incoming on unfiltered repo

pierre-yves.david at ens-lyon.org pierre-yves.david at ens-lyon.org
Sun Nov 17 14:31:43 CST 2013


# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at ens-lyon.org>
# Date 1384620824 18000
#      Sat Nov 16 11:53:44 2013 -0500
# Node ID 82c588b045118f0f96e08480e405089822d0348f
# Parent  f4ba2c3b6d5d25ac6af8e2e226b38b43596950ca
pull: run findcommon incoming on unfiltered repo

The discovery is not yet ready for filtered repo. Pull was using filtered for
its discovery which is wrong. It worked by dumb luck because discovery mainly
use funtion that does not respect the filtering.

Trying to makes discovery work on filtered repo revealed this bug.

diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -1676,12 +1676,12 @@ class localrepository(object):
         # rollback call
         tr = None
         trname = 'pull\n' + util.hidepassword(remote.url())
         lock = self.lock()
         try:
-            tmp = discovery.findcommonincoming(self, remote, heads=heads,
-                                               force=force)
+            tmp = discovery.findcommonincoming(self.unfiltered(), remote,
+                                               heads=heads, force=force)
             common, fetch, rheads = tmp
             if not fetch:
                 self.ui.status(_("no changes found\n"))
                 result = 0
             else:


More information about the Mercurial-devel mailing list