##// END OF EJS Templates
bundlerepo: make getremotechanges support filtering of incoming...
Peter Arrenbrecht -
r14412:9ac47975 default
parent child Browse files
Show More
@@ -326,15 +326,14 b' def getremotechanges(ui, repo, other, on'
326 if bundlename or not other.local():
326 if bundlename or not other.local():
327 # create a bundle (uncompressed if other repo is not local)
327 # create a bundle (uncompressed if other repo is not local)
328
328
329 if onlyheads is None and other.capable('changegroupsubset'):
330 onlyheads = rheads
331
332 if other.capable('getbundle'):
329 if other.capable('getbundle'):
333 cg = other.getbundle('incoming', common=common, heads=onlyheads)
330 cg = other.getbundle('incoming', common=common, heads=rheads)
334 elif onlyheads is None:
331 elif onlyheads is None and not other.capable('changegroupsubset'):
332 # compat with older servers when pulling all remote heads
335 cg = other.changegroup(incoming, "incoming")
333 cg = other.changegroup(incoming, "incoming")
334 rheads = None
336 else:
335 else:
337 cg = other.changegroupsubset(incoming, onlyheads, 'incoming')
336 cg = other.changegroupsubset(incoming, rheads, 'incoming')
338 bundletype = other.local() and "HG10BZ" or "HG10UN"
337 bundletype = other.local() and "HG10BZ" or "HG10UN"
339 fname = bundle = changegroup.writebundle(cg, bundlename, bundletype)
338 fname = bundle = changegroup.writebundle(cg, bundlename, bundletype)
340 # keep written bundle?
339 # keep written bundle?
@@ -346,7 +345,7 b' def getremotechanges(ui, repo, other, on'
346 # this repo contains local and other now, so filter out local again
345 # this repo contains local and other now, so filter out local again
347 common = repo.heads()
346 common = repo.heads()
348
347
349 csets = localrepo.changelog.findmissing(common, onlyheads)
348 csets = localrepo.changelog.findmissing(common, rheads)
350
349
351 def cleanup():
350 def cleanup():
352 if bundlerepo:
351 if bundlerepo:
General Comments 0
You need to be logged in to leave comments. Login now