changeset 516:873228c2f6cf

Change getchangegroup to findincoming -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Change getchangegroup to findincoming manifest hash: 46dbdc025ead342f7c70a0051d1c596cfcbb6699 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) iD8DBQFCwuwAywK+sNU5EO8RAoV/AJ9GaoLTKMo2aoycSIZyBt/8r073vQCeK/tO W1PwSot4HmnmcpR6RVIy9+0= =PiBt -----END PGP SIGNATURE-----
author mpm@selenic.com
date Wed, 29 Jun 2005 10:44:16 -0800
parents 03f27b1381f9
children 9b884be92af2
files mercurial/commands.py mercurial/hg.py
diffstat 2 files changed, 8 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/commands.py	Wed Jun 29 10:42:35 2005 -0800
+++ b/mercurial/commands.py	Wed Jun 29 10:44:16 2005 -0800
@@ -301,7 +301,8 @@
         else:
             repo = hg.repository(ui, ".", create=1)
             other = hg.repository(ui, source)
-            cg = repo.getchangegroup(other)
+            fetch = repo.findincoming(other)
+            cg = other.changegroup(fetch)
             repo.addchangegroup(cg)
 
         f = repo.opener("hgrc", "w")
@@ -547,7 +548,8 @@
     ui.status('pulling from %s\n' % (source))
 
     other = hg.repository(ui, source)
-    cg = repo.getchangegroup(other)
+    fetch = repo.findincoming(other)
+    cg = other.changegroup(fetch)
     r = repo.addchangegroup(cg)
     if cg and not r:
         if opts['update']:
--- a/mercurial/hg.py	Wed Jun 29 10:42:35 2005 -0800
+++ b/mercurial/hg.py	Wed Jun 29 10:44:16 2005 -0800
@@ -820,7 +820,7 @@
 
         return nl
 
-    def getchangegroup(self, remote):
+    def findincoming(self, remote):
         m = self.changelog.nodemap
         search = []
         fetch = []
@@ -830,7 +830,7 @@
         # if we have an empty repo, fetch everything
         if self.changelog.tip() == nullid:
             self.ui.status("requesting all changes\n")
-            return remote.changegroup([nullid])
+            return [nullid]
 
         # otherwise, assume we're closer to the tip than the root
         self.ui.status("searching for changes\n")
@@ -925,8 +925,8 @@
 
         self.ui.debug("%d total queries\n" % reqcnt)
 
-        return remote.changegroup(fetch)
-    
+        return fetch
+
     def changegroup(self, basenodes):
         nodes = self.newer(basenodes)