Skip to content
Snippets Groups Projects
Commit c8666a9e authored by Gregory Szorc's avatar Gregory Szorc
Browse files

upgrade: sniff for filelog type

The upgrade code should never encounter a vanilla revlog
instance: only changelog, manifestrevlog, and filelog should
be seen.

The previous code assumed !changelog & !manifestrevlog meant
file data. So this change feels pretty safe. If nothing else, it
will help tease out typing issues.

Differential Revision: https://phab.mercurial-scm.org/D3152
parent 65250a66
No related branches found
No related tags found
No related merge requests found
......@@ -480,8 +480,8 @@
mrevcount += len(rl)
msrcsize += datasize
mrawsize += rawsize
elif isinstance(rl, revlog.revlog):
elif isinstance(rl, filelog.filelog):
fcount += 1
frevcount += len(rl)
fsrcsize += datasize
frawsize += rawsize
......@@ -484,7 +484,9 @@
fcount += 1
frevcount += len(rl)
fsrcsize += datasize
frawsize += rawsize
else:
error.ProgrammingError('unknown revlog type')
if not revcount:
return
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment