Mercurial > hg
changeset 2143:3053fc33f545
Show repo's revlog format on verify. Warn if some files use a different format.
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Thu, 27 Apr 2006 21:58:47 +0200 |
parents | 8a1e2a9c7013 |
children | b7225adb2e0b |
files | mercurial/localrepo.py tests/test-basic.out tests/test-clone-pull-corruption.out tests/test-clone-r.out tests/test-clone.out tests/test-copy.out tests/test-empty.out tests/test-excessive-merge.out tests/test-filebranch.out tests/test-permissions.out tests/test-pull-permission.out tests/test-pull-pull-corruption.out tests/test-pull-pull-corruption2.out tests/test-pull.out tests/test-push-r.out tests/test-simple-update.out tests/test-ssh.out tests/test-static-http.out tests/test-undo.out |
diffstat | 19 files changed, 66 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/localrepo.py Thu Apr 27 21:16:46 2006 +0200 +++ b/mercurial/localrepo.py Thu Apr 27 21:58:47 2006 +0200 @@ -1803,12 +1803,17 @@ filenodes = {} changesets = revisions = files = 0 errors = [0] + warnings = [0] neededmanifests = {} def err(msg): self.ui.warn(msg + "\n") errors[0] += 1 + def warn(msg): + self.ui.warn(msg + "\n") + warnings[0] += 1 + def checksize(obj, name): d = obj.checksize() if d[0]: @@ -1816,6 +1821,17 @@ if d[1]: err(_("%s index contains %d extra bytes") % (name, d[1])) + def checkversion(obj, name): + if obj.version != revlog.REVLOGV0: + if not revlogv1: + warn(_("warning: `%s' uses revlog format 1") % name) + elif revlogv1: + warn(_("warning: `%s' uses revlog format 0") % name) + + revlogv1 = self.revlogversion != revlog.REVLOGV0 + self.ui.status(_("repository uses revlog format %d\n") % + (revlogv1 and 1 or 0)) + seen = {} self.ui.status(_("checking changesets\n")) checksize(self.changelog, "changelog") @@ -1850,6 +1866,7 @@ seen = {} self.ui.status(_("checking manifests\n")) + checkversion(self.manifest, "manifest") checksize(self.manifest, "manifest") for i in range(self.manifest.count()): @@ -1914,6 +1931,7 @@ err(_("file without name in manifest %s") % short(n)) continue fl = self.file(f) + checkversion(fl, f) checksize(fl, f) nodes = {nullid: 1} @@ -1962,6 +1980,8 @@ self.ui.status(_("%d files, %d changesets, %d total revisions\n") % (files, changesets, revisions)) + if warnings[0]: + self.ui.warn(_("%d warnings encountered!\n") % warnings[0]) if errors[0]: self.ui.warn(_("%d integrity errors encountered!\n") % errors[0]) return 1
--- a/tests/test-basic.out Thu Apr 27 21:16:46 2006 +0200 +++ b/tests/test-basic.out Thu Apr 27 21:58:47 2006 +0200 @@ -6,6 +6,7 @@ b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3 644 a a +repository uses revlog format 0 checking changesets checking manifests crosschecking files in changesets and manifests
--- a/tests/test-clone-pull-corruption.out Thu Apr 27 21:16:46 2006 +0200 +++ b/tests/test-clone-pull-corruption.out Thu Apr 27 21:58:47 2006 +0200 @@ -8,6 +8,7 @@ adding file changes added 1 changesets with 1 changes to 1 files (run 'hg update' to get a working copy) +repository uses revlog format 0 checking changesets checking manifests crosschecking files in changesets and manifests
--- a/tests/test-clone-r.out Thu Apr 27 21:16:46 2006 +0200 +++ b/tests/test-clone-r.out Thu Apr 27 21:58:47 2006 +0200 @@ -17,6 +17,7 @@ 4 192 58 3 6 de68e904d169 626a32663c2f 000000000000 5 250 68 3 7 3b45cc2ab868 de68e904d169 000000000000 6 318 54 6 8 24d86153a002 f54c32f13478 000000000000 +repository uses revlog format 0 checking changesets checking manifests crosschecking files in changesets and manifests @@ -27,6 +28,7 @@ adding manifests adding file changes added 1 changesets with 1 changes to 1 files +repository uses revlog format 0 checking changesets checking manifests crosschecking files in changesets and manifests @@ -37,6 +39,7 @@ adding manifests adding file changes added 2 changesets with 2 changes to 1 files +repository uses revlog format 0 checking changesets checking manifests crosschecking files in changesets and manifests @@ -47,6 +50,7 @@ adding manifests adding file changes added 3 changesets with 3 changes to 1 files +repository uses revlog format 0 checking changesets checking manifests crosschecking files in changesets and manifests @@ -57,6 +61,7 @@ adding manifests adding file changes added 4 changesets with 4 changes to 1 files +repository uses revlog format 0 checking changesets checking manifests crosschecking files in changesets and manifests @@ -67,6 +72,7 @@ adding manifests adding file changes added 2 changesets with 2 changes to 1 files +repository uses revlog format 0 checking changesets checking manifests crosschecking files in changesets and manifests @@ -77,6 +83,7 @@ adding manifests adding file changes added 3 changesets with 3 changes to 1 files +repository uses revlog format 0 checking changesets checking manifests crosschecking files in changesets and manifests @@ -87,6 +94,7 @@ adding manifests adding file changes added 4 changesets with 5 changes to 2 files +repository uses revlog format 0 checking changesets checking manifests crosschecking files in changesets and manifests @@ -97,6 +105,7 @@ adding manifests adding file changes added 5 changesets with 6 changes to 3 files +repository uses revlog format 0 checking changesets checking manifests crosschecking files in changesets and manifests @@ -107,6 +116,7 @@ adding manifests adding file changes added 5 changesets with 5 changes to 2 files +repository uses revlog format 0 checking changesets checking manifests crosschecking files in changesets and manifests @@ -119,6 +129,7 @@ adding file changes added 4 changesets with 2 changes to 3 files (+1 heads) (run 'hg heads' to see heads, 'hg merge' to merge) +repository uses revlog format 0 checking changesets checking manifests crosschecking files in changesets and manifests
--- a/tests/test-clone.out Thu Apr 27 21:16:46 2006 +0200 +++ b/tests/test-clone.out Thu Apr 27 21:58:47 2006 +0200 @@ -1,10 +1,12 @@ a +repository uses revlog format 0 checking changesets checking manifests crosschecking files in changesets and manifests checking files 1 files, 1 changesets, 1 total revisions a not present +repository uses revlog format 0 checking changesets checking manifests crosschecking files in changesets and manifests
--- a/tests/test-copy.out Thu Apr 27 21:16:46 2006 +0200 +++ b/tests/test-copy.out Thu Apr 27 21:58:47 2006 +0200 @@ -44,6 +44,7 @@ 566e338d09a089ba737c21e0d3759980 .hg/data/b.d 60b725f10c9c85c70d97880dfe8191b3 bsum 60b725f10c9c85c70d97880dfe8191b3 asum +repository uses revlog format 0 checking changesets checking manifests crosschecking files in changesets and manifests
--- a/tests/test-empty.out Thu Apr 27 21:16:46 2006 +0200 +++ b/tests/test-empty.out Thu Apr 27 21:58:47 2006 +0200 @@ -1,3 +1,4 @@ +repository uses revlog format 0 checking changesets checking manifests crosschecking files in changesets and manifests
--- a/tests/test-excessive-merge.out Thu Apr 27 21:16:46 2006 +0200 +++ b/tests/test-excessive-merge.out Thu Apr 27 21:58:47 2006 +0200 @@ -52,6 +52,7 @@ rev offset length base linkrev nodeid p1 p2 0 0 5 0 0 2ed2a3912a0b 000000000000 000000000000 1 5 6 1 1 79d7492df40a 2ed2a3912a0b 000000000000 +repository uses revlog format 0 checking changesets checking manifests crosschecking files in changesets and manifests
--- a/tests/test-filebranch.out Thu Apr 27 21:16:46 2006 +0200 +++ b/tests/test-filebranch.out Thu Apr 27 21:58:47 2006 +0200 @@ -65,6 +65,7 @@ aa27919ee4303cfd575e1fb932dd64d75aa08be4 644 foo 6128c0f33108e8cfbb4e0824d13ae48b466d7280 644 quux everything should be clean now +repository uses revlog format 0 checking changesets checking manifests crosschecking files in changesets and manifests
--- a/tests/test-permissions.out Thu Apr 27 21:16:46 2006 +0200 +++ b/tests/test-permissions.out Thu Apr 27 21:58:47 2006 +0200 @@ -1,13 +1,16 @@ +repository uses revlog format 0 checking changesets checking manifests crosschecking files in changesets and manifests checking files 1 files, 1 changesets, 1 total revisions +repository uses revlog format 0 checking changesets checking manifests crosschecking files in changesets and manifests checking files verify failed +repository uses revlog format 0 checking changesets checking manifests crosschecking files in changesets and manifests
--- a/tests/test-pull-permission.out Thu Apr 27 21:16:46 2006 +0200 +++ b/tests/test-pull-permission.out Thu Apr 27 21:58:47 2006 +0200 @@ -3,6 +3,7 @@ adding manifests adding file changes added 1 changesets with 1 changes to 1 files +repository uses revlog format 0 checking changesets checking manifests crosschecking files in changesets and manifests
--- a/tests/test-pull-pull-corruption.out Thu Apr 27 21:16:46 2006 +0200 +++ b/tests/test-pull-pull-corruption.out Thu Apr 27 21:58:47 2006 +0200 @@ -17,6 +17,7 @@ adding file changes added 1 changesets with 1 changes to 1 files (+1 heads) (run 'hg heads' to see heads, 'hg merge' to merge) +repository uses revlog format 0 checking changesets checking manifests crosschecking files in changesets and manifests
--- a/tests/test-pull-pull-corruption2.out Thu Apr 27 21:16:46 2006 +0200 +++ b/tests/test-pull-pull-corruption2.out Thu Apr 27 21:58:47 2006 +0200 @@ -10,11 +10,13 @@ adding manifests adding file changes added 10 changesets with 10 changes to 1 files +repository uses revlog format 0 checking changesets checking manifests crosschecking files in changesets and manifests checking files 1 files, 10 changesets, 10 total revisions +repository uses revlog format 0 checking changesets checking manifests crosschecking files in changesets and manifests
--- a/tests/test-pull.out Thu Apr 27 21:16:46 2006 +0200 +++ b/tests/test-pull.out Thu Apr 27 21:58:47 2006 +0200 @@ -1,4 +1,5 @@ adding foo +repository uses revlog format 0 checking changesets checking manifests crosschecking files in changesets and manifests @@ -9,6 +10,7 @@ adding manifests adding file changes added 1 changesets with 1 changes to 1 files +repository uses revlog format 0 checking changesets checking manifests crosschecking files in changesets and manifests
--- a/tests/test-push-r.out Thu Apr 27 21:16:46 2006 +0200 +++ b/tests/test-push-r.out Thu Apr 27 21:58:47 2006 +0200 @@ -17,6 +17,7 @@ 4 192 58 3 6 de68e904d169 626a32663c2f 000000000000 5 250 68 3 7 3b45cc2ab868 de68e904d169 000000000000 6 318 54 6 8 24d86153a002 f54c32f13478 000000000000 +repository uses revlog format 0 checking changesets checking manifests crosschecking files in changesets and manifests @@ -28,6 +29,7 @@ adding manifests adding file changes added 1 changesets with 1 changes to 1 files +repository uses revlog format 0 checking changesets checking manifests crosschecking files in changesets and manifests @@ -39,6 +41,7 @@ adding manifests adding file changes added 2 changesets with 2 changes to 1 files +repository uses revlog format 0 checking changesets checking manifests crosschecking files in changesets and manifests @@ -50,6 +53,7 @@ adding manifests adding file changes added 3 changesets with 3 changes to 1 files +repository uses revlog format 0 checking changesets checking manifests crosschecking files in changesets and manifests @@ -61,6 +65,7 @@ adding manifests adding file changes added 4 changesets with 4 changes to 1 files +repository uses revlog format 0 checking changesets checking manifests crosschecking files in changesets and manifests @@ -72,6 +77,7 @@ adding manifests adding file changes added 2 changesets with 2 changes to 1 files +repository uses revlog format 0 checking changesets checking manifests crosschecking files in changesets and manifests @@ -83,6 +89,7 @@ adding manifests adding file changes added 3 changesets with 3 changes to 1 files +repository uses revlog format 0 checking changesets checking manifests crosschecking files in changesets and manifests @@ -94,6 +101,7 @@ adding manifests adding file changes added 4 changesets with 5 changes to 2 files +repository uses revlog format 0 checking changesets checking manifests crosschecking files in changesets and manifests @@ -105,6 +113,7 @@ adding manifests adding file changes added 5 changesets with 6 changes to 3 files +repository uses revlog format 0 checking changesets checking manifests crosschecking files in changesets and manifests @@ -116,6 +125,7 @@ adding manifests adding file changes added 5 changesets with 5 changes to 2 files +repository uses revlog format 0 checking changesets checking manifests crosschecking files in changesets and manifests @@ -128,6 +138,7 @@ adding file changes added 4 changesets with 2 changes to 3 files (+1 heads) (run 'hg heads' to see heads, 'hg merge' to merge) +repository uses revlog format 0 checking changesets checking manifests crosschecking files in changesets and manifests
--- a/tests/test-simple-update.out Thu Apr 27 21:16:46 2006 +0200 +++ b/tests/test-simple-update.out Thu Apr 27 21:58:47 2006 +0200 @@ -1,4 +1,5 @@ adding foo +repository uses revlog format 0 checking changesets checking manifests crosschecking files in changesets and manifests @@ -11,6 +12,7 @@ adding file changes added 1 changesets with 1 changes to 1 files (run 'hg update' to get a working copy) +repository uses revlog format 0 checking changesets checking manifests crosschecking files in changesets and manifests
--- a/tests/test-ssh.out Thu Apr 27 21:16:46 2006 +0200 +++ b/tests/test-ssh.out Thu Apr 27 21:58:47 2006 +0200 @@ -6,6 +6,7 @@ adding file changes added 1 changesets with 1 changes to 1 files # verify +repository uses revlog format 0 checking changesets checking manifests crosschecking files in changesets and manifests @@ -48,6 +49,7 @@ date: Mon Jan 12 13:46:40 1970 +0000 summary: add +repository uses revlog format 0 checking changesets checking manifests crosschecking files in changesets and manifests
--- a/tests/test-static-http.out Thu Apr 27 21:16:46 2006 +0200 +++ b/tests/test-static-http.out Thu Apr 27 21:58:47 2006 +0200 @@ -12,6 +12,7 @@ adding manifests adding file changes added 1 changesets with 1 changes to 1 files +repository uses revlog format 0 checking changesets checking manifests crosschecking files in changesets and manifests
--- a/tests/test-undo.out Thu Apr 27 21:16:46 2006 +0200 +++ b/tests/test-undo.out Thu Apr 27 21:58:47 2006 +0200 @@ -1,3 +1,4 @@ +repository uses revlog format 0 checking changesets checking manifests crosschecking files in changesets and manifests @@ -10,6 +11,7 @@ summary: test rolling back last transaction +repository uses revlog format 0 checking changesets checking manifests crosschecking files in changesets and manifests