mercurial/commands.py
changeset 7415 6163ef936a00
parent 7414 040484030491
child 7449 f848d7f96195
--- a/mercurial/commands.py	Tue Nov 25 16:24:22 2008 -0600
+++ b/mercurial/commands.py	Tue Nov 25 23:26:33 2008 +0100
@@ -1700,7 +1700,8 @@
     ui.status(_('comparing with %s\n') % url.hidepassword(source))
     if revs:
         revs = [other.lookup(rev) for rev in revs]
-    incoming = repo.findincoming(other, heads=revs, force=opts["force"])
+    common, incoming, rheads = repo.findcommonincoming(other, heads=revs,
+                                                       force=opts["force"])
     if not incoming:
         try:
             os.unlink(opts["bundle"])
@@ -1714,6 +1715,10 @@
         fname = opts["bundle"]
         if fname or not other.local():
             # create a bundle (uncompressed if other repo is not local)
+
+            if revs is None and other.capable('changegroupsubset'):
+                revs = rheads
+
             if revs is None:
                 cg = other.changegroup(incoming, "incoming")
             else: