##// END OF EJS Templates
verify: tolerate repeated slashes in a converted repo (issue3665)...
Bryan O'Sullivan -
r17851:7aa73806 default
parent child Browse files
Show More
@@ -7,7 +7,7 b''
7
7
8 from node import nullid, short
8 from node import nullid, short
9 from i18n import _
9 from i18n import _
10 import os
10 import os, posixpath
11 import revlog, util, error
11 import revlog, util, error
12
12
13 def verify(repo):
13 def verify(repo):
@@ -236,7 +236,12 b' def _verify(repo):'
236 try:
236 try:
237 storefiles.remove(ff)
237 storefiles.remove(ff)
238 except KeyError:
238 except KeyError:
239 err(lr, _("missing revlog!"), ff)
239 # under hg < 2.4, convert didn't sanitize paths properly,
240 # so a converted repo may contain repeated slashes
241 try:
242 storefiles.remove(posixpath.normpath(ff))
243 except KeyError:
244 err(lr, _("missing revlog!"), ff)
240
245
241 checklog(fl, f, lr)
246 checklog(fl, f, lr)
242 seen = {}
247 seen = {}
@@ -226,10 +226,13 b' final file versions in this repo:'
226 9a7b52012991e4873687192c3e17e61ba3e837a3 644 foo
226 9a7b52012991e4873687192c3e17e61ba3e837a3 644 foo
227 $ hg --cwd foo-copied.repo debugrename copied
227 $ hg --cwd foo-copied.repo debugrename copied
228 copied renamed from foo:2ed2a3912a0b24502043eae84ee4b279c18b90dd
228 copied renamed from foo:2ed2a3912a0b24502043eae84ee4b279c18b90dd
229
230 ensure that the filemap contains duplicated slashes (issue3612)
231
229 $ cat > renames.fmap <<EOF
232 $ cat > renames.fmap <<EOF
230 > include dir
233 > include dir
231 > exclude dir/file2
234 > exclude dir/file2
232 > rename dir dir2
235 > rename dir dir2//dir3
233 > include foo
236 > include foo
234 > include copied
237 > include copied
235 > rename foo foo2
238 > rename foo foo2
@@ -255,12 +258,19 b' final file versions in this repo:'
255 |
258 |
256 o 1 "1: add bar quux; copy foo to copied" files: copied2
259 o 1 "1: add bar quux; copy foo to copied" files: copied2
257 |
260 |
258 o 0 "0: add foo baz dir/" files: dir2/file dir2/subdir/file3 foo2
261 o 0 "0: add foo baz dir/" files: dir2//dir3/file dir2//dir3/subdir/file3 foo2
259
262
263 $ hg -R renames.repo verify
264 checking changesets
265 checking manifests
266 crosschecking files in changesets and manifests
267 checking files
268 4 files, 5 changesets, 7 total revisions
269
260 $ hg -R renames.repo manifest --debug
270 $ hg -R renames.repo manifest --debug
261 d43feacba7a4f1f2080dde4a4b985bd8a0236d46 644 copied2
271 d43feacba7a4f1f2080dde4a4b985bd8a0236d46 644 copied2
262 3e20847584beff41d7cd16136b7331ab3d754be0 644 dir2/file
272 3e20847584beff41d7cd16136b7331ab3d754be0 644 dir2//dir3/file
263 5fe139720576e18e34bcc9f79174db8897c8afe9 644 dir2/subdir/file3
273 5fe139720576e18e34bcc9f79174db8897c8afe9 644 dir2//dir3/subdir/file3
264 9a7b52012991e4873687192c3e17e61ba3e837a3 644 foo2
274 9a7b52012991e4873687192c3e17e61ba3e837a3 644 foo2
265 $ hg --cwd renames.repo debugrename copied2
275 $ hg --cwd renames.repo debugrename copied2
266 copied2 renamed from foo2:2ed2a3912a0b24502043eae84ee4b279c18b90dd
276 copied2 renamed from foo2:2ed2a3912a0b24502043eae84ee4b279c18b90dd
General Comments 0
You need to be logged in to leave comments. Login now