Show More
@@ -717,3 +717,47 b' def has_xdiff():' | |||
|
717 | 717 | return bdiff.xdiffblocks(b'', b'') == [(0, 0, 0, 0)] |
|
718 | 718 | except (ImportError, AttributeError): |
|
719 | 719 | return False |
|
720 | ||
|
721 | def getrepofeatures(): | |
|
722 | """Obtain set of repository features in use. | |
|
723 | ||
|
724 | HGREPOFEATURES can be used to define or remove features. It contains | |
|
725 | a space-delimited list of feature strings. Strings beginning with ``-`` | |
|
726 | mean to remove. | |
|
727 | """ | |
|
728 | # Default list provided by core. | |
|
729 | features = { | |
|
730 | 'revlogstore', | |
|
731 | } | |
|
732 | ||
|
733 | # Features that imply other features. | |
|
734 | implies = { | |
|
735 | 'simplestore': ['-revlogstore'], | |
|
736 | } | |
|
737 | ||
|
738 | for override in os.environ.get('HGREPOFEATURES', '').split(' '): | |
|
739 | if not override: | |
|
740 | continue | |
|
741 | ||
|
742 | if override.startswith('-'): | |
|
743 | if override[1:] in features: | |
|
744 | features.remove(override[1:]) | |
|
745 | else: | |
|
746 | features.add(override) | |
|
747 | ||
|
748 | for imply in implies.get(override, []): | |
|
749 | if imply.startswith('-'): | |
|
750 | if imply[1:] in features: | |
|
751 | features.remove(imply[1:]) | |
|
752 | else: | |
|
753 | features.add(imply) | |
|
754 | ||
|
755 | return features | |
|
756 | ||
|
757 | @check('reporevlogstore', 'repository using the default revlog store') | |
|
758 | def has_reporevlogstore(): | |
|
759 | return 'revlogstore' in getrepofeatures() | |
|
760 | ||
|
761 | @check('reposimplestore', 'repository using simple storage extension') | |
|
762 | def has_reposimplestore(): | |
|
763 | return 'simplestore' in getrepofeatures() |
@@ -5,6 +5,11 b'' | |||
|
5 | 5 | # This software may be used and distributed according to the terms of the |
|
6 | 6 | # GNU General Public License version 2 or any later version. |
|
7 | 7 | |
|
8 | # To use this with the test suite: | |
|
9 | # | |
|
10 | # $ HGREPOFEATURES="simplestore" ./run-tests.py \ | |
|
11 | # --extra-config-opt extensions.simplestore=`pwd`/simplestorerepo.py | |
|
12 | ||
|
8 | 13 | from __future__ import absolute_import |
|
9 | 14 | |
|
10 | 15 | from mercurial.i18n import _ |
@@ -28,12 +28,14 b' Create a non-inlined filelog:' | |||
|
28 | 28 | |
|
29 | 29 | List files in store/data (should show a 'b.d'): |
|
30 | 30 | |
|
31 | #if reporevlogstore | |
|
31 | 32 | $ for i in .hg/store/data/*; do |
|
32 | 33 | > echo $i |
|
33 | 34 | > done |
|
34 | 35 | .hg/store/data/a.i |
|
35 | 36 | .hg/store/data/b.d |
|
36 | 37 | .hg/store/data/b.i |
|
38 | #endif | |
|
37 | 39 | |
|
38 | 40 | Trigger branchcache creation: |
|
39 | 41 |
@@ -158,7 +158,9 b' perfstatus' | |||
|
158 | 158 | $ hg perfpathcopies 1 2 |
|
159 | 159 | $ hg perfrawfiles 2 |
|
160 | 160 | $ hg perfrevlogindex -c |
|
161 | #if reporevlogstore | |
|
161 | 162 | $ hg perfrevlogrevisions .hg/store/data/a.i |
|
163 | #endif | |
|
162 | 164 | $ hg perfrevlogrevision -m 0 |
|
163 | 165 | $ hg perfrevlogchunks -c |
|
164 | 166 | $ hg perfrevrange |
@@ -516,8 +516,14 b' testing: convert must not produce duplic' | |||
|
516 | 516 | contents of fncache file: |
|
517 | 517 | |
|
518 | 518 | $ cat b/.hg/store/fncache | sort |
|
519 | data/a.i | |
|
520 | data/b.i | |
|
519 | data/a.i (reporevlogstore !) | |
|
520 | data/b.i (reporevlogstore !) | |
|
521 | data/a/0f3078c2d7345d887b54f7c9dab0d91bfa57fd07 (reposimplestore !) | |
|
522 | data/a/4271c3e84237016935a176b6f282fde2128458b0 (reposimplestore !) | |
|
523 | data/a/b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3 (reposimplestore !) | |
|
524 | data/a/index (reposimplestore !) | |
|
525 | data/b/37d9b5d994eab34eda9c16b195ace52c7b129980 (reposimplestore !) | |
|
526 | data/b/index (reposimplestore !) | |
|
521 | 527 | |
|
522 | 528 | test bogus URL |
|
523 | 529 |
@@ -86,8 +86,10 b' this should show the rename information ' | |||
|
86 | 86 | copy: a |
|
87 | 87 | copyrev: b789fdd96dc2f3bd229c1dd8eedf0fc60e2b68e3 |
|
88 | 88 | |
|
89 | #if reporevlogstore | |
|
89 | 90 | $ md5sum.py .hg/store/data/b.i |
|
90 | 91 | 44913824c8f5890ae218f9829535922e .hg/store/data/b.i |
|
92 | #endif | |
|
91 | 93 | $ hg cat b > bsum |
|
92 | 94 | $ md5sum.py bsum |
|
93 | 95 | 60b725f10c9c85c70d97880dfe8191b3 bsum |
@@ -1,4 +1,4 b'' | |||
|
1 | #require hardlink | |
|
1 | #require hardlink reporevlogstore | |
|
2 | 2 | |
|
3 | 3 | $ cat > nlinks.py <<EOF |
|
4 | 4 | > from __future__ import print_function |
@@ -16,7 +16,8 b' url for proxy, stream' | |||
|
16 | 16 | |
|
17 | 17 | $ http_proxy=http://localhost:$HGPORT1/ hg --config http_proxy.always=True clone --stream http://localhost:$HGPORT/ b |
|
18 | 18 | streaming all changes |
|
19 | 3 files to transfer, 303 bytes of data | |
|
19 | 3 files to transfer, 303 bytes of data (reporevlogstore !) | |
|
20 | 4 files to transfer, 330 bytes of data (reposimplestore !) | |
|
20 | 21 | transferred * bytes in * seconds (*/sec) (glob) |
|
21 | 22 | searching for changes |
|
22 | 23 | no changes found |
@@ -153,7 +153,7 b' Specifying a revset that evaluates to nu' | |||
|
153 | 153 | uncompressed size of bundle content: |
|
154 | 154 | 352 (changelog) |
|
155 | 155 | 326 (manifests) |
|
156 |
25 |
|
|
156 | 25\d foo (re) | |
|
157 | 157 | adding changesets |
|
158 | 158 | adding manifests |
|
159 | 159 | adding file changes |
@@ -73,6 +73,8 b' clone and pull to break links' | |||
|
73 | 73 | |
|
74 | 74 | relink |
|
75 | 75 | |
|
76 | #if no-reposimplestore | |
|
77 | ||
|
76 | 78 | $ hg relink --debug --config progress.debug=true | fix_path |
|
77 | 79 | relinking $TESTTMP/repo/.hg/store to $TESTTMP/clone/.hg/store |
|
78 | 80 | tip has 2 files, estimated total number of files: 3 |
@@ -101,3 +103,4 b' check hardlinks' | |||
|
101 | 103 | $ $PYTHON arelinked.py repo/.hg/store/data/b.i clone/.hg/store/data/b.i |
|
102 | 104 | repo/.hg/store/data/b.i != clone/.hg/store/data/b.i |
|
103 | 105 | |
|
106 | #endif |
@@ -448,6 +448,7 b' verify fncache is kept up-to-date' | |||
|
448 | 448 | $ cat .hg/store/fncache | sort |
|
449 | 449 | data/a.i |
|
450 | 450 | data/bar.i |
|
451 | ||
|
451 | 452 | $ hg strip tip |
|
452 | 453 | 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
|
453 | 454 | saved backup bundle to $TESTTMP/test/.hg/strip-backup/*-backup.hg (glob) |
@@ -34,6 +34,7 b" Preparing the 'sub1' repo which depends " | |||
|
34 | 34 | linking [ <=> ] 4\r (no-eol) (esc) |
|
35 | 35 | linking [ <=> ] 5\r (no-eol) (esc) |
|
36 | 36 | linking [ <=> ] 6\r (no-eol) (esc) |
|
37 | linking [ <=> ] 7\r (no-eol) (esc) (reposimplestore !) | |
|
37 | 38 | \r (no-eol) (esc) |
|
38 | 39 | \r (no-eol) (esc) |
|
39 | 40 | updating [===========================================>] 1/1\r (no-eol) (esc) |
@@ -60,6 +61,9 b" Preparing the 'main' repo which depends " | |||
|
60 | 61 | linking [ <=> ] 6\r (no-eol) (esc) |
|
61 | 62 | linking [ <=> ] 7\r (no-eol) (esc) |
|
62 | 63 | linking [ <=> ] 8\r (no-eol) (esc) |
|
64 | linking [ <=> ] 9\r (no-eol) (esc) (reposimplestore !) | |
|
65 | linking [ <=> ] 10\r (no-eol) (esc) (reposimplestore !) | |
|
66 | linking [ <=> ] 11\r (no-eol) (esc) (reposimplestore !) | |
|
63 | 67 | \r (no-eol) (esc) |
|
64 | 68 | \r (no-eol) (esc) |
|
65 | 69 | updating [===========================================>] 3/3\r (no-eol) (esc) |
@@ -71,6 +75,7 b" Preparing the 'main' repo which depends " | |||
|
71 | 75 | linking [ <=> ] 4\r (no-eol) (esc) |
|
72 | 76 | linking [ <=> ] 5\r (no-eol) (esc) |
|
73 | 77 | linking [ <=> ] 6\r (no-eol) (esc) |
|
78 | linking [ <=> ] 7\r (no-eol) (esc) (reposimplestore !) | |
|
74 | 79 | updating [===========================================>] 1/1\r (no-eol) (esc) |
|
75 | 80 | \r (no-eol) (esc) |
|
76 | 81 | updating to branch default |
@@ -161,6 +166,9 b' Clone main' | |||
|
161 | 166 | linking [ <=> ] 6\r (no-eol) (esc) |
|
162 | 167 | linking [ <=> ] 7\r (no-eol) (esc) |
|
163 | 168 | linking [ <=> ] 8\r (no-eol) (esc) |
|
169 | linking [ <=> ] 9\r (no-eol) (esc) (reposimplestore !) | |
|
170 | linking [ <=> ] 10\r (no-eol) (esc) (reposimplestore !) | |
|
171 | linking [ <=> ] 11\r (no-eol) (esc) (reposimplestore !) | |
|
164 | 172 | \r (no-eol) (esc) |
|
165 | 173 | \r (no-eol) (esc) |
|
166 | 174 | updating [===========================================>] 3/3\r (no-eol) (esc) |
@@ -174,15 +182,25 b' Clone main' | |||
|
174 | 182 | linking [ <=> ] 6\r (no-eol) (esc) |
|
175 | 183 | linking [ <=> ] 7\r (no-eol) (esc) |
|
176 | 184 | linking [ <=> ] 8\r (no-eol) (esc) |
|
185 | linking [ <=> ] 9\r (no-eol) (esc) (reposimplestore !) | |
|
186 | linking [ <=> ] 10\r (no-eol) (esc) (reposimplestore !) | |
|
187 | linking [ <=> ] 11\r (no-eol) (esc) (reposimplestore !) | |
|
177 | 188 | updating [===========================================>] 3/3\r (no-eol) (esc) |
|
178 | 189 | \r (no-eol) (esc) |
|
179 | 190 | \r (no-eol) (esc) |
|
180 | linking [ <=> ] 1\r (no-eol) (esc) | |
|
181 | linking [ <=> ] 2\r (no-eol) (esc) | |
|
182 | linking [ <=> ] 3\r (no-eol) (esc) | |
|
183 | linking [ <=> ] 4\r (no-eol) (esc) | |
|
184 | linking [ <=> ] 5\r (no-eol) (esc) | |
|
185 | linking [ <=> ] 6\r (no-eol) (esc) | |
|
191 | linking [ <=> ] 1\r (no-eol) (esc) (no-reposimplestore !) | |
|
192 | linking [ <=> ] 2\r (no-eol) (esc) (no-reposimplestore !) | |
|
193 | linking [ <=> ] 3\r (no-eol) (esc) (no-reposimplestore !) | |
|
194 | linking [ <=> ] 4\r (no-eol) (esc) (no-reposimplestore !) | |
|
195 | linking [ <=> ] 5\r (no-eol) (esc) (no-reposimplestore !) | |
|
196 | linking [ <=> ] 6\r (no-eol) (esc) (no-reposimplestore !) | |
|
197 | linking [ <=> ] 1\r (no-eol) (esc) (reposimplestore !) | |
|
198 | linking [ <=> ] 2\r (no-eol) (esc) (reposimplestore !) | |
|
199 | linking [ <=> ] 3\r (no-eol) (esc) (reposimplestore !) | |
|
200 | linking [ <=> ] 4\r (no-eol) (esc) (reposimplestore !) | |
|
201 | linking [ <=> ] 5\r (no-eol) (esc) (reposimplestore !) | |
|
202 | linking [ <=> ] 6\r (no-eol) (esc) (reposimplestore !) | |
|
203 | linking [ <=> ] 7\r (no-eol) (esc) (reposimplestore !) | |
|
186 | 204 | updating [===========================================>] 1/1\r (no-eol) (esc) |
|
187 | 205 | \r (no-eol) (esc) |
|
188 | 206 | updating to branch default |
@@ -462,6 +462,11 b' cloned:' | |||
|
462 | 462 | linking [ <=> ] 6\r (no-eol) (esc) |
|
463 | 463 | linking [ <=> ] 7\r (no-eol) (esc) |
|
464 | 464 | linking [ <=> ] 8\r (no-eol) (esc) |
|
465 | linking [ <=> ] 9\r (no-eol) (esc) (reposimplestore !) | |
|
466 | linking [ <=> ] 10\r (no-eol) (esc) (reposimplestore !) | |
|
467 | linking [ <=> ] 11\r (no-eol) (esc) (reposimplestore !) | |
|
468 | linking [ <=> ] 12\r (no-eol) (esc) (reposimplestore !) | |
|
469 | linking [ <=> ] 13\r (no-eol) (esc) (reposimplestore !) | |
|
465 | 470 | \r (no-eol) (esc) |
|
466 | 471 | #else |
|
467 | 472 | $ hg clone -U . ../empty |
@@ -487,6 +492,13 b' cloned:' | |||
|
487 | 492 | linking [ <=> ] 6\r (no-eol) (esc) |
|
488 | 493 | linking [ <=> ] 7\r (no-eol) (esc) |
|
489 | 494 | linking [ <=> ] 8\r (no-eol) (esc) |
|
495 | linking [ <=> ] 9\r (no-eol) (esc) (reposimplestore !) | |
|
496 | linking [ <=> ] 10\r (no-eol) (esc) (reposimplestore !) | |
|
497 | linking [ <=> ] 11\r (no-eol) (esc) (reposimplestore !) | |
|
498 | linking [ <=> ] 12\r (no-eol) (esc) (reposimplestore !) | |
|
499 | linking [ <=> ] 13\r (no-eol) (esc) (reposimplestore !) | |
|
500 | linking [ <=> ] 14\r (no-eol) (esc) (reposimplestore !) | |
|
501 | linking [ <=> ] 15\r (no-eol) (esc) (reposimplestore !) | |
|
490 | 502 | \r (no-eol) (esc) |
|
491 | 503 | \r (no-eol) (esc) |
|
492 | 504 | archiving (foo) [ ] 0/3\r (no-eol) (esc) |
@@ -501,6 +513,9 b' cloned:' | |||
|
501 | 513 | linking [ <=> ] 4\r (no-eol) (esc) |
|
502 | 514 | linking [ <=> ] 5\r (no-eol) (esc) |
|
503 | 515 | linking [ <=> ] 6\r (no-eol) (esc) |
|
516 | linking [ <=> ] 7\r (no-eol) (esc) (reposimplestore !) | |
|
517 | linking [ <=> ] 8\r (no-eol) (esc) (reposimplestore !) | |
|
518 | linking [ <=> ] 9\r (no-eol) (esc) (reposimplestore !) | |
|
504 | 519 | \r (no-eol) (esc) |
|
505 | 520 | \r (no-eol) (esc) |
|
506 | 521 | archiving (foo/bar) [ ] 0/1\r (no-eol) (esc) |
General Comments 0
You need to be logged in to leave comments.
Login now