mercurial/localrepo.py
changeset 10864 8bc4ad7e34c8
parent 10773 bd36e5c0ccb1
parent 10863 60b42f318a6d
child 10876 24ed7a541f23
--- a/mercurial/localrepo.py	Mon Apr 05 20:35:47 2010 +0200
+++ b/mercurial/localrepo.py	Tue Apr 06 00:46:09 2010 +0200
@@ -1454,14 +1454,14 @@
         try:
             common, fetch, rheads = self.findcommonincoming(remote, heads=heads,
                                                             force=force)
-            if fetch == [nullid]:
-                self.ui.status(_("requesting all changes\n"))
-
             if not fetch:
                 self.ui.status(_("no changes found\n"))
                 return 0
 
-            if heads is None and remote.capable('changegroupsubset'):
+            if fetch == [nullid]:
+                self.ui.status(_("requesting all changes\n"))
+            elif heads is None and remote.capable('changegroupsubset'):
+                # issue1320, avoid a race if remote changed after discovery
                 heads = rheads
 
             if heads is None: