Mercurial > hg
changeset 41179:77088fa862df
convert: add missing numcommits() override to hg sources
Otherwise, the progressbar in converter.walktree() gets None as its total during
the initial scan. (Though that seems harmless, and there are other foreign vcs
sources without this.)
author | Matt Harbison <matt_harbison@yahoo.com> |
---|---|
date | Wed, 09 Jan 2019 14:33:06 -0500 |
parents | 53327bfbf35d |
children | 69804c040a04 |
files | hgext/convert/filemap.py hgext/convert/hg.py tests/test-convert-filemap.t |
diffstat | 3 files changed, 7 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/convert/filemap.py Thu Jan 10 14:32:36 2019 -0800 +++ b/hgext/convert/filemap.py Wed Jan 09 14:33:06 2019 -0500 @@ -270,6 +270,9 @@ self.children[p] = self.children.get(p, 0) + 1 return c + def numcommits(self): + return self.base.numcommits() + def _cachedcommit(self, rev): if rev in self.commits: return self.commits[rev]
--- a/hgext/convert/hg.py Thu Jan 10 14:32:36 2019 -0800 +++ b/hgext/convert/hg.py Wed Jan 09 14:33:06 2019 -0500 @@ -597,6 +597,9 @@ saverev=self.saverev, phase=ctx.phase()) + def numcommits(self): + return len(self.repo) + def gettags(self): # This will get written to .hgtags, filter non global tags out. tags = [t for t in self.repo.tagslist()
--- a/tests/test-convert-filemap.t Thu Jan 10 14:32:36 2019 -0800 +++ b/tests/test-convert-filemap.t Wed Jan 09 14:33:06 2019 -0500 @@ -451,7 +451,7 @@ run hg source pre-conversion action run hg sink pre-conversion action scanning source... - scanning: 1 revisions + scanning: 1/7 revisions (14.29%) sorting... converting... 0 merging something