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

login
register
mail settings
Submitter Pierre-Yves David
Date Nov. 17, 2013, 8:31 p.m.
Message ID <82c588b045118f0f96e0.1384720303@vulgaris>
Download mbox | patch
Permalink /patch/3032/
State Accepted
Commit 228ae760942fbd755e2ea106e0ef253fc2856c8d
Headers show

Comments

Pierre-Yves David - Nov. 17, 2013, 8:31 p.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@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.

Patch

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: