Patchwork D3152: upgrade: sniff for filelog type

login
register
mail settings
Submitter phabricator
Date April 7, 2018, 1:23 a.m.
Message ID <95caa6d78995ca3d9809b04da9088804@localhost.localdomain>
Download mbox | patch
Permalink /patch/30507/
State Not Applicable
Headers show

Comments

phabricator - April 7, 2018, 1:23 a.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGc8666a9e9e11: upgrade: sniff for filelog type (authored by indygreg, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D3152?vs=7766&id=7850

REVISION DETAIL
  https://phab.mercurial-scm.org/D3152

AFFECTED FILES
  mercurial/upgrade.py

CHANGE DETAILS




To: indygreg, #hg-reviewers, durin42
Cc: mercurial-devel

Patch

diff --git a/mercurial/upgrade.py b/mercurial/upgrade.py
--- a/mercurial/upgrade.py
+++ b/mercurial/upgrade.py
@@ -480,11 +480,13 @@ 
             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
+        else:
+            error.ProgrammingError('unknown revlog type')
 
     if not revcount:
         return