##// 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 If units is not None, progress detail will be generated, units specifies
701 If units is not None, progress detail will be generated, units specifies
702 the type of revlog that is touched (changelog, manifest, etc.).
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
704 if not revs:
705 if len(revs) == 0:
706 return
705 return
707
706
708 cl = repo.changelog
707 cl = repo.changelog
709
708
710 # add the parent of the first rev
709 # Add the parent of the first rev.
711 p = store.parentrevs(revs[0])[0]
710 revs.insert(0, store.parentrevs(revs[0])[0])
712 revs.insert(0, p)
713
711
714 # build deltas
712 # build deltas
715 progress = None
713 progress = None
716 if units is not None:
714 if units is not None:
717 progress = repo.ui.makeprogress(_('bundling'), unit=units,
715 progress = repo.ui.makeprogress(_('bundling'), unit=units,
718 total=(len(revs) - 1))
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 if progress:
719 if progress:
721 progress.update(r + 1)
720 progress.update(i + 1)
722 prev, curr = revs[r], revs[r + 1]
721
722 prev = revs[i]
723 curr = revs[i + 1]
724
723 linknode = lookup(store.node(curr))
725 linknode = lookup(store.node(curr))
724
726
725 if ellipses:
727 if ellipses:
General Comments 0
You need to be logged in to leave comments. Login now