Mercurial > public > mercurial-scm > hg
comparison mercurial/localrepo.py @ 12335:e21fe9c5fb25
bundle: get rid of chunkiter
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Sun, 19 Sep 2010 12:51:54 -0500 |
parents | 50946802593d |
children | 6a6149487817 |
comparison
equal
deleted
inserted
replaced
12334:50946802593d | 12335:e21fe9c5fb25 |
---|---|
1674 total=self.total) | 1674 total=self.total) |
1675 self.count += 1 | 1675 self.count += 1 |
1676 pr = prog() | 1676 pr = prog() |
1677 source.callback = pr | 1677 source.callback = pr |
1678 | 1678 |
1679 if (cl.addgroup(source.chunks(), csmap, trp) is None | 1679 if (cl.addgroup(source, csmap, trp) is None |
1680 and not emptyok): | 1680 and not emptyok): |
1681 raise util.Abort(_("received changelog group is empty")) | 1681 raise util.Abort(_("received changelog group is empty")) |
1682 clend = len(cl) | 1682 clend = len(cl) |
1683 changesets = clend - clstart | 1683 changesets = clend - clstart |
1684 for c in xrange(clstart, clend): | 1684 for c in xrange(clstart, clend): |
1693 pr.total = changesets # manifests <= changesets | 1693 pr.total = changesets # manifests <= changesets |
1694 # no need to check for empty manifest group here: | 1694 # no need to check for empty manifest group here: |
1695 # if the result of the merge of 1 and 2 is the same in 3 and 4, | 1695 # if the result of the merge of 1 and 2 is the same in 3 and 4, |
1696 # no new manifest will be created and the manifest group will | 1696 # no new manifest will be created and the manifest group will |
1697 # be empty during the pull | 1697 # be empty during the pull |
1698 self.manifest.addgroup(source.chunks(), revmap, trp) | 1698 self.manifest.addgroup(source, revmap, trp) |
1699 self.ui.progress(_('manifests'), None) | 1699 self.ui.progress(_('manifests'), None) |
1700 | 1700 |
1701 needfiles = {} | 1701 needfiles = {} |
1702 if self.ui.configbool('server', 'validate', default=False): | 1702 if self.ui.configbool('server', 'validate', default=False): |
1703 # validate incoming csets have their manifests | 1703 # validate incoming csets have their manifests |
1721 break | 1721 break |
1722 self.ui.debug("adding %s revisions\n" % f) | 1722 self.ui.debug("adding %s revisions\n" % f) |
1723 pr() | 1723 pr() |
1724 fl = self.file(f) | 1724 fl = self.file(f) |
1725 o = len(fl) | 1725 o = len(fl) |
1726 if fl.addgroup(source.chunks(), revmap, trp) is None: | 1726 if fl.addgroup(source, revmap, trp) is None: |
1727 raise util.Abort(_("received file revlog group is empty")) | 1727 raise util.Abort(_("received file revlog group is empty")) |
1728 revisions += len(fl) - o | 1728 revisions += len(fl) - o |
1729 files += 1 | 1729 files += 1 |
1730 if f in needfiles: | 1730 if f in needfiles: |
1731 needs = needfiles[f] | 1731 needs = needfiles[f] |