##// END OF EJS Templates
lfs: add a switch to `hg verify` to ignore the content of blobs...
Matt Harbison -
r44528:34e8305f default
parent child Browse files
Show More
@@ -402,3 +402,24 b' def debuglfsupload(ui, repo, **opts):'
402 revs = opts.get('rev', [])
402 revs = opts.get('rev', [])
403 pointers = wrapper.extractpointers(repo, scmutil.revrange(repo, revs))
403 pointers = wrapper.extractpointers(repo, scmutil.revrange(repo, revs))
404 wrapper.uploadblobs(repo, pointers)
404 wrapper.uploadblobs(repo, pointers)
405
406
407 @eh.wrapcommand(
408 b'verify', opts=[(b'', b'no-lfs', None, _(b'skip all lfs blob content'))]
409 )
410 def verify(orig, ui, repo, **opts):
411 skipflags = repo.ui.configint(b'verify', b'skipflags')
412 no_lfs = opts.pop('no_lfs')
413
414 if skipflags:
415 # --lfs overrides the config bit, if set.
416 if no_lfs is False:
417 skipflags &= ~repository.REVISION_FLAG_EXTSTORED
418 else:
419 skipflags = 0
420
421 if no_lfs is True:
422 skipflags |= repository.REVISION_FLAG_EXTSTORED
423
424 with ui.configoverride({(b'verify', b'skipflags'): skipflags}):
425 return orig(ui, repo, **opts)
@@ -796,6 +796,27 b" because they aren't accessed."
796 $ test -f fromcorrupt/.hg/store/lfs/objects/66/100b384bf761271b407d79fc30cdd0554f3b2c5d944836e936d584b88ce88e
796 $ test -f fromcorrupt/.hg/store/lfs/objects/66/100b384bf761271b407d79fc30cdd0554f3b2c5d944836e936d584b88ce88e
797 [1]
797 [1]
798
798
799 Verify will not try to download lfs blobs, if told not to process lfs content
800
801 $ hg -R fromcorrupt --config lfs.usercache=emptycache verify -v --no-lfs
802 repository uses revlog format 1
803 checking changesets
804 checking manifests
805 crosschecking files in changesets and manifests
806 checking files
807 checked 5 changesets with 10 changes to 4 files
808
809 Verify will not try to download lfs blobs, if told not to by the config option
810
811 $ hg -R fromcorrupt --config lfs.usercache=emptycache verify -v \
812 > --config verify.skipflags=8192
813 repository uses revlog format 1
814 checking changesets
815 checking manifests
816 crosschecking files in changesets and manifests
817 checking files
818 checked 5 changesets with 10 changes to 4 files
819
799 Verify will copy/link all lfs objects into the local store that aren't already
820 Verify will copy/link all lfs objects into the local store that aren't already
800 present. Bypass the corrupted usercache to show that verify works when fed by
821 present. Bypass the corrupted usercache to show that verify works when fed by
801 the (uncorrupted) remote store.
822 the (uncorrupted) remote store.
General Comments 0
You need to be logged in to leave comments. Login now