Details
Details
- Reviewers
- None
- Group Reviewers
hg-reviewers - Commits
- rHGad9eccedb379: changegroup: minor cleanups to deltagroup()
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Lint
Lint Skipped - Unit
Unit Tests Skipped
hg-reviewers |
Lint Skipped |
Unit Tests Skipped |
Path | Packages | |||
---|---|---|---|---|
M | mercurial/changegroup.py (18 lines) |
Commit | Parents | Author | Summary | Date |
---|---|---|---|---|
Gregory Szorc | Aug 8 2018, 6:28 PM |
Status | Author | Revision | |
---|---|---|---|
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg | ||
Closed | indygreg |
precomputedellipsis=None): | precomputedellipsis=None): | ||||
"""Calculate deltas for a set of revisions. | """Calculate deltas for a set of revisions. | ||||
Is a generator of ``revisiondelta`` instances. | Is a generator of ``revisiondelta`` instances. | ||||
If units is not None, progress detail will be generated, units specifies | If units is not None, progress detail will be generated, units specifies | ||||
the type of revlog that is touched (changelog, manifest, etc.). | the type of revlog that is touched (changelog, manifest, etc.). | ||||
""" | """ | ||||
# if we don't have any revisions touched by these changesets, bail | if not revs: | ||||
if len(revs) == 0: | |||||
return | return | ||||
cl = repo.changelog | cl = repo.changelog | ||||
# add the parent of the first rev | # Add the parent of the first rev. | ||||
p = store.parentrevs(revs[0])[0] | revs.insert(0, store.parentrevs(revs[0])[0]) | ||||
revs.insert(0, p) | |||||
# build deltas | # build deltas | ||||
progress = None | progress = None | ||||
if units is not None: | if units is not None: | ||||
progress = repo.ui.makeprogress(_('bundling'), unit=units, | progress = repo.ui.makeprogress(_('bundling'), unit=units, | ||||
total=(len(revs) - 1)) | total=(len(revs) - 1)) | ||||
for r in pycompat.xrange(len(revs) - 1): | |||||
for i in pycompat.xrange(len(revs) - 1): | |||||
if progress: | if progress: | ||||
progress.update(r + 1) | progress.update(i + 1) | ||||
prev, curr = revs[r], revs[r + 1] | |||||
prev = revs[i] | |||||
curr = revs[i + 1] | |||||
linknode = lookup(store.node(curr)) | linknode = lookup(store.node(curr)) | ||||
if ellipses: | if ellipses: | ||||
linkrev = cl.rev(linknode) | linkrev = cl.rev(linknode) | ||||
clrevtolocalrev[linkrev] = curr | clrevtolocalrev[linkrev] = curr | ||||
# This is a node to send in full, because the changeset it | # This is a node to send in full, because the changeset it | ||||
# corresponds to was a full changeset. | # corresponds to was a full changeset. |