changeset 328:dac675ef6189

hg pull: more query fixes -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 hg pull: more query fixes Pull was getting confused by single-element branches because it had seen the top end already. Also, the previous change to do seenbranch on the base of the branch was bogus. Minor cleanup and a bit more diagnostics in the branch-narrowing code. manifest hash: 71d4dced9f74bef43d3a54d086dccd0a96d68e26 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) iD8DBQFCrjLgywK+sNU5EO8RAsxSAJ92U31Pz7K14Ctje4SEec2857Ut7QCgoVwY ho65mloslCSidLsEnxYfBDI= =Wts9 -----END PGP SIGNATURE-----
author mpm@selenic.com
date Mon, 13 Jun 2005 17:29:04 -0800
parents a9ad98a9c9bc
children 27d08c0c2a7e
files mercurial/hg.py
diffstat 1 files changed, 7 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/hg.py	Mon Jun 13 15:01:38 2005 -0800
+++ b/mercurial/hg.py	Mon Jun 13 17:29:04 2005 -0800
@@ -734,19 +734,18 @@
                 n = unknown.pop(0)
                 if n[0] in seen:
                     continue
-                seen[n[0]] = 1
 
                 self.ui.debug("examining %s:%s\n" % (short(n[0]), short(n[1])))
                 if n[0] == nullid:
                     break
-                if n[1] in seenbranch:
+                if n in seenbranch:
                     self.ui.debug("branch already found\n")
                     continue
                 if n[1] and n[1] in m: # do we know the base?
                     self.ui.debug("found incomplete branch %s:%s\n"
                                   % (short(n[0]), short(n[1])))
                     search.append(n) # schedule branch range for scanning
-                    seenbranch[n[1]] = 1
+                    seenbranch[n] = 1
                 else:
                     if n[1] not in seen and n[1] not in fetch:
                         if n[2] in m and n[3] in m:
@@ -760,6 +759,8 @@
                             r.append(a)
                             rep[a] = 1
 
+                seen[n[0]] = 1
+
             if r:
                 reqcnt += 1
                 self.ui.debug("request %d: %s\n" %
@@ -775,9 +776,11 @@
             n = search.pop(0)
             reqcnt += 1
             l = remote.between([(n[0], n[1])])[0]
+            l.append(n[1])
             p = n[0]
             f = 1
-            for i in l + [n[1]]:
+            for i in l:
+                self.ui.debug("narrowing %d:%d %s\n" % (f, len(l), short(i)))
                 if i in m:
                     if f <= 2:
                         self.ui.debug("found new branch changeset %s\n" %