Mercurial > public > mercurial-scm > hg-stable
diff mercurial/bundle2.py @ 33049:d765ad56081f
bundle: make combinechangegroupresults() take a bundleoperation
Both callers have a bundleoperation. Passing it in lets us share a bit
more code.
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Thu, 22 Jun 2017 14:04:13 -0700 |
parents | 52c7060b707a |
children | f0efd2bffe1e |
line wrap: on
line diff
--- a/mercurial/bundle2.py Thu Jun 22 13:58:20 2017 -0700 +++ b/mercurial/bundle2.py Thu Jun 22 14:04:13 2017 -0700 @@ -1478,8 +1478,10 @@ # in case of sshrepo because we don't know the end of the stream return changegroup.writechunks(ui, chunkiter, filename, vfs=vfs) -def combinechangegroupresults(results): +def combinechangegroupresults(op): """logic to combine 0 or more addchangegroup results into one""" + results = [r.get('return', 0) + for r in op.records['changegroup']] changedheads = 0 result = 1 for ret in results: