##// END OF EJS Templates
largefiles: allow to run 'debugupgraderepo' on repo with largefiles...
Boris Feld -
r35304:67b7e39b default
parent child Browse files
Show More
@@ -1470,3 +1470,9 b' def scmutilmarktouched(orig, repo, files'
1470 printmessage=False, normallookup=True)
1470 printmessage=False, normallookup=True)
1471
1471
1472 return result
1472 return result
1473
1474 def upgraderequirements(orig, repo):
1475 reqs = orig(repo)
1476 if 'largefiles' in repo.requirements:
1477 reqs.add('largefiles')
1478 return reqs
@@ -30,6 +30,7 b' from mercurial import ('
30 scmutil,
30 scmutil,
31 sshpeer,
31 sshpeer,
32 subrepo,
32 subrepo,
33 upgrade,
33 wireproto,
34 wireproto,
34 )
35 )
35
36
@@ -60,6 +61,12 b' def uisetup(ui):'
60
61
61 extensions.wrapfunction(copies, 'pathcopies', overrides.copiespathcopies)
62 extensions.wrapfunction(copies, 'pathcopies', overrides.copiespathcopies)
62
63
64 extensions.wrapfunction(upgrade, 'preservedrequirements',
65 overrides.upgraderequirements)
66
67 extensions.wrapfunction(upgrade, 'supporteddestrequirements',
68 overrides.upgraderequirements)
69
63 # Subrepos call status function
70 # Subrepos call status function
64 entry = extensions.wrapcommand(commands.table, 'status',
71 entry = extensions.wrapcommand(commands.table, 'status',
65 overrides.overridestatus)
72 overrides.overridestatus)
@@ -352,3 +352,62 b" store files with special filenames aren'"
352 the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified
352 the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified
353
353
354 $ cd ..
354 $ cd ..
355
356 Check upgrading a large file repository
357 ---------------------------------------
358
359 $ hg init largefilesrepo
360 $ cat << EOF >> largefilesrepo/.hg/hgrc
361 > [extensions]
362 > largefiles =
363 > EOF
364
365 $ cd largefilesrepo
366 $ touch foo
367 $ hg add --large foo
368 $ hg -q commit -m initial
369 $ cat .hg/requires
370 dotencode
371 fncache
372 generaldelta
373 largefiles
374 revlogv1
375 store
376
377 $ hg debugupgraderepo --run
378 upgrade will perform the following actions:
379
380 requirements
381 preserved: dotencode, fncache, generaldelta, largefiles, revlogv1, store
382
383 beginning upgrade...
384 repository locked and read-only
385 creating temporary repository to stage migrated data: $TESTTMP/largefilesrepo/.hg/upgrade.* (glob)
386 (it is safe to interrupt this process any time before data migration completes)
387 migrating 3 total revisions (1 in filelogs, 1 in manifests, 1 in changelog)
388 migrating 163 bytes in store; 160 bytes tracked data
389 migrating 1 filelogs containing 1 revisions (42 bytes in store; 41 bytes tracked data)
390 finished migrating 1 filelog revisions across 1 filelogs; change in size: 0 bytes
391 migrating 1 manifests containing 1 revisions (52 bytes in store; 51 bytes tracked data)
392 finished migrating 1 manifest revisions across 1 manifests; change in size: 0 bytes
393 migrating changelog containing 1 revisions (69 bytes in store; 68 bytes tracked data)
394 finished migrating 1 changelog revisions; change in size: 0 bytes
395 finished migrating 3 total revisions; total change in store size: 0 bytes
396 copying phaseroots
397 data fully migrated to temporary repository
398 marking source repository as being upgraded; clients will be unable to read from repository
399 starting in-place swap of repository data
400 replaced files will be backed up at $TESTTMP/largefilesrepo/.hg/upgradebackup.* (glob)
401 replacing store...
402 store replacement complete; repository was inconsistent for 0.0s
403 finalizing requirements file and making repository readable again
404 removing temporary repository $TESTTMP/largefilesrepo/.hg/upgrade.* (glob)
405 copy of old repository backed up at $TESTTMP/largefilesrepo/.hg/upgradebackup.* (glob)
406 the old repository will not be deleted; remove it to free up disk space once the upgraded repository is verified
407 $ cat .hg/requires
408 dotencode
409 fncache
410 generaldelta
411 largefiles
412 revlogv1
413 store
General Comments 0
You need to be logged in to leave comments. Login now