Show More
@@ -4269,7 +4269,7 b' def merge(ui, repo, node=None, **opts):' | |||||
4269 | hint=_("run 'hg heads .' to see heads")) |
|
4269 | hint=_("run 'hg heads .' to see heads")) | |
4270 |
|
4270 | |||
4271 | parent = repo.dirstate.p1() |
|
4271 | parent = repo.dirstate.p1() | |
4272 |
if len(nbhs) |
|
4272 | if len(nbhs) <= 1: | |
4273 | if len(bheads) > 1: |
|
4273 | if len(bheads) > 1: | |
4274 | raise util.Abort(_("heads are bookmarked - " |
|
4274 | raise util.Abort(_("heads are bookmarked - " | |
4275 | "please merge with an explicit rev"), |
|
4275 | "please merge with an explicit rev"), |
@@ -120,6 +120,7 b' def _verify(repo):' | |||||
120 | havemf = len(mf) > 0 |
|
120 | havemf = len(mf) > 0 | |
121 |
|
121 | |||
122 | ui.status(_("checking changesets\n")) |
|
122 | ui.status(_("checking changesets\n")) | |
|
123 | hasmanifest = False | |||
123 | seen = {} |
|
124 | seen = {} | |
124 | checklog(cl, "changelog", 0) |
|
125 | checklog(cl, "changelog", 0) | |
125 | total = len(repo) |
|
126 | total = len(repo) | |
@@ -130,16 +131,22 b' def _verify(repo):' | |||||
130 |
|
131 | |||
131 | try: |
|
132 | try: | |
132 | changes = cl.read(n) |
|
133 | changes = cl.read(n) | |
133 | mflinkrevs.setdefault(changes[0], []).append(i) |
|
134 | if changes[0] != nullid: | |
|
135 | mflinkrevs.setdefault(changes[0], []).append(i) | |||
|
136 | hasmanifest = True | |||
134 | for f in changes[3]: |
|
137 | for f in changes[3]: | |
135 | filelinkrevs.setdefault(f, []).append(i) |
|
138 | filelinkrevs.setdefault(f, []).append(i) | |
136 | except Exception, inst: |
|
139 | except Exception, inst: | |
|
140 | hasmanifest = True | |||
137 | exc(i, _("unpacking changeset %s") % short(n), inst) |
|
141 | exc(i, _("unpacking changeset %s") % short(n), inst) | |
138 | ui.progress(_('checking'), None) |
|
142 | ui.progress(_('checking'), None) | |
139 |
|
143 | |||
140 | ui.status(_("checking manifests\n")) |
|
144 | ui.status(_("checking manifests\n")) | |
141 | seen = {} |
|
145 | seen = {} | |
142 | checklog(mf, "manifest", 0) |
|
146 | if hasmanifest: | |
|
147 | # Do not check manifest if there are only changelog entries with | |||
|
148 | # null manifests. | |||
|
149 | checklog(mf, "manifest", 0) | |||
143 | total = len(mf) |
|
150 | total = len(mf) | |
144 | for i in mf: |
|
151 | for i in mf: | |
145 | ui.progress(_('checking'), i, total=total, unit=_('manifests')) |
|
152 | ui.progress(_('checking'), i, total=total, unit=_('manifests')) |
@@ -61,10 +61,22 b' introduce some bugs in repo' | |||||
61 | $ cd ../../.. |
|
61 | $ cd ../../.. | |
62 | $ cd .. |
|
62 | $ cd .. | |
63 |
|
63 | |||
64 | test revlog corruption |
|
64 | test changelog without a manifest | |
65 |
|
65 | |||
66 | $ hg init b |
|
66 | $ hg init b | |
67 | $ cd b |
|
67 | $ cd b | |
|
68 | $ hg branch foo | |||
|
69 | marked working directory as branch foo | |||
|
70 | (branches are permanent and global, did you want a bookmark?) | |||
|
71 | $ hg ci -m branchfoo | |||
|
72 | $ hg verify | |||
|
73 | checking changesets | |||
|
74 | checking manifests | |||
|
75 | crosschecking files in changesets and manifests | |||
|
76 | checking files | |||
|
77 | 0 files, 1 changesets, 0 total revisions | |||
|
78 | ||||
|
79 | test revlog corruption | |||
68 |
|
80 | |||
69 | $ touch a |
|
81 | $ touch a | |
70 | $ hg add a |
|
82 | $ hg add a | |
@@ -79,12 +91,12 b' test revlog corruption' | |||||
79 | checking manifests |
|
91 | checking manifests | |
80 | crosschecking files in changesets and manifests |
|
92 | crosschecking files in changesets and manifests | |
81 | checking files |
|
93 | checking files | |
82 |
a@ |
|
94 | a@1: broken revlog! (index data/a.i is corrupted) | |
83 | warning: orphan revlog 'data/a.i' |
|
95 | warning: orphan revlog 'data/a.i' | |
84 |
1 files, |
|
96 | 1 files, 2 changesets, 0 total revisions | |
85 | 1 warnings encountered! |
|
97 | 1 warnings encountered! | |
86 | 1 integrity errors encountered! |
|
98 | 1 integrity errors encountered! | |
87 |
(first damaged changeset appears to be |
|
99 | (first damaged changeset appears to be 1) | |
88 | [1] |
|
100 | [1] | |
89 |
|
101 | |||
90 | $ cd .. |
|
102 | $ cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now