Show More
@@ -109,6 +109,11 b' def lfconvert(ui, src, dest, *pats, **op' | |||||
109 | except OSError: |
|
109 | except OSError: | |
110 | pass |
|
110 | pass | |
111 |
|
111 | |||
|
112 | # If there were any files converted to largefiles, add largefiles | |||
|
113 | # to the destination repository's requirements. | |||
|
114 | if lfiles: | |||
|
115 | rdst.requirements.add('largefiles') | |||
|
116 | rdst._writerequirements() | |||
112 | else: |
|
117 | else: | |
113 | for ctx in ctxs: |
|
118 | for ctx in ctxs: | |
114 | ui.progress(_('converting revisions'), ctx.rev(), |
|
119 | ui.progress(_('converting revisions'), ctx.rev(), |
@@ -661,3 +661,27 b' also been very problematic).' | |||||
661 | large6-modified |
|
661 | large6-modified | |
662 | $ cat sub2/large7 |
|
662 | $ cat sub2/large7 | |
663 | large7 |
|
663 | large7 | |
|
664 | $ cd .. | |||
|
665 | ||||
|
666 | Verify that lfconvert adds 'largefiles' to .hg/requires | |||
|
667 | $ hg init bigfile-repo | |||
|
668 | $ cd bigfile-repo | |||
|
669 | $ dd if=/dev/zero bs=1k count=23k > a-large-file 2> /dev/null | |||
|
670 | $ hg addremove | |||
|
671 | adding a-large-file | |||
|
672 | a-large-file: up to 72 MB of RAM may be required to manage this file | |||
|
673 | (use 'hg revert a-large-file' to cancel the pending addition) | |||
|
674 | $ hg commit -m "Commit file without making it be a largefile" | |||
|
675 | $ find .hg/largefiles | |||
|
676 | .hg/largefiles | |||
|
677 | $ cd .. | |||
|
678 | $ hg lfconvert --size 10 bigfile-repo largefiles-repo | |||
|
679 | initializing destination largefiles-repo | |||
|
680 | $ cat largefiles-repo/.hg/requires | |||
|
681 | largefiles | |||
|
682 | revlogv1 | |||
|
683 | fncache | |||
|
684 | store | |||
|
685 | dotencode | |||
|
686 | $ rm -rf bigfile-repo largefiles-repo | |||
|
687 |
General Comments 0
You need to be logged in to leave comments.
Login now