Show More
@@ -1,34 +1,31 b'' | |||||
1 | # Blacklist for a full testsuite run with fsmonitor enabled. |
|
1 | # Blacklist for a full testsuite run with fsmonitor enabled. | |
2 | # Used by fsmonitor-run-tests. |
|
2 | # Used by fsmonitor-run-tests. | |
3 | # The following tests all fail because they either use extensions that conflict |
|
3 | # The following tests all fail because they either use extensions that conflict | |
4 | # with fsmonitor, use subrepositories, or don't anticipate the extra file in |
|
4 | # with fsmonitor, use subrepositories, or don't anticipate the extra file in | |
5 | # the .hg directory that fsmonitor adds. |
|
5 | # the .hg directory that fsmonitor adds. | |
6 | test-debugextensions.t |
|
6 | test-debugextensions.t | |
7 | test-eol-add.t |
|
7 | test-eol-add.t | |
8 | test-eol-clone.t |
|
8 | test-eol-clone.t | |
9 | test-eol-hook.t |
|
9 | test-eol-hook.t | |
10 | test-eol-patch.t |
|
10 | test-eol-patch.t | |
11 | test-eol-tag.t |
|
11 | test-eol-tag.t | |
12 | test-eol-update.t |
|
12 | test-eol-update.t | |
13 | test-eol.t |
|
13 | test-eol.t | |
14 | test-eolfilename.t |
|
14 | test-eolfilename.t | |
15 | test-extension.t |
|
15 | test-extension.t | |
16 | test-fncache.t |
|
|||
17 | test-hardlinks.t |
|
|||
18 | test-help.t |
|
16 | test-help.t | |
19 | test-inherit-mode.t |
|
|||
20 | test-issue3084.t |
|
17 | test-issue3084.t | |
21 | test-largefiles-cache.t |
|
18 | test-largefiles-cache.t | |
22 | test-largefiles-misc.t |
|
19 | test-largefiles-misc.t | |
23 | test-largefiles-small-disk.t |
|
20 | test-largefiles-small-disk.t | |
24 | test-largefiles-update.t |
|
21 | test-largefiles-update.t | |
25 | test-largefiles-wireproto.t |
|
22 | test-largefiles-wireproto.t | |
26 | test-largefiles.t |
|
23 | test-largefiles.t | |
27 | test-lfconvert.t |
|
24 | test-lfconvert.t | |
28 | test-nested-repo.t |
|
25 | test-nested-repo.t | |
29 | test-permissions.t |
|
26 | test-permissions.t | |
30 | test-push-warn.t |
|
27 | test-push-warn.t | |
31 | test-subrepo-deep-nested-change.t |
|
28 | test-subrepo-deep-nested-change.t | |
32 | test-subrepo-recursion.t |
|
29 | test-subrepo-recursion.t | |
33 | test-subrepo.t |
|
30 | test-subrepo.t | |
34 | test-tags.t |
|
31 | test-tags.t |
@@ -1,417 +1,419 b'' | |||||
1 | Init repo1: |
|
1 | Init repo1: | |
2 |
|
2 | |||
3 | $ hg init repo1 |
|
3 | $ hg init repo1 | |
4 | $ cd repo1 |
|
4 | $ cd repo1 | |
5 | $ echo "some text" > a |
|
5 | $ echo "some text" > a | |
6 | $ hg add |
|
6 | $ hg add | |
7 | adding a |
|
7 | adding a | |
8 | $ hg ci -m first |
|
8 | $ hg ci -m first | |
9 | $ cat .hg/store/fncache | sort |
|
9 | $ cat .hg/store/fncache | sort | |
10 | data/a.i |
|
10 | data/a.i | |
11 |
|
11 | |||
12 | Testing a.i/b: |
|
12 | Testing a.i/b: | |
13 |
|
13 | |||
14 | $ mkdir a.i |
|
14 | $ mkdir a.i | |
15 | $ echo "some other text" > a.i/b |
|
15 | $ echo "some other text" > a.i/b | |
16 | $ hg add |
|
16 | $ hg add | |
17 | adding a.i/b (glob) |
|
17 | adding a.i/b (glob) | |
18 | $ hg ci -m second |
|
18 | $ hg ci -m second | |
19 | $ cat .hg/store/fncache | sort |
|
19 | $ cat .hg/store/fncache | sort | |
20 | data/a.i |
|
20 | data/a.i | |
21 | data/a.i.hg/b.i |
|
21 | data/a.i.hg/b.i | |
22 |
|
22 | |||
23 | Testing a.i.hg/c: |
|
23 | Testing a.i.hg/c: | |
24 |
|
24 | |||
25 | $ mkdir a.i.hg |
|
25 | $ mkdir a.i.hg | |
26 | $ echo "yet another text" > a.i.hg/c |
|
26 | $ echo "yet another text" > a.i.hg/c | |
27 | $ hg add |
|
27 | $ hg add | |
28 | adding a.i.hg/c (glob) |
|
28 | adding a.i.hg/c (glob) | |
29 | $ hg ci -m third |
|
29 | $ hg ci -m third | |
30 | $ cat .hg/store/fncache | sort |
|
30 | $ cat .hg/store/fncache | sort | |
31 | data/a.i |
|
31 | data/a.i | |
32 | data/a.i.hg.hg/c.i |
|
32 | data/a.i.hg.hg/c.i | |
33 | data/a.i.hg/b.i |
|
33 | data/a.i.hg/b.i | |
34 |
|
34 | |||
35 | Testing verify: |
|
35 | Testing verify: | |
36 |
|
36 | |||
37 | $ hg verify |
|
37 | $ hg verify | |
38 | checking changesets |
|
38 | checking changesets | |
39 | checking manifests |
|
39 | checking manifests | |
40 | crosschecking files in changesets and manifests |
|
40 | crosschecking files in changesets and manifests | |
41 | checking files |
|
41 | checking files | |
42 | 3 files, 3 changesets, 3 total revisions |
|
42 | 3 files, 3 changesets, 3 total revisions | |
43 |
|
43 | |||
44 | $ rm .hg/store/fncache |
|
44 | $ rm .hg/store/fncache | |
45 |
|
45 | |||
46 | $ hg verify |
|
46 | $ hg verify | |
47 | checking changesets |
|
47 | checking changesets | |
48 | checking manifests |
|
48 | checking manifests | |
49 | crosschecking files in changesets and manifests |
|
49 | crosschecking files in changesets and manifests | |
50 | checking files |
|
50 | checking files | |
51 | warning: revlog 'data/a.i' not in fncache! |
|
51 | warning: revlog 'data/a.i' not in fncache! | |
52 | warning: revlog 'data/a.i.hg/c.i' not in fncache! |
|
52 | warning: revlog 'data/a.i.hg/c.i' not in fncache! | |
53 | warning: revlog 'data/a.i/b.i' not in fncache! |
|
53 | warning: revlog 'data/a.i/b.i' not in fncache! | |
54 | 3 files, 3 changesets, 3 total revisions |
|
54 | 3 files, 3 changesets, 3 total revisions | |
55 | 3 warnings encountered! |
|
55 | 3 warnings encountered! | |
56 | hint: run "hg debugrebuildfncache" to recover from corrupt fncache |
|
56 | hint: run "hg debugrebuildfncache" to recover from corrupt fncache | |
57 |
|
57 | |||
58 | Follow the hint to make sure it works |
|
58 | Follow the hint to make sure it works | |
59 |
|
59 | |||
60 | $ hg debugrebuildfncache |
|
60 | $ hg debugrebuildfncache | |
61 | adding data/a.i |
|
61 | adding data/a.i | |
62 | adding data/a.i.hg/c.i |
|
62 | adding data/a.i.hg/c.i | |
63 | adding data/a.i/b.i |
|
63 | adding data/a.i/b.i | |
64 | 3 items added, 0 removed from fncache |
|
64 | 3 items added, 0 removed from fncache | |
65 |
|
65 | |||
66 | $ hg verify |
|
66 | $ hg verify | |
67 | checking changesets |
|
67 | checking changesets | |
68 | checking manifests |
|
68 | checking manifests | |
69 | crosschecking files in changesets and manifests |
|
69 | crosschecking files in changesets and manifests | |
70 | checking files |
|
70 | checking files | |
71 | 3 files, 3 changesets, 3 total revisions |
|
71 | 3 files, 3 changesets, 3 total revisions | |
72 |
|
72 | |||
73 | $ cd .. |
|
73 | $ cd .. | |
74 |
|
74 | |||
75 | Non store repo: |
|
75 | Non store repo: | |
76 |
|
76 | |||
77 | $ hg --config format.usestore=False init foo |
|
77 | $ hg --config format.usestore=False init foo | |
78 | $ cd foo |
|
78 | $ cd foo | |
79 | $ mkdir tst.d |
|
79 | $ mkdir tst.d | |
80 | $ echo foo > tst.d/foo |
|
80 | $ echo foo > tst.d/foo | |
81 | $ hg ci -Amfoo |
|
81 | $ hg ci -Amfoo | |
82 | adding tst.d/foo |
|
82 | adding tst.d/foo | |
83 | $ find .hg | sort |
|
83 | $ find .hg | sort | |
84 | .hg |
|
84 | .hg | |
85 | .hg/00changelog.i |
|
85 | .hg/00changelog.i | |
86 | .hg/00manifest.i |
|
86 | .hg/00manifest.i | |
87 | .hg/cache |
|
87 | .hg/cache | |
88 | .hg/cache/branch2-served |
|
88 | .hg/cache/branch2-served | |
89 | .hg/cache/rbc-names-v1 |
|
89 | .hg/cache/rbc-names-v1 | |
90 | .hg/cache/rbc-revs-v1 |
|
90 | .hg/cache/rbc-revs-v1 | |
91 | .hg/data |
|
91 | .hg/data | |
92 | .hg/data/tst.d.hg |
|
92 | .hg/data/tst.d.hg | |
93 | .hg/data/tst.d.hg/foo.i |
|
93 | .hg/data/tst.d.hg/foo.i | |
94 | .hg/dirstate |
|
94 | .hg/dirstate | |
|
95 | .hg/fsmonitor.state (fsmonitor !) | |||
95 | .hg/last-message.txt |
|
96 | .hg/last-message.txt | |
96 | .hg/phaseroots |
|
97 | .hg/phaseroots | |
97 | .hg/requires |
|
98 | .hg/requires | |
98 | .hg/undo |
|
99 | .hg/undo | |
99 | .hg/undo.backup.dirstate |
|
100 | .hg/undo.backup.dirstate | |
100 | .hg/undo.backupfiles |
|
101 | .hg/undo.backupfiles | |
101 | .hg/undo.bookmarks |
|
102 | .hg/undo.bookmarks | |
102 | .hg/undo.branch |
|
103 | .hg/undo.branch | |
103 | .hg/undo.desc |
|
104 | .hg/undo.desc | |
104 | .hg/undo.dirstate |
|
105 | .hg/undo.dirstate | |
105 | .hg/undo.phaseroots |
|
106 | .hg/undo.phaseroots | |
106 | $ cd .. |
|
107 | $ cd .. | |
107 |
|
108 | |||
108 | Non fncache repo: |
|
109 | Non fncache repo: | |
109 |
|
110 | |||
110 | $ hg --config format.usefncache=False init bar |
|
111 | $ hg --config format.usefncache=False init bar | |
111 | $ cd bar |
|
112 | $ cd bar | |
112 | $ mkdir tst.d |
|
113 | $ mkdir tst.d | |
113 | $ echo foo > tst.d/Foo |
|
114 | $ echo foo > tst.d/Foo | |
114 | $ hg ci -Amfoo |
|
115 | $ hg ci -Amfoo | |
115 | adding tst.d/Foo |
|
116 | adding tst.d/Foo | |
116 | $ find .hg | sort |
|
117 | $ find .hg | sort | |
117 | .hg |
|
118 | .hg | |
118 | .hg/00changelog.i |
|
119 | .hg/00changelog.i | |
119 | .hg/cache |
|
120 | .hg/cache | |
120 | .hg/cache/branch2-served |
|
121 | .hg/cache/branch2-served | |
121 | .hg/cache/rbc-names-v1 |
|
122 | .hg/cache/rbc-names-v1 | |
122 | .hg/cache/rbc-revs-v1 |
|
123 | .hg/cache/rbc-revs-v1 | |
123 | .hg/dirstate |
|
124 | .hg/dirstate | |
|
125 | .hg/fsmonitor.state (fsmonitor !) | |||
124 | .hg/last-message.txt |
|
126 | .hg/last-message.txt | |
125 | .hg/requires |
|
127 | .hg/requires | |
126 | .hg/store |
|
128 | .hg/store | |
127 | .hg/store/00changelog.i |
|
129 | .hg/store/00changelog.i | |
128 | .hg/store/00manifest.i |
|
130 | .hg/store/00manifest.i | |
129 | .hg/store/data |
|
131 | .hg/store/data | |
130 | .hg/store/data/tst.d.hg |
|
132 | .hg/store/data/tst.d.hg | |
131 | .hg/store/data/tst.d.hg/_foo.i |
|
133 | .hg/store/data/tst.d.hg/_foo.i | |
132 | .hg/store/phaseroots |
|
134 | .hg/store/phaseroots | |
133 | .hg/store/undo |
|
135 | .hg/store/undo | |
134 | .hg/store/undo.backupfiles |
|
136 | .hg/store/undo.backupfiles | |
135 | .hg/store/undo.phaseroots |
|
137 | .hg/store/undo.phaseroots | |
136 | .hg/undo.backup.dirstate |
|
138 | .hg/undo.backup.dirstate | |
137 | .hg/undo.bookmarks |
|
139 | .hg/undo.bookmarks | |
138 | .hg/undo.branch |
|
140 | .hg/undo.branch | |
139 | .hg/undo.desc |
|
141 | .hg/undo.desc | |
140 | .hg/undo.dirstate |
|
142 | .hg/undo.dirstate | |
141 | $ cd .. |
|
143 | $ cd .. | |
142 |
|
144 | |||
143 | Encoding of reserved / long paths in the store |
|
145 | Encoding of reserved / long paths in the store | |
144 |
|
146 | |||
145 | $ hg init r2 |
|
147 | $ hg init r2 | |
146 | $ cd r2 |
|
148 | $ cd r2 | |
147 | $ cat <<EOF > .hg/hgrc |
|
149 | $ cat <<EOF > .hg/hgrc | |
148 | > [ui] |
|
150 | > [ui] | |
149 | > portablefilenames = ignore |
|
151 | > portablefilenames = ignore | |
150 | > EOF |
|
152 | > EOF | |
151 |
|
153 | |||
152 | $ hg import -q --bypass - <<EOF |
|
154 | $ hg import -q --bypass - <<EOF | |
153 | > # HG changeset patch |
|
155 | > # HG changeset patch | |
154 | > # User test |
|
156 | > # User test | |
155 | > # Date 0 0 |
|
157 | > # Date 0 0 | |
156 | > # Node ID 1c7a2f7cb77be1a0def34e4c7cabc562ad98fbd7 |
|
158 | > # Node ID 1c7a2f7cb77be1a0def34e4c7cabc562ad98fbd7 | |
157 | > # Parent 0000000000000000000000000000000000000000 |
|
159 | > # Parent 0000000000000000000000000000000000000000 | |
158 | > 1 |
|
160 | > 1 | |
159 | > |
|
161 | > | |
160 | > diff --git a/12345678/12345678/12345678/12345678/12345678/12345678/12345678/12345/xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-123456789-12.3456789-12345-ABCDEFGHIJKLMNOPRSTUVWXYZ-abcdefghjiklmnopqrstuvwxyz b/12345678/12345678/12345678/12345678/12345678/12345678/12345678/12345/xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-123456789-12.3456789-12345-ABCDEFGHIJKLMNOPRSTUVWXYZ-abcdefghjiklmnopqrstuvwxyz |
|
162 | > diff --git a/12345678/12345678/12345678/12345678/12345678/12345678/12345678/12345/xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-123456789-12.3456789-12345-ABCDEFGHIJKLMNOPRSTUVWXYZ-abcdefghjiklmnopqrstuvwxyz b/12345678/12345678/12345678/12345678/12345678/12345678/12345678/12345/xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-123456789-12.3456789-12345-ABCDEFGHIJKLMNOPRSTUVWXYZ-abcdefghjiklmnopqrstuvwxyz | |
161 | > new file mode 100644 |
|
163 | > new file mode 100644 | |
162 | > --- /dev/null |
|
164 | > --- /dev/null | |
163 | > +++ b/12345678/12345678/12345678/12345678/12345678/12345678/12345678/12345/xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-123456789-12.3456789-12345-ABCDEFGHIJKLMNOPRSTUVWXYZ-abcdefghjiklmnopqrstuvwxyz |
|
165 | > +++ b/12345678/12345678/12345678/12345678/12345678/12345678/12345678/12345/xxxxxxxxx-xxxxxxxxx-xxxxxxxxx-123456789-12.3456789-12345-ABCDEFGHIJKLMNOPRSTUVWXYZ-abcdefghjiklmnopqrstuvwxyz | |
164 | > @@ -0,0 +1,1 @@ |
|
166 | > @@ -0,0 +1,1 @@ | |
165 | > +foo |
|
167 | > +foo | |
166 | > diff --git a/AUX/SECOND/X.PRN/FOURTH/FI:FTH/SIXTH/SEVENTH/EIGHTH/NINETH/TENTH/ELEVENTH/LOREMIPSUM.TXT b/AUX/SECOND/X.PRN/FOURTH/FI:FTH/SIXTH/SEVENTH/EIGHTH/NINETH/TENTH/ELEVENTH/LOREMIPSUM.TXT |
|
168 | > diff --git a/AUX/SECOND/X.PRN/FOURTH/FI:FTH/SIXTH/SEVENTH/EIGHTH/NINETH/TENTH/ELEVENTH/LOREMIPSUM.TXT b/AUX/SECOND/X.PRN/FOURTH/FI:FTH/SIXTH/SEVENTH/EIGHTH/NINETH/TENTH/ELEVENTH/LOREMIPSUM.TXT | |
167 | > new file mode 100644 |
|
169 | > new file mode 100644 | |
168 | > --- /dev/null |
|
170 | > --- /dev/null | |
169 | > +++ b/AUX/SECOND/X.PRN/FOURTH/FI:FTH/SIXTH/SEVENTH/EIGHTH/NINETH/TENTH/ELEVENTH/LOREMIPSUM.TXT |
|
171 | > +++ b/AUX/SECOND/X.PRN/FOURTH/FI:FTH/SIXTH/SEVENTH/EIGHTH/NINETH/TENTH/ELEVENTH/LOREMIPSUM.TXT | |
170 | > @@ -0,0 +1,1 @@ |
|
172 | > @@ -0,0 +1,1 @@ | |
171 | > +foo |
|
173 | > +foo | |
172 | > diff --git a/Project Planning/Resources/AnotherLongDirectoryName/Followedbyanother/AndAnother/AndThenAnExtremelyLongFileName.txt b/Project Planning/Resources/AnotherLongDirectoryName/Followedbyanother/AndAnother/AndThenAnExtremelyLongFileName.txt |
|
174 | > diff --git a/Project Planning/Resources/AnotherLongDirectoryName/Followedbyanother/AndAnother/AndThenAnExtremelyLongFileName.txt b/Project Planning/Resources/AnotherLongDirectoryName/Followedbyanother/AndAnother/AndThenAnExtremelyLongFileName.txt | |
173 | > new file mode 100644 |
|
175 | > new file mode 100644 | |
174 | > --- /dev/null |
|
176 | > --- /dev/null | |
175 | > +++ b/Project Planning/Resources/AnotherLongDirectoryName/Followedbyanother/AndAnother/AndThenAnExtremelyLongFileName.txt |
|
177 | > +++ b/Project Planning/Resources/AnotherLongDirectoryName/Followedbyanother/AndAnother/AndThenAnExtremelyLongFileName.txt | |
176 | > @@ -0,0 +1,1 @@ |
|
178 | > @@ -0,0 +1,1 @@ | |
177 | > +foo |
|
179 | > +foo | |
178 | > diff --git a/bla.aux/prn/PRN/lpt/com3/nul/coma/foo.NUL/normal.c b/bla.aux/prn/PRN/lpt/com3/nul/coma/foo.NUL/normal.c |
|
180 | > diff --git a/bla.aux/prn/PRN/lpt/com3/nul/coma/foo.NUL/normal.c b/bla.aux/prn/PRN/lpt/com3/nul/coma/foo.NUL/normal.c | |
179 | > new file mode 100644 |
|
181 | > new file mode 100644 | |
180 | > --- /dev/null |
|
182 | > --- /dev/null | |
181 | > +++ b/bla.aux/prn/PRN/lpt/com3/nul/coma/foo.NUL/normal.c |
|
183 | > +++ b/bla.aux/prn/PRN/lpt/com3/nul/coma/foo.NUL/normal.c | |
182 | > @@ -0,0 +1,1 @@ |
|
184 | > @@ -0,0 +1,1 @@ | |
183 | > +foo |
|
185 | > +foo | |
184 | > diff --git a/enterprise/openesbaddons/contrib-imola/corba-bc/netbeansplugin/wsdlExtension/src/main/java/META-INF/services/org.netbeans.modules.xml.wsdl.bindingsupport.spi.ExtensibilityElementTemplateProvider b/enterprise/openesbaddons/contrib-imola/corba-bc/netbeansplugin/wsdlExtension/src/main/java/META-INF/services/org.netbeans.modules.xml.wsdl.bindingsupport.spi.ExtensibilityElementTemplateProvider |
|
186 | > diff --git a/enterprise/openesbaddons/contrib-imola/corba-bc/netbeansplugin/wsdlExtension/src/main/java/META-INF/services/org.netbeans.modules.xml.wsdl.bindingsupport.spi.ExtensibilityElementTemplateProvider b/enterprise/openesbaddons/contrib-imola/corba-bc/netbeansplugin/wsdlExtension/src/main/java/META-INF/services/org.netbeans.modules.xml.wsdl.bindingsupport.spi.ExtensibilityElementTemplateProvider | |
185 | > new file mode 100644 |
|
187 | > new file mode 100644 | |
186 | > --- /dev/null |
|
188 | > --- /dev/null | |
187 | > +++ b/enterprise/openesbaddons/contrib-imola/corba-bc/netbeansplugin/wsdlExtension/src/main/java/META-INF/services/org.netbeans.modules.xml.wsdl.bindingsupport.spi.ExtensibilityElementTemplateProvider |
|
189 | > +++ b/enterprise/openesbaddons/contrib-imola/corba-bc/netbeansplugin/wsdlExtension/src/main/java/META-INF/services/org.netbeans.modules.xml.wsdl.bindingsupport.spi.ExtensibilityElementTemplateProvider | |
188 | > @@ -0,0 +1,1 @@ |
|
190 | > @@ -0,0 +1,1 @@ | |
189 | > +foo |
|
191 | > +foo | |
190 | > EOF |
|
192 | > EOF | |
191 |
|
193 | |||
192 | $ find .hg/store -name *.i | sort |
|
194 | $ find .hg/store -name *.i | sort | |
193 | .hg/store/00changelog.i |
|
195 | .hg/store/00changelog.i | |
194 | .hg/store/00manifest.i |
|
196 | .hg/store/00manifest.i | |
195 | .hg/store/data/bla.aux/pr~6e/_p_r_n/lpt/co~6d3/nu~6c/coma/foo._n_u_l/normal.c.i |
|
197 | .hg/store/data/bla.aux/pr~6e/_p_r_n/lpt/co~6d3/nu~6c/coma/foo._n_u_l/normal.c.i | |
196 | .hg/store/dh/12345678/12345678/12345678/12345678/12345678/12345678/12345678/12345/xxxxxx168e07b38e65eff86ab579afaaa8e30bfbe0f35f.i |
|
198 | .hg/store/dh/12345678/12345678/12345678/12345678/12345678/12345678/12345678/12345/xxxxxx168e07b38e65eff86ab579afaaa8e30bfbe0f35f.i | |
197 | .hg/store/dh/au~78/second/x.prn/fourth/fi~3afth/sixth/seventh/eighth/nineth/tenth/loremia20419e358ddff1bf8751e38288aff1d7c32ec05.i |
|
199 | .hg/store/dh/au~78/second/x.prn/fourth/fi~3afth/sixth/seventh/eighth/nineth/tenth/loremia20419e358ddff1bf8751e38288aff1d7c32ec05.i | |
198 | .hg/store/dh/enterpri/openesba/contrib-/corba-bc/netbeans/wsdlexte/src/main/java/org.net7018f27961fdf338a598a40c4683429e7ffb9743.i |
|
200 | .hg/store/dh/enterpri/openesba/contrib-/corba-bc/netbeans/wsdlexte/src/main/java/org.net7018f27961fdf338a598a40c4683429e7ffb9743.i | |
199 | .hg/store/dh/project_/resource/anotherl/followed/andanoth/andthenanextremelylongfilename0d8e1f4187c650e2f1fdca9fd90f786bc0976b6b.i |
|
201 | .hg/store/dh/project_/resource/anotherl/followed/andanoth/andthenanextremelylongfilename0d8e1f4187c650e2f1fdca9fd90f786bc0976b6b.i | |
200 |
|
202 | |||
201 | $ cd .. |
|
203 | $ cd .. | |
202 |
|
204 | |||
203 | Aborting lock does not prevent fncache writes |
|
205 | Aborting lock does not prevent fncache writes | |
204 |
|
206 | |||
205 | $ cat > exceptionext.py <<EOF |
|
207 | $ cat > exceptionext.py <<EOF | |
206 | > import os |
|
208 | > import os | |
207 | > from mercurial import commands, error |
|
209 | > from mercurial import commands, error | |
208 | > from mercurial.extensions import wrapcommand, wrapfunction |
|
210 | > from mercurial.extensions import wrapcommand, wrapfunction | |
209 | > |
|
211 | > | |
210 | > def lockexception(orig, vfs, lockname, wait, releasefn, *args, **kwargs): |
|
212 | > def lockexception(orig, vfs, lockname, wait, releasefn, *args, **kwargs): | |
211 | > def releasewrap(): |
|
213 | > def releasewrap(): | |
212 | > l.held = False # ensure __del__ is a noop |
|
214 | > l.held = False # ensure __del__ is a noop | |
213 | > raise error.Abort("forced lock failure") |
|
215 | > raise error.Abort("forced lock failure") | |
214 | > l = orig(vfs, lockname, wait, releasewrap, *args, **kwargs) |
|
216 | > l = orig(vfs, lockname, wait, releasewrap, *args, **kwargs) | |
215 | > return l |
|
217 | > return l | |
216 | > |
|
218 | > | |
217 | > def reposetup(ui, repo): |
|
219 | > def reposetup(ui, repo): | |
218 | > wrapfunction(repo, '_lock', lockexception) |
|
220 | > wrapfunction(repo, '_lock', lockexception) | |
219 | > |
|
221 | > | |
220 | > cmdtable = {} |
|
222 | > cmdtable = {} | |
221 | > |
|
223 | > | |
222 | > # wrap "commit" command to prevent wlock from being '__del__()'-ed |
|
224 | > # wrap "commit" command to prevent wlock from being '__del__()'-ed | |
223 | > # at the end of dispatching (for intentional "forced lcok failure") |
|
225 | > # at the end of dispatching (for intentional "forced lcok failure") | |
224 | > def commitwrap(orig, ui, repo, *pats, **opts): |
|
226 | > def commitwrap(orig, ui, repo, *pats, **opts): | |
225 | > repo = repo.unfiltered() # to use replaced repo._lock certainly |
|
227 | > repo = repo.unfiltered() # to use replaced repo._lock certainly | |
226 | > wlock = repo.wlock() |
|
228 | > wlock = repo.wlock() | |
227 | > try: |
|
229 | > try: | |
228 | > return orig(ui, repo, *pats, **opts) |
|
230 | > return orig(ui, repo, *pats, **opts) | |
229 | > finally: |
|
231 | > finally: | |
230 | > # multiple 'relase()' is needed for complete releasing wlock, |
|
232 | > # multiple 'relase()' is needed for complete releasing wlock, | |
231 | > # because "forced" abort at last releasing store lock |
|
233 | > # because "forced" abort at last releasing store lock | |
232 | > # prevents wlock from being released at same 'lockmod.release()' |
|
234 | > # prevents wlock from being released at same 'lockmod.release()' | |
233 | > for i in range(wlock.held): |
|
235 | > for i in range(wlock.held): | |
234 | > wlock.release() |
|
236 | > wlock.release() | |
235 | > |
|
237 | > | |
236 | > def extsetup(ui): |
|
238 | > def extsetup(ui): | |
237 | > wrapcommand(commands.table, "commit", commitwrap) |
|
239 | > wrapcommand(commands.table, "commit", commitwrap) | |
238 | > EOF |
|
240 | > EOF | |
239 | $ extpath=`pwd`/exceptionext.py |
|
241 | $ extpath=`pwd`/exceptionext.py | |
240 | $ hg init fncachetxn |
|
242 | $ hg init fncachetxn | |
241 | $ cd fncachetxn |
|
243 | $ cd fncachetxn | |
242 | $ printf "[extensions]\nexceptionext=$extpath\n" >> .hg/hgrc |
|
244 | $ printf "[extensions]\nexceptionext=$extpath\n" >> .hg/hgrc | |
243 | $ touch y |
|
245 | $ touch y | |
244 | $ hg ci -qAm y |
|
246 | $ hg ci -qAm y | |
245 | abort: forced lock failure |
|
247 | abort: forced lock failure | |
246 | [255] |
|
248 | [255] | |
247 | $ cat .hg/store/fncache |
|
249 | $ cat .hg/store/fncache | |
248 | data/y.i |
|
250 | data/y.i | |
249 |
|
251 | |||
250 | Aborting transaction prevents fncache change |
|
252 | Aborting transaction prevents fncache change | |
251 |
|
253 | |||
252 | $ cat > ../exceptionext.py <<EOF |
|
254 | $ cat > ../exceptionext.py <<EOF | |
253 | > import os |
|
255 | > import os | |
254 | > from mercurial import commands, error, localrepo |
|
256 | > from mercurial import commands, error, localrepo | |
255 | > from mercurial.extensions import wrapfunction |
|
257 | > from mercurial.extensions import wrapfunction | |
256 | > |
|
258 | > | |
257 | > def wrapper(orig, self, *args, **kwargs): |
|
259 | > def wrapper(orig, self, *args, **kwargs): | |
258 | > tr = orig(self, *args, **kwargs) |
|
260 | > tr = orig(self, *args, **kwargs) | |
259 | > def fail(tr): |
|
261 | > def fail(tr): | |
260 | > raise error.Abort("forced transaction failure") |
|
262 | > raise error.Abort("forced transaction failure") | |
261 | > # zzz prefix to ensure it sorted after store.write |
|
263 | > # zzz prefix to ensure it sorted after store.write | |
262 | > tr.addfinalize('zzz-forcefails', fail) |
|
264 | > tr.addfinalize('zzz-forcefails', fail) | |
263 | > return tr |
|
265 | > return tr | |
264 | > |
|
266 | > | |
265 | > def uisetup(ui): |
|
267 | > def uisetup(ui): | |
266 | > wrapfunction(localrepo.localrepository, 'transaction', wrapper) |
|
268 | > wrapfunction(localrepo.localrepository, 'transaction', wrapper) | |
267 | > |
|
269 | > | |
268 | > cmdtable = {} |
|
270 | > cmdtable = {} | |
269 | > |
|
271 | > | |
270 | > EOF |
|
272 | > EOF | |
271 | $ rm -f "${extpath}c" |
|
273 | $ rm -f "${extpath}c" | |
272 | $ touch z |
|
274 | $ touch z | |
273 | $ hg ci -qAm z |
|
275 | $ hg ci -qAm z | |
274 | transaction abort! |
|
276 | transaction abort! | |
275 | rollback completed |
|
277 | rollback completed | |
276 | abort: forced transaction failure |
|
278 | abort: forced transaction failure | |
277 | [255] |
|
279 | [255] | |
278 | $ cat .hg/store/fncache |
|
280 | $ cat .hg/store/fncache | |
279 | data/y.i |
|
281 | data/y.i | |
280 |
|
282 | |||
281 | Aborted transactions can be recovered later |
|
283 | Aborted transactions can be recovered later | |
282 |
|
284 | |||
283 | $ cat > ../exceptionext.py <<EOF |
|
285 | $ cat > ../exceptionext.py <<EOF | |
284 | > import os |
|
286 | > import os | |
285 | > from mercurial import commands, error, transaction, localrepo |
|
287 | > from mercurial import commands, error, transaction, localrepo | |
286 | > from mercurial.extensions import wrapfunction |
|
288 | > from mercurial.extensions import wrapfunction | |
287 | > |
|
289 | > | |
288 | > def trwrapper(orig, self, *args, **kwargs): |
|
290 | > def trwrapper(orig, self, *args, **kwargs): | |
289 | > tr = orig(self, *args, **kwargs) |
|
291 | > tr = orig(self, *args, **kwargs) | |
290 | > def fail(tr): |
|
292 | > def fail(tr): | |
291 | > raise error.Abort("forced transaction failure") |
|
293 | > raise error.Abort("forced transaction failure") | |
292 | > # zzz prefix to ensure it sorted after store.write |
|
294 | > # zzz prefix to ensure it sorted after store.write | |
293 | > tr.addfinalize('zzz-forcefails', fail) |
|
295 | > tr.addfinalize('zzz-forcefails', fail) | |
294 | > return tr |
|
296 | > return tr | |
295 | > |
|
297 | > | |
296 | > def abortwrapper(orig, self, *args, **kwargs): |
|
298 | > def abortwrapper(orig, self, *args, **kwargs): | |
297 | > raise error.Abort("forced transaction failure") |
|
299 | > raise error.Abort("forced transaction failure") | |
298 | > |
|
300 | > | |
299 | > def uisetup(ui): |
|
301 | > def uisetup(ui): | |
300 | > wrapfunction(localrepo.localrepository, 'transaction', trwrapper) |
|
302 | > wrapfunction(localrepo.localrepository, 'transaction', trwrapper) | |
301 | > wrapfunction(transaction.transaction, '_abort', abortwrapper) |
|
303 | > wrapfunction(transaction.transaction, '_abort', abortwrapper) | |
302 | > |
|
304 | > | |
303 | > cmdtable = {} |
|
305 | > cmdtable = {} | |
304 | > |
|
306 | > | |
305 | > EOF |
|
307 | > EOF | |
306 | $ rm -f "${extpath}c" |
|
308 | $ rm -f "${extpath}c" | |
307 | $ hg up -q 1 |
|
309 | $ hg up -q 1 | |
308 | $ touch z |
|
310 | $ touch z | |
309 | $ hg ci -qAm z 2>/dev/null |
|
311 | $ hg ci -qAm z 2>/dev/null | |
310 | [255] |
|
312 | [255] | |
311 | $ cat .hg/store/fncache | sort |
|
313 | $ cat .hg/store/fncache | sort | |
312 | data/y.i |
|
314 | data/y.i | |
313 | data/z.i |
|
315 | data/z.i | |
314 | $ hg recover |
|
316 | $ hg recover | |
315 | rolling back interrupted transaction |
|
317 | rolling back interrupted transaction | |
316 | checking changesets |
|
318 | checking changesets | |
317 | checking manifests |
|
319 | checking manifests | |
318 | crosschecking files in changesets and manifests |
|
320 | crosschecking files in changesets and manifests | |
319 | checking files |
|
321 | checking files | |
320 | 1 files, 1 changesets, 1 total revisions |
|
322 | 1 files, 1 changesets, 1 total revisions | |
321 | $ cat .hg/store/fncache |
|
323 | $ cat .hg/store/fncache | |
322 | data/y.i |
|
324 | data/y.i | |
323 |
|
325 | |||
324 | $ cd .. |
|
326 | $ cd .. | |
325 |
|
327 | |||
326 | debugrebuildfncache does nothing unless repo has fncache requirement |
|
328 | debugrebuildfncache does nothing unless repo has fncache requirement | |
327 |
|
329 | |||
328 | $ hg --config format.usefncache=false init nofncache |
|
330 | $ hg --config format.usefncache=false init nofncache | |
329 | $ cd nofncache |
|
331 | $ cd nofncache | |
330 | $ hg debugrebuildfncache |
|
332 | $ hg debugrebuildfncache | |
331 | (not rebuilding fncache because repository does not support fncache) |
|
333 | (not rebuilding fncache because repository does not support fncache) | |
332 |
|
334 | |||
333 | $ cd .. |
|
335 | $ cd .. | |
334 |
|
336 | |||
335 | debugrebuildfncache works on empty repository |
|
337 | debugrebuildfncache works on empty repository | |
336 |
|
338 | |||
337 | $ hg init empty |
|
339 | $ hg init empty | |
338 | $ cd empty |
|
340 | $ cd empty | |
339 | $ hg debugrebuildfncache |
|
341 | $ hg debugrebuildfncache | |
340 | fncache already up to date |
|
342 | fncache already up to date | |
341 | $ cd .. |
|
343 | $ cd .. | |
342 |
|
344 | |||
343 | debugrebuildfncache on an up to date repository no-ops |
|
345 | debugrebuildfncache on an up to date repository no-ops | |
344 |
|
346 | |||
345 | $ hg init repo |
|
347 | $ hg init repo | |
346 | $ cd repo |
|
348 | $ cd repo | |
347 | $ echo initial > foo |
|
349 | $ echo initial > foo | |
348 | $ echo initial > .bar |
|
350 | $ echo initial > .bar | |
349 | $ hg commit -A -m initial |
|
351 | $ hg commit -A -m initial | |
350 | adding .bar |
|
352 | adding .bar | |
351 | adding foo |
|
353 | adding foo | |
352 |
|
354 | |||
353 | $ cat .hg/store/fncache | sort |
|
355 | $ cat .hg/store/fncache | sort | |
354 | data/.bar.i |
|
356 | data/.bar.i | |
355 | data/foo.i |
|
357 | data/foo.i | |
356 |
|
358 | |||
357 | $ hg debugrebuildfncache |
|
359 | $ hg debugrebuildfncache | |
358 | fncache already up to date |
|
360 | fncache already up to date | |
359 |
|
361 | |||
360 | debugrebuildfncache restores deleted fncache file |
|
362 | debugrebuildfncache restores deleted fncache file | |
361 |
|
363 | |||
362 | $ rm -f .hg/store/fncache |
|
364 | $ rm -f .hg/store/fncache | |
363 | $ hg debugrebuildfncache |
|
365 | $ hg debugrebuildfncache | |
364 | adding data/.bar.i |
|
366 | adding data/.bar.i | |
365 | adding data/foo.i |
|
367 | adding data/foo.i | |
366 | 2 items added, 0 removed from fncache |
|
368 | 2 items added, 0 removed from fncache | |
367 |
|
369 | |||
368 | $ cat .hg/store/fncache | sort |
|
370 | $ cat .hg/store/fncache | sort | |
369 | data/.bar.i |
|
371 | data/.bar.i | |
370 | data/foo.i |
|
372 | data/foo.i | |
371 |
|
373 | |||
372 | Rebuild after rebuild should no-op |
|
374 | Rebuild after rebuild should no-op | |
373 |
|
375 | |||
374 | $ hg debugrebuildfncache |
|
376 | $ hg debugrebuildfncache | |
375 | fncache already up to date |
|
377 | fncache already up to date | |
376 |
|
378 | |||
377 | A single missing file should get restored, an extra file should be removed |
|
379 | A single missing file should get restored, an extra file should be removed | |
378 |
|
380 | |||
379 | $ cat > .hg/store/fncache << EOF |
|
381 | $ cat > .hg/store/fncache << EOF | |
380 | > data/foo.i |
|
382 | > data/foo.i | |
381 | > data/bad-entry.i |
|
383 | > data/bad-entry.i | |
382 | > EOF |
|
384 | > EOF | |
383 |
|
385 | |||
384 | $ hg debugrebuildfncache |
|
386 | $ hg debugrebuildfncache | |
385 | removing data/bad-entry.i |
|
387 | removing data/bad-entry.i | |
386 | adding data/.bar.i |
|
388 | adding data/.bar.i | |
387 | 1 items added, 1 removed from fncache |
|
389 | 1 items added, 1 removed from fncache | |
388 |
|
390 | |||
389 | $ cat .hg/store/fncache | sort |
|
391 | $ cat .hg/store/fncache | sort | |
390 | data/.bar.i |
|
392 | data/.bar.i | |
391 | data/foo.i |
|
393 | data/foo.i | |
392 |
|
394 | |||
393 | $ cd .. |
|
395 | $ cd .. | |
394 |
|
396 | |||
395 | Try a simple variation without dotencode to ensure fncache is ignorant of encoding |
|
397 | Try a simple variation without dotencode to ensure fncache is ignorant of encoding | |
396 |
|
398 | |||
397 | $ hg --config format.dotencode=false init nodotencode |
|
399 | $ hg --config format.dotencode=false init nodotencode | |
398 | $ cd nodotencode |
|
400 | $ cd nodotencode | |
399 | $ echo initial > foo |
|
401 | $ echo initial > foo | |
400 | $ echo initial > .bar |
|
402 | $ echo initial > .bar | |
401 | $ hg commit -A -m initial |
|
403 | $ hg commit -A -m initial | |
402 | adding .bar |
|
404 | adding .bar | |
403 | adding foo |
|
405 | adding foo | |
404 |
|
406 | |||
405 | $ cat .hg/store/fncache | sort |
|
407 | $ cat .hg/store/fncache | sort | |
406 | data/.bar.i |
|
408 | data/.bar.i | |
407 | data/foo.i |
|
409 | data/foo.i | |
408 |
|
410 | |||
409 | $ rm .hg/store/fncache |
|
411 | $ rm .hg/store/fncache | |
410 | $ hg debugrebuildfncache |
|
412 | $ hg debugrebuildfncache | |
411 | adding data/.bar.i |
|
413 | adding data/.bar.i | |
412 | adding data/foo.i |
|
414 | adding data/foo.i | |
413 | 2 items added, 0 removed from fncache |
|
415 | 2 items added, 0 removed from fncache | |
414 |
|
416 | |||
415 | $ cat .hg/store/fncache | sort |
|
417 | $ cat .hg/store/fncache | sort | |
416 | data/.bar.i |
|
418 | data/.bar.i | |
417 | data/foo.i |
|
419 | data/foo.i |
@@ -1,424 +1,426 b'' | |||||
1 | #require hardlink |
|
1 | #require hardlink | |
2 |
|
2 | |||
3 | $ cat > nlinks.py <<EOF |
|
3 | $ cat > nlinks.py <<EOF | |
4 | > import sys |
|
4 | > import sys | |
5 | > from mercurial import util |
|
5 | > from mercurial import util | |
6 | > for f in sorted(sys.stdin.readlines()): |
|
6 | > for f in sorted(sys.stdin.readlines()): | |
7 | > f = f[:-1] |
|
7 | > f = f[:-1] | |
8 | > print util.nlinks(f), f |
|
8 | > print util.nlinks(f), f | |
9 | > EOF |
|
9 | > EOF | |
10 |
|
10 | |||
11 | $ nlinksdir() |
|
11 | $ nlinksdir() | |
12 | > { |
|
12 | > { | |
13 | > find "$@" -type f | $PYTHON $TESTTMP/nlinks.py |
|
13 | > find "$@" -type f | $PYTHON $TESTTMP/nlinks.py | |
14 | > } |
|
14 | > } | |
15 |
|
15 | |||
16 | Some implementations of cp can't create hardlinks (replaces 'cp -al' on Linux): |
|
16 | Some implementations of cp can't create hardlinks (replaces 'cp -al' on Linux): | |
17 |
|
17 | |||
18 | $ cat > linkcp.py <<EOF |
|
18 | $ cat > linkcp.py <<EOF | |
19 | > from mercurial import util |
|
19 | > from mercurial import util | |
20 | > import sys |
|
20 | > import sys | |
21 | > util.copyfiles(sys.argv[1], sys.argv[2], hardlink=True) |
|
21 | > util.copyfiles(sys.argv[1], sys.argv[2], hardlink=True) | |
22 | > EOF |
|
22 | > EOF | |
23 |
|
23 | |||
24 | $ linkcp() |
|
24 | $ linkcp() | |
25 | > { |
|
25 | > { | |
26 | > $PYTHON $TESTTMP/linkcp.py $1 $2 |
|
26 | > $PYTHON $TESTTMP/linkcp.py $1 $2 | |
27 | > } |
|
27 | > } | |
28 |
|
28 | |||
29 | Prepare repo r1: |
|
29 | Prepare repo r1: | |
30 |
|
30 | |||
31 | $ hg init r1 |
|
31 | $ hg init r1 | |
32 | $ cd r1 |
|
32 | $ cd r1 | |
33 |
|
33 | |||
34 | $ echo c1 > f1 |
|
34 | $ echo c1 > f1 | |
35 | $ hg add f1 |
|
35 | $ hg add f1 | |
36 | $ hg ci -m0 |
|
36 | $ hg ci -m0 | |
37 |
|
37 | |||
38 | $ mkdir d1 |
|
38 | $ mkdir d1 | |
39 | $ cd d1 |
|
39 | $ cd d1 | |
40 | $ echo c2 > f2 |
|
40 | $ echo c2 > f2 | |
41 | $ hg add f2 |
|
41 | $ hg add f2 | |
42 | $ hg ci -m1 |
|
42 | $ hg ci -m1 | |
43 | $ cd ../.. |
|
43 | $ cd ../.. | |
44 |
|
44 | |||
45 | $ nlinksdir r1/.hg/store |
|
45 | $ nlinksdir r1/.hg/store | |
46 | 1 r1/.hg/store/00changelog.i |
|
46 | 1 r1/.hg/store/00changelog.i | |
47 | 1 r1/.hg/store/00manifest.i |
|
47 | 1 r1/.hg/store/00manifest.i | |
48 | 1 r1/.hg/store/data/d1/f2.i |
|
48 | 1 r1/.hg/store/data/d1/f2.i | |
49 | 1 r1/.hg/store/data/f1.i |
|
49 | 1 r1/.hg/store/data/f1.i | |
50 | 1 r1/.hg/store/fncache |
|
50 | 1 r1/.hg/store/fncache | |
51 | 1 r1/.hg/store/phaseroots |
|
51 | 1 r1/.hg/store/phaseroots | |
52 | 1 r1/.hg/store/undo |
|
52 | 1 r1/.hg/store/undo | |
53 | 1 r1/.hg/store/undo.backup.fncache |
|
53 | 1 r1/.hg/store/undo.backup.fncache | |
54 | 1 r1/.hg/store/undo.backupfiles |
|
54 | 1 r1/.hg/store/undo.backupfiles | |
55 | 1 r1/.hg/store/undo.phaseroots |
|
55 | 1 r1/.hg/store/undo.phaseroots | |
56 |
|
56 | |||
57 |
|
57 | |||
58 | Create hardlinked clone r2: |
|
58 | Create hardlinked clone r2: | |
59 |
|
59 | |||
60 | $ hg clone -U --debug r1 r2 --config progress.debug=true |
|
60 | $ hg clone -U --debug r1 r2 --config progress.debug=true | |
61 | linking: 1 |
|
61 | linking: 1 | |
62 | linking: 2 |
|
62 | linking: 2 | |
63 | linking: 3 |
|
63 | linking: 3 | |
64 | linking: 4 |
|
64 | linking: 4 | |
65 | linking: 5 |
|
65 | linking: 5 | |
66 | linking: 6 |
|
66 | linking: 6 | |
67 | linking: 7 |
|
67 | linking: 7 | |
68 | linked 7 files |
|
68 | linked 7 files | |
69 |
|
69 | |||
70 | Create non-hardlinked clone r3: |
|
70 | Create non-hardlinked clone r3: | |
71 |
|
71 | |||
72 | $ hg clone --pull r1 r3 |
|
72 | $ hg clone --pull r1 r3 | |
73 | requesting all changes |
|
73 | requesting all changes | |
74 | adding changesets |
|
74 | adding changesets | |
75 | adding manifests |
|
75 | adding manifests | |
76 | adding file changes |
|
76 | adding file changes | |
77 | added 2 changesets with 2 changes to 2 files |
|
77 | added 2 changesets with 2 changes to 2 files | |
78 | updating to branch default |
|
78 | updating to branch default | |
79 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
79 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
80 |
|
80 | |||
81 |
|
81 | |||
82 | Repos r1 and r2 should now contain hardlinked files: |
|
82 | Repos r1 and r2 should now contain hardlinked files: | |
83 |
|
83 | |||
84 | $ nlinksdir r1/.hg/store |
|
84 | $ nlinksdir r1/.hg/store | |
85 | 2 r1/.hg/store/00changelog.i |
|
85 | 2 r1/.hg/store/00changelog.i | |
86 | 2 r1/.hg/store/00manifest.i |
|
86 | 2 r1/.hg/store/00manifest.i | |
87 | 2 r1/.hg/store/data/d1/f2.i |
|
87 | 2 r1/.hg/store/data/d1/f2.i | |
88 | 2 r1/.hg/store/data/f1.i |
|
88 | 2 r1/.hg/store/data/f1.i | |
89 | 2 r1/.hg/store/fncache |
|
89 | 2 r1/.hg/store/fncache | |
90 | 1 r1/.hg/store/phaseroots |
|
90 | 1 r1/.hg/store/phaseroots | |
91 | 1 r1/.hg/store/undo |
|
91 | 1 r1/.hg/store/undo | |
92 | 1 r1/.hg/store/undo.backup.fncache |
|
92 | 1 r1/.hg/store/undo.backup.fncache | |
93 | 1 r1/.hg/store/undo.backupfiles |
|
93 | 1 r1/.hg/store/undo.backupfiles | |
94 | 1 r1/.hg/store/undo.phaseroots |
|
94 | 1 r1/.hg/store/undo.phaseroots | |
95 |
|
95 | |||
96 | $ nlinksdir r2/.hg/store |
|
96 | $ nlinksdir r2/.hg/store | |
97 | 2 r2/.hg/store/00changelog.i |
|
97 | 2 r2/.hg/store/00changelog.i | |
98 | 2 r2/.hg/store/00manifest.i |
|
98 | 2 r2/.hg/store/00manifest.i | |
99 | 2 r2/.hg/store/data/d1/f2.i |
|
99 | 2 r2/.hg/store/data/d1/f2.i | |
100 | 2 r2/.hg/store/data/f1.i |
|
100 | 2 r2/.hg/store/data/f1.i | |
101 | 2 r2/.hg/store/fncache |
|
101 | 2 r2/.hg/store/fncache | |
102 |
|
102 | |||
103 | Repo r3 should not be hardlinked: |
|
103 | Repo r3 should not be hardlinked: | |
104 |
|
104 | |||
105 | $ nlinksdir r3/.hg/store |
|
105 | $ nlinksdir r3/.hg/store | |
106 | 1 r3/.hg/store/00changelog.i |
|
106 | 1 r3/.hg/store/00changelog.i | |
107 | 1 r3/.hg/store/00manifest.i |
|
107 | 1 r3/.hg/store/00manifest.i | |
108 | 1 r3/.hg/store/data/d1/f2.i |
|
108 | 1 r3/.hg/store/data/d1/f2.i | |
109 | 1 r3/.hg/store/data/f1.i |
|
109 | 1 r3/.hg/store/data/f1.i | |
110 | 1 r3/.hg/store/fncache |
|
110 | 1 r3/.hg/store/fncache | |
111 | 1 r3/.hg/store/phaseroots |
|
111 | 1 r3/.hg/store/phaseroots | |
112 | 1 r3/.hg/store/undo |
|
112 | 1 r3/.hg/store/undo | |
113 | 1 r3/.hg/store/undo.backupfiles |
|
113 | 1 r3/.hg/store/undo.backupfiles | |
114 | 1 r3/.hg/store/undo.phaseroots |
|
114 | 1 r3/.hg/store/undo.phaseroots | |
115 |
|
115 | |||
116 |
|
116 | |||
117 | Create a non-inlined filelog in r3: |
|
117 | Create a non-inlined filelog in r3: | |
118 |
|
118 | |||
119 | $ cd r3/d1 |
|
119 | $ cd r3/d1 | |
120 | >>> f = open('data1', 'wb') |
|
120 | >>> f = open('data1', 'wb') | |
121 | >>> for x in range(10000): |
|
121 | >>> for x in range(10000): | |
122 | ... f.write("%s\n" % str(x)) |
|
122 | ... f.write("%s\n" % str(x)) | |
123 | >>> f.close() |
|
123 | >>> f.close() | |
124 | $ for j in 0 1 2 3 4 5 6 7 8 9; do |
|
124 | $ for j in 0 1 2 3 4 5 6 7 8 9; do | |
125 | > cat data1 >> f2 |
|
125 | > cat data1 >> f2 | |
126 | > hg commit -m$j |
|
126 | > hg commit -m$j | |
127 | > done |
|
127 | > done | |
128 | $ cd ../.. |
|
128 | $ cd ../.. | |
129 |
|
129 | |||
130 | $ nlinksdir r3/.hg/store |
|
130 | $ nlinksdir r3/.hg/store | |
131 | 1 r3/.hg/store/00changelog.i |
|
131 | 1 r3/.hg/store/00changelog.i | |
132 | 1 r3/.hg/store/00manifest.i |
|
132 | 1 r3/.hg/store/00manifest.i | |
133 | 1 r3/.hg/store/data/d1/f2.d |
|
133 | 1 r3/.hg/store/data/d1/f2.d | |
134 | 1 r3/.hg/store/data/d1/f2.i |
|
134 | 1 r3/.hg/store/data/d1/f2.i | |
135 | 1 r3/.hg/store/data/f1.i |
|
135 | 1 r3/.hg/store/data/f1.i | |
136 | 1 r3/.hg/store/fncache |
|
136 | 1 r3/.hg/store/fncache | |
137 | 1 r3/.hg/store/phaseroots |
|
137 | 1 r3/.hg/store/phaseroots | |
138 | 1 r3/.hg/store/undo |
|
138 | 1 r3/.hg/store/undo | |
139 | 1 r3/.hg/store/undo.backup.fncache |
|
139 | 1 r3/.hg/store/undo.backup.fncache | |
140 | 1 r3/.hg/store/undo.backup.phaseroots |
|
140 | 1 r3/.hg/store/undo.backup.phaseroots | |
141 | 1 r3/.hg/store/undo.backupfiles |
|
141 | 1 r3/.hg/store/undo.backupfiles | |
142 | 1 r3/.hg/store/undo.phaseroots |
|
142 | 1 r3/.hg/store/undo.phaseroots | |
143 |
|
143 | |||
144 | Push to repo r1 should break up most hardlinks in r2: |
|
144 | Push to repo r1 should break up most hardlinks in r2: | |
145 |
|
145 | |||
146 | $ hg -R r2 verify |
|
146 | $ hg -R r2 verify | |
147 | checking changesets |
|
147 | checking changesets | |
148 | checking manifests |
|
148 | checking manifests | |
149 | crosschecking files in changesets and manifests |
|
149 | crosschecking files in changesets and manifests | |
150 | checking files |
|
150 | checking files | |
151 | 2 files, 2 changesets, 2 total revisions |
|
151 | 2 files, 2 changesets, 2 total revisions | |
152 |
|
152 | |||
153 | $ cd r3 |
|
153 | $ cd r3 | |
154 | $ hg push |
|
154 | $ hg push | |
155 | pushing to $TESTTMP/r1 (glob) |
|
155 | pushing to $TESTTMP/r1 (glob) | |
156 | searching for changes |
|
156 | searching for changes | |
157 | adding changesets |
|
157 | adding changesets | |
158 | adding manifests |
|
158 | adding manifests | |
159 | adding file changes |
|
159 | adding file changes | |
160 | added 10 changesets with 10 changes to 1 files |
|
160 | added 10 changesets with 10 changes to 1 files | |
161 |
|
161 | |||
162 | $ cd .. |
|
162 | $ cd .. | |
163 |
|
163 | |||
164 | $ nlinksdir r2/.hg/store |
|
164 | $ nlinksdir r2/.hg/store | |
165 | 1 r2/.hg/store/00changelog.i |
|
165 | 1 r2/.hg/store/00changelog.i | |
166 | 1 r2/.hg/store/00manifest.i |
|
166 | 1 r2/.hg/store/00manifest.i | |
167 | 1 r2/.hg/store/data/d1/f2.i |
|
167 | 1 r2/.hg/store/data/d1/f2.i | |
168 | 2 r2/.hg/store/data/f1.i |
|
168 | 2 r2/.hg/store/data/f1.i | |
169 | [12] r2/\.hg/store/fncache (re) |
|
169 | [12] r2/\.hg/store/fncache (re) | |
170 |
|
170 | |||
171 | #if hardlink-whitelisted |
|
171 | #if hardlink-whitelisted | |
172 | $ nlinksdir r2/.hg/store/fncache |
|
172 | $ nlinksdir r2/.hg/store/fncache | |
173 | 2 r2/.hg/store/fncache |
|
173 | 2 r2/.hg/store/fncache | |
174 | #endif |
|
174 | #endif | |
175 |
|
175 | |||
176 | $ hg -R r2 verify |
|
176 | $ hg -R r2 verify | |
177 | checking changesets |
|
177 | checking changesets | |
178 | checking manifests |
|
178 | checking manifests | |
179 | crosschecking files in changesets and manifests |
|
179 | crosschecking files in changesets and manifests | |
180 | checking files |
|
180 | checking files | |
181 | 2 files, 2 changesets, 2 total revisions |
|
181 | 2 files, 2 changesets, 2 total revisions | |
182 |
|
182 | |||
183 |
|
183 | |||
184 | $ cd r1 |
|
184 | $ cd r1 | |
185 | $ hg up |
|
185 | $ hg up | |
186 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
186 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
187 |
|
187 | |||
188 | Committing a change to f1 in r1 must break up hardlink f1.i in r2: |
|
188 | Committing a change to f1 in r1 must break up hardlink f1.i in r2: | |
189 |
|
189 | |||
190 | $ echo c1c1 >> f1 |
|
190 | $ echo c1c1 >> f1 | |
191 | $ hg ci -m00 |
|
191 | $ hg ci -m00 | |
192 | $ cd .. |
|
192 | $ cd .. | |
193 |
|
193 | |||
194 | $ nlinksdir r2/.hg/store |
|
194 | $ nlinksdir r2/.hg/store | |
195 | 1 r2/.hg/store/00changelog.i |
|
195 | 1 r2/.hg/store/00changelog.i | |
196 | 1 r2/.hg/store/00manifest.i |
|
196 | 1 r2/.hg/store/00manifest.i | |
197 | 1 r2/.hg/store/data/d1/f2.i |
|
197 | 1 r2/.hg/store/data/d1/f2.i | |
198 | 1 r2/.hg/store/data/f1.i |
|
198 | 1 r2/.hg/store/data/f1.i | |
199 | [12] r2/\.hg/store/fncache (re) |
|
199 | [12] r2/\.hg/store/fncache (re) | |
200 |
|
200 | |||
201 | #if hardlink-whitelisted |
|
201 | #if hardlink-whitelisted | |
202 | $ nlinksdir r2/.hg/store/fncache |
|
202 | $ nlinksdir r2/.hg/store/fncache | |
203 | 2 r2/.hg/store/fncache |
|
203 | 2 r2/.hg/store/fncache | |
204 | #endif |
|
204 | #endif | |
205 |
|
205 | |||
206 | Create a file which exec permissions we will change |
|
206 | Create a file which exec permissions we will change | |
207 | $ cd r3 |
|
207 | $ cd r3 | |
208 | $ echo "echo hello world" > f3 |
|
208 | $ echo "echo hello world" > f3 | |
209 | $ hg add f3 |
|
209 | $ hg add f3 | |
210 | $ hg ci -mf3 |
|
210 | $ hg ci -mf3 | |
211 | $ cd .. |
|
211 | $ cd .. | |
212 |
|
212 | |||
213 | $ cd r3 |
|
213 | $ cd r3 | |
214 | $ hg tip --template '{rev}:{node|short}\n' |
|
214 | $ hg tip --template '{rev}:{node|short}\n' | |
215 | 12:d3b77733a28a |
|
215 | 12:d3b77733a28a | |
216 | $ echo bla > f1 |
|
216 | $ echo bla > f1 | |
217 | $ chmod +x f3 |
|
217 | $ chmod +x f3 | |
218 | $ hg ci -m1 |
|
218 | $ hg ci -m1 | |
219 | $ cd .. |
|
219 | $ cd .. | |
220 |
|
220 | |||
221 | Create hardlinked copy r4 of r3 (on Linux, we would call 'cp -al'): |
|
221 | Create hardlinked copy r4 of r3 (on Linux, we would call 'cp -al'): | |
222 |
|
222 | |||
223 | $ linkcp r3 r4 |
|
223 | $ linkcp r3 r4 | |
224 |
|
224 | |||
225 | 'checklink' is produced by hardlinking a symlink, which is undefined whether |
|
225 | 'checklink' is produced by hardlinking a symlink, which is undefined whether | |
226 | the symlink should be followed or not. It does behave differently on Linux and |
|
226 | the symlink should be followed or not. It does behave differently on Linux and | |
227 | BSD. Just remove it so the test pass on both platforms. |
|
227 | BSD. Just remove it so the test pass on both platforms. | |
228 |
|
228 | |||
229 | $ rm -f r4/.hg/cache/checklink |
|
229 | $ rm -f r4/.hg/cache/checklink | |
230 |
|
230 | |||
231 | r4 has hardlinks in the working dir (not just inside .hg): |
|
231 | r4 has hardlinks in the working dir (not just inside .hg): | |
232 |
|
232 | |||
233 | $ nlinksdir r4 |
|
233 | $ nlinksdir r4 | |
234 | 2 r4/.hg/00changelog.i |
|
234 | 2 r4/.hg/00changelog.i | |
235 | 2 r4/.hg/branch |
|
235 | 2 r4/.hg/branch | |
236 | 2 r4/.hg/cache/branch2-base |
|
236 | 2 r4/.hg/cache/branch2-base | |
237 | 2 r4/.hg/cache/branch2-served |
|
237 | 2 r4/.hg/cache/branch2-served | |
238 | 2 r4/.hg/cache/checkisexec (execbit !) |
|
238 | 2 r4/.hg/cache/checkisexec (execbit !) | |
239 | ? r4/.hg/cache/checklink-target (glob) (symlink !) |
|
239 | ? r4/.hg/cache/checklink-target (glob) (symlink !) | |
240 | 2 r4/.hg/cache/checknoexec (execbit !) |
|
240 | 2 r4/.hg/cache/checknoexec (execbit !) | |
241 | 2 r4/.hg/cache/rbc-names-v1 |
|
241 | 2 r4/.hg/cache/rbc-names-v1 | |
242 | 2 r4/.hg/cache/rbc-revs-v1 |
|
242 | 2 r4/.hg/cache/rbc-revs-v1 | |
243 | 2 r4/.hg/dirstate |
|
243 | 2 r4/.hg/dirstate | |
|
244 | 2 r4/.hg/fsmonitor.state (fsmonitor !) | |||
244 | 2 r4/.hg/hgrc |
|
245 | 2 r4/.hg/hgrc | |
245 | 2 r4/.hg/last-message.txt |
|
246 | 2 r4/.hg/last-message.txt | |
246 | 2 r4/.hg/requires |
|
247 | 2 r4/.hg/requires | |
247 | 2 r4/.hg/store/00changelog.i |
|
248 | 2 r4/.hg/store/00changelog.i | |
248 | 2 r4/.hg/store/00manifest.i |
|
249 | 2 r4/.hg/store/00manifest.i | |
249 | 2 r4/.hg/store/data/d1/f2.d |
|
250 | 2 r4/.hg/store/data/d1/f2.d | |
250 | 2 r4/.hg/store/data/d1/f2.i |
|
251 | 2 r4/.hg/store/data/d1/f2.i | |
251 | 2 r4/.hg/store/data/f1.i |
|
252 | 2 r4/.hg/store/data/f1.i | |
252 | 2 r4/.hg/store/data/f3.i |
|
253 | 2 r4/.hg/store/data/f3.i | |
253 | 2 r4/.hg/store/fncache |
|
254 | 2 r4/.hg/store/fncache | |
254 | 2 r4/.hg/store/phaseroots |
|
255 | 2 r4/.hg/store/phaseroots | |
255 | 2 r4/.hg/store/undo |
|
256 | 2 r4/.hg/store/undo | |
256 | 2 r4/.hg/store/undo.backup.fncache |
|
257 | 2 r4/.hg/store/undo.backup.fncache | |
257 | 2 r4/.hg/store/undo.backup.phaseroots |
|
258 | 2 r4/.hg/store/undo.backup.phaseroots | |
258 | 2 r4/.hg/store/undo.backupfiles |
|
259 | 2 r4/.hg/store/undo.backupfiles | |
259 | 2 r4/.hg/store/undo.phaseroots |
|
260 | 2 r4/.hg/store/undo.phaseroots | |
260 | [24] r4/\.hg/undo\.backup\.dirstate (re) |
|
261 | [24] r4/\.hg/undo\.backup\.dirstate (re) | |
261 | 2 r4/.hg/undo.bookmarks |
|
262 | 2 r4/.hg/undo.bookmarks | |
262 | 2 r4/.hg/undo.branch |
|
263 | 2 r4/.hg/undo.branch | |
263 | 2 r4/.hg/undo.desc |
|
264 | 2 r4/.hg/undo.desc | |
264 | [24] r4/\.hg/undo\.dirstate (re) |
|
265 | [24] r4/\.hg/undo\.dirstate (re) | |
265 | 2 r4/d1/data1 |
|
266 | 2 r4/d1/data1 | |
266 | 2 r4/d1/f2 |
|
267 | 2 r4/d1/f2 | |
267 | 2 r4/f1 |
|
268 | 2 r4/f1 | |
268 | 2 r4/f3 |
|
269 | 2 r4/f3 | |
269 |
|
270 | |||
270 | Update back to revision 12 in r4 should break hardlink of file f1 and f3: |
|
271 | Update back to revision 12 in r4 should break hardlink of file f1 and f3: | |
271 | #if hardlink-whitelisted |
|
272 | #if hardlink-whitelisted | |
272 | $ nlinksdir r4/.hg/undo.backup.dirstate r4/.hg/undo.dirstate |
|
273 | $ nlinksdir r4/.hg/undo.backup.dirstate r4/.hg/undo.dirstate | |
273 | 4 r4/.hg/undo.backup.dirstate |
|
274 | 4 r4/.hg/undo.backup.dirstate | |
274 | 4 r4/.hg/undo.dirstate |
|
275 | 4 r4/.hg/undo.dirstate | |
275 | #endif |
|
276 | #endif | |
276 |
|
277 | |||
277 |
|
278 | |||
278 | $ hg -R r4 up 12 |
|
279 | $ hg -R r4 up 12 | |
279 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved (execbit !) |
|
280 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved (execbit !) | |
280 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved (no-execbit !) |
|
281 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved (no-execbit !) | |
281 |
|
282 | |||
282 | $ nlinksdir r4 |
|
283 | $ nlinksdir r4 | |
283 | 2 r4/.hg/00changelog.i |
|
284 | 2 r4/.hg/00changelog.i | |
284 | 1 r4/.hg/branch |
|
285 | 1 r4/.hg/branch | |
285 | 2 r4/.hg/cache/branch2-base |
|
286 | 2 r4/.hg/cache/branch2-base | |
286 | 2 r4/.hg/cache/branch2-served |
|
287 | 2 r4/.hg/cache/branch2-served | |
287 | 2 r4/.hg/cache/checkisexec (execbit !) |
|
288 | 2 r4/.hg/cache/checkisexec (execbit !) | |
288 | 2 r4/.hg/cache/checklink-target (symlink !) |
|
289 | 2 r4/.hg/cache/checklink-target (symlink !) | |
289 | 2 r4/.hg/cache/checknoexec (execbit !) |
|
290 | 2 r4/.hg/cache/checknoexec (execbit !) | |
290 | 2 r4/.hg/cache/rbc-names-v1 |
|
291 | 2 r4/.hg/cache/rbc-names-v1 | |
291 | 2 r4/.hg/cache/rbc-revs-v1 |
|
292 | 2 r4/.hg/cache/rbc-revs-v1 | |
292 | 1 r4/.hg/dirstate |
|
293 | 1 r4/.hg/dirstate | |
|
294 | 1 r4/.hg/fsmonitor.state (fsmonitor !) | |||
293 | 2 r4/.hg/hgrc |
|
295 | 2 r4/.hg/hgrc | |
294 | 2 r4/.hg/last-message.txt |
|
296 | 2 r4/.hg/last-message.txt | |
295 | 2 r4/.hg/requires |
|
297 | 2 r4/.hg/requires | |
296 | 2 r4/.hg/store/00changelog.i |
|
298 | 2 r4/.hg/store/00changelog.i | |
297 | 2 r4/.hg/store/00manifest.i |
|
299 | 2 r4/.hg/store/00manifest.i | |
298 | 2 r4/.hg/store/data/d1/f2.d |
|
300 | 2 r4/.hg/store/data/d1/f2.d | |
299 | 2 r4/.hg/store/data/d1/f2.i |
|
301 | 2 r4/.hg/store/data/d1/f2.i | |
300 | 2 r4/.hg/store/data/f1.i |
|
302 | 2 r4/.hg/store/data/f1.i | |
301 | 2 r4/.hg/store/data/f3.i |
|
303 | 2 r4/.hg/store/data/f3.i | |
302 | 2 r4/.hg/store/fncache |
|
304 | 2 r4/.hg/store/fncache | |
303 | 2 r4/.hg/store/phaseroots |
|
305 | 2 r4/.hg/store/phaseroots | |
304 | 2 r4/.hg/store/undo |
|
306 | 2 r4/.hg/store/undo | |
305 | 2 r4/.hg/store/undo.backup.fncache |
|
307 | 2 r4/.hg/store/undo.backup.fncache | |
306 | 2 r4/.hg/store/undo.backup.phaseroots |
|
308 | 2 r4/.hg/store/undo.backup.phaseroots | |
307 | 2 r4/.hg/store/undo.backupfiles |
|
309 | 2 r4/.hg/store/undo.backupfiles | |
308 | 2 r4/.hg/store/undo.phaseroots |
|
310 | 2 r4/.hg/store/undo.phaseroots | |
309 | [24] r4/\.hg/undo\.backup\.dirstate (re) |
|
311 | [24] r4/\.hg/undo\.backup\.dirstate (re) | |
310 | 2 r4/.hg/undo.bookmarks |
|
312 | 2 r4/.hg/undo.bookmarks | |
311 | 2 r4/.hg/undo.branch |
|
313 | 2 r4/.hg/undo.branch | |
312 | 2 r4/.hg/undo.desc |
|
314 | 2 r4/.hg/undo.desc | |
313 | [24] r4/\.hg/undo\.dirstate (re) |
|
315 | [24] r4/\.hg/undo\.dirstate (re) | |
314 | 2 r4/d1/data1 |
|
316 | 2 r4/d1/data1 | |
315 | 2 r4/d1/f2 |
|
317 | 2 r4/d1/f2 | |
316 | 1 r4/f1 |
|
318 | 1 r4/f1 | |
317 | 1 r4/f3 (execbit !) |
|
319 | 1 r4/f3 (execbit !) | |
318 | 2 r4/f3 (no-execbit !) |
|
320 | 2 r4/f3 (no-execbit !) | |
319 |
|
321 | |||
320 | #if hardlink-whitelisted |
|
322 | #if hardlink-whitelisted | |
321 | $ nlinksdir r4/.hg/undo.backup.dirstate r4/.hg/undo.dirstate |
|
323 | $ nlinksdir r4/.hg/undo.backup.dirstate r4/.hg/undo.dirstate | |
322 | 4 r4/.hg/undo.backup.dirstate |
|
324 | 4 r4/.hg/undo.backup.dirstate | |
323 | 4 r4/.hg/undo.dirstate |
|
325 | 4 r4/.hg/undo.dirstate | |
324 | #endif |
|
326 | #endif | |
325 |
|
327 | |||
326 | Test hardlinking outside hg: |
|
328 | Test hardlinking outside hg: | |
327 |
|
329 | |||
328 | $ mkdir x |
|
330 | $ mkdir x | |
329 | $ echo foo > x/a |
|
331 | $ echo foo > x/a | |
330 |
|
332 | |||
331 | $ linkcp x y |
|
333 | $ linkcp x y | |
332 | $ echo bar >> y/a |
|
334 | $ echo bar >> y/a | |
333 |
|
335 | |||
334 | No diff if hardlink: |
|
336 | No diff if hardlink: | |
335 |
|
337 | |||
336 | $ diff x/a y/a |
|
338 | $ diff x/a y/a | |
337 |
|
339 | |||
338 | Test mq hardlinking: |
|
340 | Test mq hardlinking: | |
339 |
|
341 | |||
340 | $ echo "[extensions]" >> $HGRCPATH |
|
342 | $ echo "[extensions]" >> $HGRCPATH | |
341 | $ echo "mq=" >> $HGRCPATH |
|
343 | $ echo "mq=" >> $HGRCPATH | |
342 |
|
344 | |||
343 | $ hg init a |
|
345 | $ hg init a | |
344 | $ cd a |
|
346 | $ cd a | |
345 |
|
347 | |||
346 | $ hg qimport -n foo - << EOF |
|
348 | $ hg qimport -n foo - << EOF | |
347 | > # HG changeset patch |
|
349 | > # HG changeset patch | |
348 | > # Date 1 0 |
|
350 | > # Date 1 0 | |
349 | > diff -r 2588a8b53d66 a |
|
351 | > diff -r 2588a8b53d66 a | |
350 | > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
352 | > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
351 | > +++ b/a Wed Jul 23 15:54:29 2008 +0200 |
|
353 | > +++ b/a Wed Jul 23 15:54:29 2008 +0200 | |
352 | > @@ -0,0 +1,1 @@ |
|
354 | > @@ -0,0 +1,1 @@ | |
353 | > +a |
|
355 | > +a | |
354 | > EOF |
|
356 | > EOF | |
355 | adding foo to series file |
|
357 | adding foo to series file | |
356 |
|
358 | |||
357 | $ hg qpush |
|
359 | $ hg qpush | |
358 | applying foo |
|
360 | applying foo | |
359 | now at: foo |
|
361 | now at: foo | |
360 |
|
362 | |||
361 | $ cd .. |
|
363 | $ cd .. | |
362 | $ linkcp a b |
|
364 | $ linkcp a b | |
363 | $ cd b |
|
365 | $ cd b | |
364 |
|
366 | |||
365 | $ hg qimport -n bar - << EOF |
|
367 | $ hg qimport -n bar - << EOF | |
366 | > # HG changeset patch |
|
368 | > # HG changeset patch | |
367 | > # Date 2 0 |
|
369 | > # Date 2 0 | |
368 | > diff -r 2588a8b53d66 a |
|
370 | > diff -r 2588a8b53d66 a | |
369 | > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
371 | > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
370 | > +++ b/b Wed Jul 23 15:54:29 2008 +0200 |
|
372 | > +++ b/b Wed Jul 23 15:54:29 2008 +0200 | |
371 | > @@ -0,0 +1,1 @@ |
|
373 | > @@ -0,0 +1,1 @@ | |
372 | > +b |
|
374 | > +b | |
373 | > EOF |
|
375 | > EOF | |
374 | adding bar to series file |
|
376 | adding bar to series file | |
375 |
|
377 | |||
376 | $ hg qpush |
|
378 | $ hg qpush | |
377 | applying bar |
|
379 | applying bar | |
378 | now at: bar |
|
380 | now at: bar | |
379 |
|
381 | |||
380 | $ cat .hg/patches/status |
|
382 | $ cat .hg/patches/status | |
381 | 430ed4828a74fa4047bc816a25500f7472ab4bfe:foo |
|
383 | 430ed4828a74fa4047bc816a25500f7472ab4bfe:foo | |
382 | 4e7abb4840c46a910f6d7b4d3c3fc7e5209e684c:bar |
|
384 | 4e7abb4840c46a910f6d7b4d3c3fc7e5209e684c:bar | |
383 |
|
385 | |||
384 | $ cat .hg/patches/series |
|
386 | $ cat .hg/patches/series | |
385 | foo |
|
387 | foo | |
386 | bar |
|
388 | bar | |
387 |
|
389 | |||
388 | $ cat ../a/.hg/patches/status |
|
390 | $ cat ../a/.hg/patches/status | |
389 | 430ed4828a74fa4047bc816a25500f7472ab4bfe:foo |
|
391 | 430ed4828a74fa4047bc816a25500f7472ab4bfe:foo | |
390 |
|
392 | |||
391 | $ cat ../a/.hg/patches/series |
|
393 | $ cat ../a/.hg/patches/series | |
392 | foo |
|
394 | foo | |
393 |
|
395 | |||
394 | Test tags hardlinking: |
|
396 | Test tags hardlinking: | |
395 |
|
397 | |||
396 | $ hg qdel -r qbase:qtip |
|
398 | $ hg qdel -r qbase:qtip | |
397 | patch foo finalized without changeset message |
|
399 | patch foo finalized without changeset message | |
398 | patch bar finalized without changeset message |
|
400 | patch bar finalized without changeset message | |
399 |
|
401 | |||
400 | $ hg tag -l lfoo |
|
402 | $ hg tag -l lfoo | |
401 | $ hg tag foo |
|
403 | $ hg tag foo | |
402 |
|
404 | |||
403 | $ cd .. |
|
405 | $ cd .. | |
404 | $ linkcp b c |
|
406 | $ linkcp b c | |
405 | $ cd c |
|
407 | $ cd c | |
406 |
|
408 | |||
407 | $ hg tag -l -r 0 lbar |
|
409 | $ hg tag -l -r 0 lbar | |
408 | $ hg tag -r 0 bar |
|
410 | $ hg tag -r 0 bar | |
409 |
|
411 | |||
410 | $ cat .hgtags |
|
412 | $ cat .hgtags | |
411 | 4e7abb4840c46a910f6d7b4d3c3fc7e5209e684c foo |
|
413 | 4e7abb4840c46a910f6d7b4d3c3fc7e5209e684c foo | |
412 | 430ed4828a74fa4047bc816a25500f7472ab4bfe bar |
|
414 | 430ed4828a74fa4047bc816a25500f7472ab4bfe bar | |
413 |
|
415 | |||
414 | $ cat .hg/localtags |
|
416 | $ cat .hg/localtags | |
415 | 4e7abb4840c46a910f6d7b4d3c3fc7e5209e684c lfoo |
|
417 | 4e7abb4840c46a910f6d7b4d3c3fc7e5209e684c lfoo | |
416 | 430ed4828a74fa4047bc816a25500f7472ab4bfe lbar |
|
418 | 430ed4828a74fa4047bc816a25500f7472ab4bfe lbar | |
417 |
|
419 | |||
418 | $ cat ../b/.hgtags |
|
420 | $ cat ../b/.hgtags | |
419 | 4e7abb4840c46a910f6d7b4d3c3fc7e5209e684c foo |
|
421 | 4e7abb4840c46a910f6d7b4d3c3fc7e5209e684c foo | |
420 |
|
422 | |||
421 | $ cat ../b/.hg/localtags |
|
423 | $ cat ../b/.hg/localtags | |
422 | 4e7abb4840c46a910f6d7b4d3c3fc7e5209e684c lfoo |
|
424 | 4e7abb4840c46a910f6d7b4d3c3fc7e5209e684c lfoo | |
423 |
|
425 | |||
424 | $ cd .. |
|
426 | $ cd .. |
@@ -1,156 +1,157 b'' | |||||
1 | #require unix-permissions |
|
1 | #require unix-permissions | |
2 |
|
2 | |||
3 | test that new files created in .hg inherit the permissions from .hg/store |
|
3 | test that new files created in .hg inherit the permissions from .hg/store | |
4 |
|
4 | |||
5 | $ mkdir dir |
|
5 | $ mkdir dir | |
6 |
|
6 | |||
7 | just in case somebody has a strange $TMPDIR |
|
7 | just in case somebody has a strange $TMPDIR | |
8 |
|
8 | |||
9 | $ chmod g-s dir |
|
9 | $ chmod g-s dir | |
10 | $ cd dir |
|
10 | $ cd dir | |
11 |
|
11 | |||
12 | $ cat >printmodes.py <<EOF |
|
12 | $ cat >printmodes.py <<EOF | |
13 | > import os, sys |
|
13 | > import os, sys | |
14 | > |
|
14 | > | |
15 | > allnames = [] |
|
15 | > allnames = [] | |
16 | > isdir = {} |
|
16 | > isdir = {} | |
17 | > for root, dirs, files in os.walk(sys.argv[1]): |
|
17 | > for root, dirs, files in os.walk(sys.argv[1]): | |
18 | > for d in dirs: |
|
18 | > for d in dirs: | |
19 | > name = os.path.join(root, d) |
|
19 | > name = os.path.join(root, d) | |
20 | > isdir[name] = 1 |
|
20 | > isdir[name] = 1 | |
21 | > allnames.append(name) |
|
21 | > allnames.append(name) | |
22 | > for f in files: |
|
22 | > for f in files: | |
23 | > name = os.path.join(root, f) |
|
23 | > name = os.path.join(root, f) | |
24 | > allnames.append(name) |
|
24 | > allnames.append(name) | |
25 | > allnames.sort() |
|
25 | > allnames.sort() | |
26 | > for name in allnames: |
|
26 | > for name in allnames: | |
27 | > suffix = name in isdir and '/' or '' |
|
27 | > suffix = name in isdir and '/' or '' | |
28 | > print '%05o %s%s' % (os.lstat(name).st_mode & 07777, name, suffix) |
|
28 | > print '%05o %s%s' % (os.lstat(name).st_mode & 07777, name, suffix) | |
29 | > EOF |
|
29 | > EOF | |
30 |
|
30 | |||
31 | $ cat >mode.py <<EOF |
|
31 | $ cat >mode.py <<EOF | |
32 | > import sys |
|
32 | > import sys | |
33 | > import os |
|
33 | > import os | |
34 | > print '%05o' % os.lstat(sys.argv[1]).st_mode |
|
34 | > print '%05o' % os.lstat(sys.argv[1]).st_mode | |
35 | > EOF |
|
35 | > EOF | |
36 |
|
36 | |||
37 | $ umask 077 |
|
37 | $ umask 077 | |
38 |
|
38 | |||
39 | $ hg init repo |
|
39 | $ hg init repo | |
40 | $ cd repo |
|
40 | $ cd repo | |
41 |
|
41 | |||
42 | $ chmod 0770 .hg/store |
|
42 | $ chmod 0770 .hg/store | |
43 |
|
43 | |||
44 | before commit |
|
44 | before commit | |
45 | store can be written by the group, other files cannot |
|
45 | store can be written by the group, other files cannot | |
46 | store is setgid |
|
46 | store is setgid | |
47 |
|
47 | |||
48 | $ $PYTHON ../printmodes.py . |
|
48 | $ $PYTHON ../printmodes.py . | |
49 | 00700 ./.hg/ |
|
49 | 00700 ./.hg/ | |
50 | 00600 ./.hg/00changelog.i |
|
50 | 00600 ./.hg/00changelog.i | |
51 | 00600 ./.hg/requires |
|
51 | 00600 ./.hg/requires | |
52 | 00770 ./.hg/store/ |
|
52 | 00770 ./.hg/store/ | |
53 |
|
53 | |||
54 | $ mkdir dir |
|
54 | $ mkdir dir | |
55 | $ touch foo dir/bar |
|
55 | $ touch foo dir/bar | |
56 | $ hg ci -qAm 'add files' |
|
56 | $ hg ci -qAm 'add files' | |
57 |
|
57 | |||
58 | after commit |
|
58 | after commit | |
59 | working dir files can only be written by the owner |
|
59 | working dir files can only be written by the owner | |
60 | files created in .hg can be written by the group |
|
60 | files created in .hg can be written by the group | |
61 | (in particular, store/**, dirstate, branch cache file, undo files) |
|
61 | (in particular, store/**, dirstate, branch cache file, undo files) | |
62 | new directories are setgid |
|
62 | new directories are setgid | |
63 |
|
63 | |||
64 | $ $PYTHON ../printmodes.py . |
|
64 | $ $PYTHON ../printmodes.py . | |
65 | 00700 ./.hg/ |
|
65 | 00700 ./.hg/ | |
66 | 00600 ./.hg/00changelog.i |
|
66 | 00600 ./.hg/00changelog.i | |
67 | 00770 ./.hg/cache/ |
|
67 | 00770 ./.hg/cache/ | |
68 | 00660 ./.hg/cache/branch2-served |
|
68 | 00660 ./.hg/cache/branch2-served | |
69 | 00660 ./.hg/cache/rbc-names-v1 |
|
69 | 00660 ./.hg/cache/rbc-names-v1 | |
70 | 00660 ./.hg/cache/rbc-revs-v1 |
|
70 | 00660 ./.hg/cache/rbc-revs-v1 | |
71 | 00660 ./.hg/dirstate |
|
71 | 00660 ./.hg/dirstate | |
|
72 | 00660 ./.hg/fsmonitor.state (fsmonitor !) | |||
72 | 00660 ./.hg/last-message.txt |
|
73 | 00660 ./.hg/last-message.txt | |
73 | 00600 ./.hg/requires |
|
74 | 00600 ./.hg/requires | |
74 | 00770 ./.hg/store/ |
|
75 | 00770 ./.hg/store/ | |
75 | 00660 ./.hg/store/00changelog.i |
|
76 | 00660 ./.hg/store/00changelog.i | |
76 | 00660 ./.hg/store/00manifest.i |
|
77 | 00660 ./.hg/store/00manifest.i | |
77 | 00770 ./.hg/store/data/ |
|
78 | 00770 ./.hg/store/data/ | |
78 | 00770 ./.hg/store/data/dir/ |
|
79 | 00770 ./.hg/store/data/dir/ | |
79 | 00660 ./.hg/store/data/dir/bar.i |
|
80 | 00660 ./.hg/store/data/dir/bar.i | |
80 | 00660 ./.hg/store/data/foo.i |
|
81 | 00660 ./.hg/store/data/foo.i | |
81 | 00660 ./.hg/store/fncache |
|
82 | 00660 ./.hg/store/fncache | |
82 | 00660 ./.hg/store/phaseroots |
|
83 | 00660 ./.hg/store/phaseroots | |
83 | 00660 ./.hg/store/undo |
|
84 | 00660 ./.hg/store/undo | |
84 | 00660 ./.hg/store/undo.backupfiles |
|
85 | 00660 ./.hg/store/undo.backupfiles | |
85 | 00660 ./.hg/store/undo.phaseroots |
|
86 | 00660 ./.hg/store/undo.phaseroots | |
86 | 00660 ./.hg/undo.backup.dirstate |
|
87 | 00660 ./.hg/undo.backup.dirstate | |
87 | 00660 ./.hg/undo.bookmarks |
|
88 | 00660 ./.hg/undo.bookmarks | |
88 | 00660 ./.hg/undo.branch |
|
89 | 00660 ./.hg/undo.branch | |
89 | 00660 ./.hg/undo.desc |
|
90 | 00660 ./.hg/undo.desc | |
90 | 00660 ./.hg/undo.dirstate |
|
91 | 00660 ./.hg/undo.dirstate | |
91 | 00700 ./dir/ |
|
92 | 00700 ./dir/ | |
92 | 00600 ./dir/bar |
|
93 | 00600 ./dir/bar | |
93 | 00600 ./foo |
|
94 | 00600 ./foo | |
94 |
|
95 | |||
95 | $ umask 007 |
|
96 | $ umask 007 | |
96 | $ hg init ../push |
|
97 | $ hg init ../push | |
97 |
|
98 | |||
98 | before push |
|
99 | before push | |
99 | group can write everything |
|
100 | group can write everything | |
100 |
|
101 | |||
101 | $ $PYTHON ../printmodes.py ../push |
|
102 | $ $PYTHON ../printmodes.py ../push | |
102 | 00770 ../push/.hg/ |
|
103 | 00770 ../push/.hg/ | |
103 | 00660 ../push/.hg/00changelog.i |
|
104 | 00660 ../push/.hg/00changelog.i | |
104 | 00660 ../push/.hg/requires |
|
105 | 00660 ../push/.hg/requires | |
105 | 00770 ../push/.hg/store/ |
|
106 | 00770 ../push/.hg/store/ | |
106 |
|
107 | |||
107 | $ umask 077 |
|
108 | $ umask 077 | |
108 | $ hg -q push ../push |
|
109 | $ hg -q push ../push | |
109 |
|
110 | |||
110 | after push |
|
111 | after push | |
111 | group can still write everything |
|
112 | group can still write everything | |
112 |
|
113 | |||
113 | $ $PYTHON ../printmodes.py ../push |
|
114 | $ $PYTHON ../printmodes.py ../push | |
114 | 00770 ../push/.hg/ |
|
115 | 00770 ../push/.hg/ | |
115 | 00660 ../push/.hg/00changelog.i |
|
116 | 00660 ../push/.hg/00changelog.i | |
116 | 00770 ../push/.hg/cache/ |
|
117 | 00770 ../push/.hg/cache/ | |
117 | 00660 ../push/.hg/cache/branch2-base |
|
118 | 00660 ../push/.hg/cache/branch2-base | |
118 | 00660 ../push/.hg/dirstate |
|
119 | 00660 ../push/.hg/dirstate | |
119 | 00660 ../push/.hg/requires |
|
120 | 00660 ../push/.hg/requires | |
120 | 00770 ../push/.hg/store/ |
|
121 | 00770 ../push/.hg/store/ | |
121 | 00660 ../push/.hg/store/00changelog.i |
|
122 | 00660 ../push/.hg/store/00changelog.i | |
122 | 00660 ../push/.hg/store/00manifest.i |
|
123 | 00660 ../push/.hg/store/00manifest.i | |
123 | 00770 ../push/.hg/store/data/ |
|
124 | 00770 ../push/.hg/store/data/ | |
124 | 00770 ../push/.hg/store/data/dir/ |
|
125 | 00770 ../push/.hg/store/data/dir/ | |
125 | 00660 ../push/.hg/store/data/dir/bar.i |
|
126 | 00660 ../push/.hg/store/data/dir/bar.i | |
126 | 00660 ../push/.hg/store/data/foo.i |
|
127 | 00660 ../push/.hg/store/data/foo.i | |
127 | 00660 ../push/.hg/store/fncache |
|
128 | 00660 ../push/.hg/store/fncache | |
128 | 00660 ../push/.hg/store/undo |
|
129 | 00660 ../push/.hg/store/undo | |
129 | 00660 ../push/.hg/store/undo.backupfiles |
|
130 | 00660 ../push/.hg/store/undo.backupfiles | |
130 | 00660 ../push/.hg/store/undo.phaseroots |
|
131 | 00660 ../push/.hg/store/undo.phaseroots | |
131 | 00660 ../push/.hg/undo.bookmarks |
|
132 | 00660 ../push/.hg/undo.bookmarks | |
132 | 00660 ../push/.hg/undo.branch |
|
133 | 00660 ../push/.hg/undo.branch | |
133 | 00660 ../push/.hg/undo.desc |
|
134 | 00660 ../push/.hg/undo.desc | |
134 | 00660 ../push/.hg/undo.dirstate |
|
135 | 00660 ../push/.hg/undo.dirstate | |
135 |
|
136 | |||
136 |
|
137 | |||
137 | Test that we don't lose the setgid bit when we call chmod. |
|
138 | Test that we don't lose the setgid bit when we call chmod. | |
138 | Not all systems support setgid directories (e.g. HFS+), so |
|
139 | Not all systems support setgid directories (e.g. HFS+), so | |
139 | just check that directories have the same mode. |
|
140 | just check that directories have the same mode. | |
140 |
|
141 | |||
141 | $ cd .. |
|
142 | $ cd .. | |
142 | $ hg init setgid |
|
143 | $ hg init setgid | |
143 | $ cd setgid |
|
144 | $ cd setgid | |
144 | $ chmod g+rwx .hg/store |
|
145 | $ chmod g+rwx .hg/store | |
145 | $ chmod g+s .hg/store 2> /dev/null || true |
|
146 | $ chmod g+s .hg/store 2> /dev/null || true | |
146 | $ mkdir dir |
|
147 | $ mkdir dir | |
147 | $ touch dir/file |
|
148 | $ touch dir/file | |
148 | $ hg ci -qAm 'add dir/file' |
|
149 | $ hg ci -qAm 'add dir/file' | |
149 | $ storemode=`$PYTHON ../mode.py .hg/store` |
|
150 | $ storemode=`$PYTHON ../mode.py .hg/store` | |
150 | $ dirmode=`$PYTHON ../mode.py .hg/store/data/dir` |
|
151 | $ dirmode=`$PYTHON ../mode.py .hg/store/data/dir` | |
151 | $ if [ "$storemode" != "$dirmode" ]; then |
|
152 | $ if [ "$storemode" != "$dirmode" ]; then | |
152 | > echo "$storemode != $dirmode" |
|
153 | > echo "$storemode != $dirmode" | |
153 | > fi |
|
154 | > fi | |
154 | $ cd .. |
|
155 | $ cd .. | |
155 |
|
156 | |||
156 | $ cd .. # g-s dir |
|
157 | $ cd .. # g-s dir |
General Comments 0
You need to be logged in to leave comments.
Login now