Mercurial > public > mercurial-scm > hg-stable
diff mercurial/commands.py @ 7415:6163ef936a00
protocol: use changegroupsubset() if possible (issue1389)
Due to the fix to the pull race, to avoid sending unnecessary
changesets, use changegroupsubset if possible.
This will increase the load on the server.
author | Benoit Boissinot <benoit.boissinot@ens-lyon.org> |
---|---|
date | Tue, 25 Nov 2008 23:26:33 +0100 |
parents | 040484030491 |
children | f848d7f96195 |
line wrap: on
line diff
--- 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: