718 |
718 |
719 if not source: |
719 if not source: |
720 return 0 |
720 return 0 |
721 |
721 |
722 changesets = files = revisions = 0 |
722 changesets = files = revisions = 0 |
723 efiles = set() |
|
724 |
723 |
725 tr = repo.transaction("\n".join([srctype, util.hidepassword(url)])) |
724 tr = repo.transaction("\n".join([srctype, util.hidepassword(url)])) |
726 # The transaction could have been created before and already carries source |
725 # The transaction could have been created before and already carries source |
727 # information. In this case we use the top level data. We overwrite the |
726 # information. In this case we use the top level data. We overwrite the |
728 # argument because we need to use the top level value (if they exist) in |
727 # argument because we need to use the top level value (if they exist) in |
751 repo.ui.progress(self._step, self._count, unit=_('chunks'), |
750 repo.ui.progress(self._step, self._count, unit=_('chunks'), |
752 total=self._total) |
751 total=self._total) |
753 self._count += 1 |
752 self._count += 1 |
754 source.callback = prog(_('changesets'), expectedtotal) |
753 source.callback = prog(_('changesets'), expectedtotal) |
755 |
754 |
|
755 efiles = set() |
|
756 def onchangelog(cl, node): |
|
757 efiles.update(cl.read(node)[3]) |
|
758 |
756 source.changelogheader() |
759 source.changelogheader() |
757 srccontent = cl.addgroup(source, csmap, trp) |
760 srccontent = cl.addgroup(source, csmap, trp, |
|
761 addrevisioncb=onchangelog) |
|
762 efiles = len(efiles) |
|
763 |
758 if not (srccontent or emptyok): |
764 if not (srccontent or emptyok): |
759 raise util.Abort(_("received changelog group is empty")) |
765 raise util.Abort(_("received changelog group is empty")) |
760 clend = len(cl) |
766 clend = len(cl) |
761 changesets = clend - clstart |
767 changesets = clend - clstart |
762 for c in xrange(clstart, clend): |
|
763 efiles.update(repo[c].files()) |
|
764 efiles = len(efiles) |
|
765 repo.ui.progress(_('changesets'), None) |
768 repo.ui.progress(_('changesets'), None) |
766 |
769 |
767 # pull off the manifest group |
770 # pull off the manifest group |
768 repo.ui.status(_("adding manifests\n")) |
771 repo.ui.status(_("adding manifests\n")) |
769 # manifests <= changesets |
772 # manifests <= changesets |