##// END OF EJS Templates
changegroup: minor cleanups to deltagroup()...
Gregory Szorc -
r39051:ad9ecced default
parent child Browse files
Show More
@@ -701,25 +701,27 b' def deltagroup(repo, revs, store, ischan'
701 701 If units is not None, progress detail will be generated, units specifies
702 702 the type of revlog that is touched (changelog, manifest, etc.).
703 703 """
704 # if we don't have any revisions touched by these changesets, bail
705 if len(revs) == 0:
704 if not revs:
706 705 return
707 706
708 707 cl = repo.changelog
709 708
710 # add the parent of the first rev
711 p = store.parentrevs(revs[0])[0]
712 revs.insert(0, p)
709 # Add the parent of the first rev.
710 revs.insert(0, store.parentrevs(revs[0])[0])
713 711
714 712 # build deltas
715 713 progress = None
716 714 if units is not None:
717 715 progress = repo.ui.makeprogress(_('bundling'), unit=units,
718 716 total=(len(revs) - 1))
719 for r in pycompat.xrange(len(revs) - 1):
717
718 for i in pycompat.xrange(len(revs) - 1):
720 719 if progress:
721 progress.update(r + 1)
722 prev, curr = revs[r], revs[r + 1]
720 progress.update(i + 1)
721
722 prev = revs[i]
723 curr = revs[i + 1]
724
723 725 linknode = lookup(store.node(curr))
724 726
725 727 if ellipses:
General Comments 0
You need to be logged in to leave comments. Login now