indygreg created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  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.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  mercurial/upgrade.py

CHANGE DETAILS

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



To: indygreg, #hg-reviewers
Cc: mercurial-devel
_______________________________________________
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Reply via email to