Show More
@@ -1,441 +1,441 b'' | |||||
1 | #require hardlink reporevlogstore |
|
1 | #require hardlink reporevlogstore | |
2 |
|
2 | |||
3 | $ cat > nlinks.py <<EOF |
|
3 | $ cat > nlinks.py <<EOF | |
4 | > import sys |
|
4 | > import sys | |
5 | > from mercurial import pycompat, util |
|
5 | > from mercurial import pycompat, 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(pycompat.fsencode(f)), f) |
|
8 | > print(util.nlinks(pycompat.fsencode(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 | > import sys |
|
19 | > import sys | |
20 | > from mercurial import pycompat, util |
|
20 | > from mercurial import pycompat, util | |
21 | > util.copyfiles(pycompat.fsencode(sys.argv[1]), |
|
21 | > util.copyfiles(pycompat.fsencode(sys.argv[1]), | |
22 | > pycompat.fsencode(sys.argv[2]), hardlink=True) |
|
22 | > pycompat.fsencode(sys.argv[2]), hardlink=True) | |
23 | > EOF |
|
23 | > EOF | |
24 |
|
24 | |||
25 | $ linkcp() |
|
25 | $ linkcp() | |
26 | > { |
|
26 | > { | |
27 | > "$PYTHON" $TESTTMP/linkcp.py $1 $2 |
|
27 | > "$PYTHON" $TESTTMP/linkcp.py $1 $2 | |
28 | > } |
|
28 | > } | |
29 |
|
29 | |||
30 | Prepare repo r1: |
|
30 | Prepare repo r1: | |
31 |
|
31 | |||
32 | $ hg init r1 |
|
32 | $ hg init r1 | |
33 | $ cd r1 |
|
33 | $ cd r1 | |
34 |
|
34 | |||
35 | $ echo c1 > f1 |
|
35 | $ echo c1 > f1 | |
36 | $ hg add f1 |
|
36 | $ hg add f1 | |
37 | $ hg ci -m0 |
|
37 | $ hg ci -m0 | |
38 |
|
38 | |||
39 | $ mkdir d1 |
|
39 | $ mkdir d1 | |
40 | $ cd d1 |
|
40 | $ cd d1 | |
41 | $ echo c2 > f2 |
|
41 | $ echo c2 > f2 | |
42 | $ hg add f2 |
|
42 | $ hg add f2 | |
43 | $ hg ci -m1 |
|
43 | $ hg ci -m1 | |
44 | $ cd ../.. |
|
44 | $ cd ../.. | |
45 |
|
45 | |||
46 | $ nlinksdir r1/.hg/store |
|
46 | $ nlinksdir r1/.hg/store | |
47 | 1 r1/.hg/store/00changelog.i |
|
47 | 1 r1/.hg/store/00changelog.i | |
48 | 1 r1/.hg/store/00manifest.i |
|
48 | 1 r1/.hg/store/00manifest.i | |
49 | 1 r1/.hg/store/data/d1/f2.i |
|
49 | 1 r1/.hg/store/data/d1/f2.i | |
50 | 1 r1/.hg/store/data/f1.i |
|
50 | 1 r1/.hg/store/data/f1.i | |
51 | 1 r1/.hg/store/fncache (repofncache !) |
|
51 | 1 r1/.hg/store/fncache (repofncache !) | |
52 | 1 r1/.hg/store/phaseroots |
|
52 | 1 r1/.hg/store/phaseroots | |
53 | 1 r1/.hg/store/requires |
|
53 | 1 r1/.hg/store/requires | |
54 | 1 r1/.hg/store/undo |
|
54 | 1 r1/.hg/store/undo | |
55 | 1 r1/.hg/store/undo.backup.fncache (repofncache !) |
|
55 | 1 r1/.hg/store/undo.backup.fncache (repofncache !) | |
56 | 1 r1/.hg/store/undo.backupfiles |
|
56 | 1 r1/.hg/store/undo.backupfiles | |
57 | 1 r1/.hg/store/undo.phaseroots |
|
57 | 1 r1/.hg/store/undo.phaseroots | |
58 |
|
58 | |||
59 |
|
59 | |||
60 | Create hardlinked clone r2: |
|
60 | Create hardlinked clone r2: | |
61 |
|
61 | |||
62 | $ hg clone -U --debug r1 r2 --config progress.debug=true |
|
62 | $ hg clone -U --debug r1 r2 --config progress.debug=true | |
63 | linking: 1/7 files (14.29%) |
|
63 | linking: 1/7 files (14.29%) | |
64 | linking: 2/7 files (28.57%) |
|
64 | linking: 2/7 files (28.57%) | |
65 | linking: 3/7 files (42.86%) |
|
65 | linking: 3/7 files (42.86%) | |
66 | linking: 4/7 files (57.14%) |
|
66 | linking: 4/7 files (57.14%) | |
67 | linking: 5/7 files (71.43%) |
|
67 | linking: 5/7 files (71.43%) | |
68 | linking: 6/7 files (85.71%) |
|
68 | linking: 6/7 files (85.71%) | |
69 | linking: 7/7 files (100.00%) |
|
69 | linking: 7/7 files (100.00%) | |
70 | linked 7 files |
|
70 | linked 7 files | |
71 | updating the branch cache |
|
71 | updating the branch cache | |
72 |
|
72 | |||
73 | Create non-hardlinked clone r3: |
|
73 | Create non-hardlinked clone r3: | |
74 |
|
74 | |||
75 | $ hg clone --pull r1 r3 |
|
75 | $ hg clone --pull r1 r3 | |
76 | requesting all changes |
|
76 | requesting all changes | |
77 | adding changesets |
|
77 | adding changesets | |
78 | adding manifests |
|
78 | adding manifests | |
79 | adding file changes |
|
79 | adding file changes | |
80 | added 2 changesets with 2 changes to 2 files |
|
80 | added 2 changesets with 2 changes to 2 files | |
81 | new changesets 40d85e9847f2:7069c422939c |
|
81 | new changesets 40d85e9847f2:7069c422939c | |
82 | updating to branch default |
|
82 | updating to branch default | |
83 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
83 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
84 |
|
84 | |||
85 |
|
85 | |||
86 | Repos r1 and r2 should now contain hardlinked files: |
|
86 | Repos r1 and r2 should now contain hardlinked files: | |
87 |
|
87 | |||
88 | $ nlinksdir r1/.hg/store |
|
88 | $ nlinksdir r1/.hg/store | |
89 | 2 r1/.hg/store/00changelog.i |
|
89 | 2 r1/.hg/store/00changelog.i | |
90 | 2 r1/.hg/store/00manifest.i |
|
90 | 2 r1/.hg/store/00manifest.i | |
91 | 2 r1/.hg/store/data/d1/f2.i |
|
91 | 2 r1/.hg/store/data/d1/f2.i | |
92 | 2 r1/.hg/store/data/f1.i |
|
92 | 2 r1/.hg/store/data/f1.i | |
93 | 1 r1/.hg/store/fncache (repofncache !) |
|
93 | 1 r1/.hg/store/fncache (repofncache !) | |
94 | 1 r1/.hg/store/phaseroots |
|
94 | 1 r1/.hg/store/phaseroots | |
95 | 1 r1/.hg/store/requires |
|
95 | 1 r1/.hg/store/requires | |
96 | 1 r1/.hg/store/undo |
|
96 | 1 r1/.hg/store/undo | |
97 | 1 r1/.hg/store/undo.backup.fncache (repofncache !) |
|
97 | 1 r1/.hg/store/undo.backup.fncache (repofncache !) | |
98 | 1 r1/.hg/store/undo.backupfiles |
|
98 | 1 r1/.hg/store/undo.backupfiles | |
99 | 1 r1/.hg/store/undo.phaseroots |
|
99 | 1 r1/.hg/store/undo.phaseroots | |
100 |
|
100 | |||
101 | $ nlinksdir r2/.hg/store |
|
101 | $ nlinksdir r2/.hg/store | |
102 | 2 r2/.hg/store/00changelog.i |
|
102 | 2 r2/.hg/store/00changelog.i | |
103 | 2 r2/.hg/store/00manifest.i |
|
103 | 2 r2/.hg/store/00manifest.i | |
104 | 2 r2/.hg/store/data/d1/f2.i |
|
104 | 2 r2/.hg/store/data/d1/f2.i | |
105 | 2 r2/.hg/store/data/f1.i |
|
105 | 2 r2/.hg/store/data/f1.i | |
106 | 1 r2/.hg/store/fncache (repofncache !) |
|
106 | 1 r2/.hg/store/fncache (repofncache !) | |
107 | 1 r2/.hg/store/requires |
|
107 | 1 r2/.hg/store/requires | |
108 |
|
108 | |||
109 | Repo r3 should not be hardlinked: |
|
109 | Repo r3 should not be hardlinked: | |
110 |
|
110 | |||
111 | $ nlinksdir r3/.hg/store |
|
111 | $ nlinksdir r3/.hg/store | |
112 | 1 r3/.hg/store/00changelog.i |
|
112 | 1 r3/.hg/store/00changelog.i | |
113 | 1 r3/.hg/store/00manifest.i |
|
113 | 1 r3/.hg/store/00manifest.i | |
114 | 1 r3/.hg/store/data/d1/f2.i |
|
114 | 1 r3/.hg/store/data/d1/f2.i | |
115 | 1 r3/.hg/store/data/f1.i |
|
115 | 1 r3/.hg/store/data/f1.i | |
116 | 1 r3/.hg/store/fncache (repofncache !) |
|
116 | 1 r3/.hg/store/fncache (repofncache !) | |
117 | 1 r3/.hg/store/phaseroots |
|
117 | 1 r3/.hg/store/phaseroots | |
118 | 1 r3/.hg/store/requires |
|
118 | 1 r3/.hg/store/requires | |
119 | 1 r3/.hg/store/undo |
|
119 | 1 r3/.hg/store/undo | |
120 | 1 r3/.hg/store/undo.backupfiles |
|
120 | 1 r3/.hg/store/undo.backupfiles | |
121 | 1 r3/.hg/store/undo.phaseroots |
|
121 | 1 r3/.hg/store/undo.phaseroots | |
122 |
|
122 | |||
123 |
|
123 | |||
124 | Create a non-inlined filelog in r3: |
|
124 | Create a non-inlined filelog in r3: | |
125 |
|
125 | |||
126 | $ cd r3/d1 |
|
126 | $ cd r3/d1 | |
127 | >>> f = open('data1', 'wb') |
|
127 | >>> f = open('data1', 'wb') | |
128 | >>> for x in range(10000): |
|
128 | >>> for x in range(10000): | |
129 | ... f.write(b"%d\n" % x) and None |
|
129 | ... f.write(b"%d\n" % x) and None | |
130 | >>> f.close() |
|
130 | >>> f.close() | |
131 | $ for j in 0 1 2 3 4 5 6 7 8 9; do |
|
131 | $ for j in 0 1 2 3 4 5 6 7 8 9; do | |
132 | > cat data1 >> f2 |
|
132 | > cat data1 >> f2 | |
133 | > hg commit -m$j |
|
133 | > hg commit -m$j | |
134 | > done |
|
134 | > done | |
135 | $ cd ../.. |
|
135 | $ cd ../.. | |
136 |
|
136 | |||
137 | $ nlinksdir r3/.hg/store |
|
137 | $ nlinksdir r3/.hg/store | |
138 | 1 r3/.hg/store/00changelog.i |
|
138 | 1 r3/.hg/store/00changelog.i | |
139 | 1 r3/.hg/store/00manifest.i |
|
139 | 1 r3/.hg/store/00manifest.i | |
140 | 1 r3/.hg/store/data/d1/f2.d |
|
140 | 1 r3/.hg/store/data/d1/f2.d | |
141 | 1 r3/.hg/store/data/d1/f2.i |
|
141 | 1 r3/.hg/store/data/d1/f2.i | |
142 | 1 r3/.hg/store/data/f1.i |
|
142 | 1 r3/.hg/store/data/f1.i | |
143 | 1 r3/.hg/store/fncache (repofncache !) |
|
143 | 1 r3/.hg/store/fncache (repofncache !) | |
144 | 1 r3/.hg/store/phaseroots |
|
144 | 1 r3/.hg/store/phaseroots | |
145 | 1 r3/.hg/store/requires |
|
145 | 1 r3/.hg/store/requires | |
146 | 1 r3/.hg/store/undo |
|
146 | 1 r3/.hg/store/undo | |
147 | 1 r3/.hg/store/undo.backup.fncache (repofncache !) |
|
147 | 1 r3/.hg/store/undo.backup.fncache (repofncache !) | |
148 | 1 r3/.hg/store/undo.backup.phaseroots |
|
148 | 1 r3/.hg/store/undo.backup.phaseroots | |
149 | 1 r3/.hg/store/undo.backupfiles |
|
149 | 1 r3/.hg/store/undo.backupfiles | |
150 | 1 r3/.hg/store/undo.phaseroots |
|
150 | 1 r3/.hg/store/undo.phaseroots | |
151 |
|
151 | |||
152 | Push to repo r1 should break up most hardlinks in r2: |
|
152 | Push to repo r1 should break up most hardlinks in r2: | |
153 |
|
153 | |||
154 | $ hg -R r2 verify -q |
|
154 | $ hg -R r2 verify -q | |
155 |
|
155 | |||
156 | $ cd r3 |
|
156 | $ cd r3 | |
157 | $ hg push |
|
157 | $ hg push | |
158 | pushing to $TESTTMP/r1 |
|
158 | pushing to $TESTTMP/r1 | |
159 | searching for changes |
|
159 | searching for changes | |
160 | adding changesets |
|
160 | adding changesets | |
161 | adding manifests |
|
161 | adding manifests | |
162 | adding file changes |
|
162 | adding file changes | |
163 | added 10 changesets with 10 changes to 1 files |
|
163 | added 10 changesets with 10 changes to 1 files | |
164 |
|
164 | |||
165 | $ cd .. |
|
165 | $ cd .. | |
166 |
|
166 | |||
167 | $ nlinksdir r2/.hg/store |
|
167 | $ nlinksdir r2/.hg/store | |
168 | 1 r2/.hg/store/00changelog.i |
|
168 | 1 r2/.hg/store/00changelog.i | |
169 | 1 r2/.hg/store/00manifest.i |
|
169 | 1 r2/.hg/store/00manifest.i | |
170 | 1 r2/.hg/store/data/d1/f2.i |
|
170 | 1 r2/.hg/store/data/d1/f2.i | |
171 | 2 r2/.hg/store/data/f1.i |
|
171 | 2 r2/.hg/store/data/f1.i | |
172 | [12] r2/\.hg/store/fncache (re) (repofncache !) |
|
172 | [12] r2/\.hg/store/fncache (re) (repofncache !) | |
173 | 1 r2/.hg/store/requires |
|
173 | 1 r2/.hg/store/requires | |
174 |
|
174 | |||
175 | #if hardlink-whitelisted repofncache |
|
175 | #if hardlink-whitelisted repofncache | |
176 | $ nlinksdir r2/.hg/store/fncache |
|
176 | $ nlinksdir r2/.hg/store/fncache | |
177 | 1 r2/.hg/store/fncache |
|
177 | 1 r2/.hg/store/fncache | |
178 | #endif |
|
178 | #endif | |
179 |
|
179 | |||
180 | $ hg -R r2 verify -q |
|
180 | $ hg -R r2 verify -q | |
181 |
|
181 | |||
182 | $ cd r1 |
|
182 | $ cd r1 | |
183 | $ hg up |
|
183 | $ hg up | |
184 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
184 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | |
185 |
|
185 | |||
186 | Committing a change to f1 in r1 must break up hardlink f1.i in r2: |
|
186 | Committing a change to f1 in r1 must break up hardlink f1.i in r2: | |
187 |
|
187 | |||
188 | $ echo c1c1 >> f1 |
|
188 | $ echo c1c1 >> f1 | |
189 | $ hg ci -m00 |
|
189 | $ hg ci -m00 | |
190 | $ cd .. |
|
190 | $ cd .. | |
191 |
|
191 | |||
192 | $ nlinksdir r2/.hg/store |
|
192 | $ nlinksdir r2/.hg/store | |
193 | 1 r2/.hg/store/00changelog.i |
|
193 | 1 r2/.hg/store/00changelog.i | |
194 | 1 r2/.hg/store/00manifest.i |
|
194 | 1 r2/.hg/store/00manifest.i | |
195 | 1 r2/.hg/store/data/d1/f2.i |
|
195 | 1 r2/.hg/store/data/d1/f2.i | |
196 | 1 r2/.hg/store/data/f1.i |
|
196 | 1 r2/.hg/store/data/f1.i | |
197 | 1 r2/.hg/store/fncache (repofncache !) |
|
197 | 1 r2/.hg/store/fncache (repofncache !) | |
198 | 1 r2/.hg/store/requires |
|
198 | 1 r2/.hg/store/requires | |
199 |
|
199 | |||
200 | #if hardlink-whitelisted repofncache |
|
200 | #if hardlink-whitelisted repofncache | |
201 | $ nlinksdir r2/.hg/store/fncache |
|
201 | $ nlinksdir r2/.hg/store/fncache | |
202 | 1 r2/.hg/store/fncache |
|
202 | 1 r2/.hg/store/fncache | |
203 | #endif |
|
203 | #endif | |
204 |
|
204 | |||
205 | Create a file which exec permissions we will change |
|
205 | Create a file which exec permissions we will change | |
206 | $ cd r3 |
|
206 | $ cd r3 | |
207 | $ echo "echo hello world" > f3 |
|
207 | $ echo "echo hello world" > f3 | |
208 | $ hg add f3 |
|
208 | $ hg add f3 | |
209 | $ hg ci -mf3 |
|
209 | $ hg ci -mf3 | |
210 | $ cd .. |
|
210 | $ cd .. | |
211 |
|
211 | |||
212 | $ cd r3 |
|
212 | $ cd r3 | |
213 | $ hg tip --template '{rev}:{node|short}\n' |
|
213 | $ hg tip --template '{rev}:{node|short}\n' | |
214 | 12:d3b77733a28a |
|
214 | 12:d3b77733a28a | |
215 | $ echo bla > f1 |
|
215 | $ echo bla > f1 | |
216 | $ chmod +x f3 |
|
216 | $ chmod +x f3 | |
217 | $ hg ci -m1 |
|
217 | $ hg ci -m1 | |
218 | $ cd .. |
|
218 | $ cd .. | |
219 |
|
219 | |||
220 | Create hardlinked copy r4 of r3 (on Linux, we would call 'cp -al'): |
|
220 | Create hardlinked copy r4 of r3 (on Linux, we would call 'cp -al'): | |
221 |
|
221 | |||
222 | $ linkcp r3 r4 |
|
222 | $ linkcp r3 r4 | |
223 |
|
223 | |||
224 | 'checklink' is produced by hardlinking a symlink, which is undefined whether |
|
224 | 'checklink' is produced by hardlinking a symlink, which is undefined whether | |
225 | the symlink should be followed or not. It does behave differently on Linux and |
|
225 | the symlink should be followed or not. It does behave differently on Linux and | |
226 | BSD. Just remove it so the test pass on both platforms. |
|
226 | BSD. Just remove it so the test pass on both platforms. | |
227 |
|
227 | |||
228 | $ rm -f r4/.hg/wcache/checklink |
|
228 | $ rm -f r4/.hg/wcache/checklink | |
229 |
|
229 | |||
230 | r4 has hardlinks in the working dir (not just inside .hg): |
|
230 | r4 has hardlinks in the working dir (not just inside .hg): | |
231 |
|
231 | |||
232 | $ nlinksdir r4 |
|
232 | $ nlinksdir r4 | |
233 | 2 r4/.hg/00changelog.i |
|
233 | 2 r4/.hg/00changelog.i | |
234 | 2 r4/.hg/branch |
|
234 | 2 r4/.hg/branch | |
235 | 2 r4/.hg/cache/branch2-base |
|
235 | 2 r4/.hg/cache/branch2-base | |
236 | 2 r4/.hg/cache/branch2-immutable |
|
236 | 2 r4/.hg/cache/branch2-immutable | |
237 | 2 r4/.hg/cache/branch2-served |
|
237 | 2 r4/.hg/cache/branch2-served | |
238 | 2 r4/.hg/cache/branch2-served.hidden |
|
238 | 2 r4/.hg/cache/branch2-served.hidden | |
239 | 2 r4/.hg/cache/branch2-visible |
|
239 | 2 r4/.hg/cache/branch2-visible | |
240 | 2 r4/.hg/cache/branch2-visible-hidden |
|
240 | 2 r4/.hg/cache/branch2-visible-hidden | |
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/cache/tags2 |
|
243 | 2 r4/.hg/cache/tags2 | |
244 | 2 r4/.hg/cache/tags2-served |
|
244 | 2 r4/.hg/cache/tags2-served | |
245 | 2 r4/.hg/dirstate |
|
245 | 2 r4/.hg/dirstate | |
246 | 2 r4/.hg/fsmonitor.state (fsmonitor !) |
|
246 | 2 r4/.hg/fsmonitor.state (fsmonitor !) | |
247 | 2 r4/.hg/hgrc |
|
247 | 2 r4/.hg/hgrc | |
248 | 2 r4/.hg/last-message.txt |
|
248 | 2 r4/.hg/last-message.txt | |
249 | 2 r4/.hg/requires |
|
249 | 2 r4/.hg/requires | |
250 | 2 r4/.hg/store/00changelog.i |
|
250 | 2 r4/.hg/store/00changelog.i | |
251 | 2 r4/.hg/store/00manifest.i |
|
251 | 2 r4/.hg/store/00manifest.i | |
252 | 2 r4/.hg/store/data/d1/f2.d |
|
252 | 2 r4/.hg/store/data/d1/f2.d | |
253 | 2 r4/.hg/store/data/d1/f2.i |
|
253 | 2 r4/.hg/store/data/d1/f2.i | |
254 | 2 r4/.hg/store/data/f1.i |
|
254 | 2 r4/.hg/store/data/f1.i | |
255 | 2 r4/.hg/store/data/f3.i |
|
255 | 2 r4/.hg/store/data/f3.i | |
256 | 2 r4/.hg/store/fncache (repofncache !) |
|
256 | 2 r4/.hg/store/fncache (repofncache !) | |
257 | 2 r4/.hg/store/phaseroots |
|
257 | 2 r4/.hg/store/phaseroots | |
258 | 2 r4/.hg/store/requires |
|
258 | 2 r4/.hg/store/requires | |
259 | 2 r4/.hg/store/undo |
|
259 | 2 r4/.hg/store/undo | |
260 | 2 r4/.hg/store/undo.backup.fncache (repofncache !) |
|
260 | 2 r4/.hg/store/undo.backup.fncache (repofncache !) | |
261 | 2 r4/.hg/store/undo.backup.phaseroots |
|
261 | 2 r4/.hg/store/undo.backup.phaseroots | |
262 | 2 r4/.hg/store/undo.backupfiles |
|
262 | 2 r4/.hg/store/undo.backupfiles | |
263 | 2 r4/.hg/store/undo.phaseroots |
|
263 | 2 r4/.hg/store/undo.phaseroots | |
264 | [24] r4/\.hg/undo\.backup\.dirstate (re) |
|
264 | [24] r4/\.hg/undo\.backup\.dirstate (re) | |
265 | 2 r4/.hg/undo.bookmarks |
|
265 | 2 r4/.hg/undo.bookmarks | |
266 | 2 r4/.hg/undo.branch |
|
266 | 2 r4/.hg/undo.branch | |
267 | 2 r4/.hg/undo.desc |
|
267 | 2 r4/.hg/undo.desc | |
268 | [24] r4/\.hg/undo\.dirstate (re) |
|
268 | [24] r4/\.hg/undo\.dirstate (re) | |
269 | 2 r4/.hg/wcache/checkisexec (execbit !) |
|
269 | 2 r4/.hg/wcache/checkisexec (execbit !) | |
270 | 2 r4/.hg/wcache/checklink-target (symlink !) |
|
270 | 2 r4/.hg/wcache/checklink-target (symlink !) | |
271 | 2 r4/.hg/wcache/checknoexec (execbit !) |
|
271 | 2 r4/.hg/wcache/checknoexec (execbit !) | |
272 | 2 r4/.hg/wcache/manifestfulltextcache (reporevlogstore !) |
|
272 | 2 r4/.hg/wcache/manifestfulltextcache (reporevlogstore !) | |
273 | 2 r4/d1/data1 |
|
273 | 2 r4/d1/data1 | |
274 | 2 r4/d1/f2 |
|
274 | 2 r4/d1/f2 | |
275 | 2 r4/f1 |
|
275 | 2 r4/f1 | |
276 | 2 r4/f3 |
|
276 | 2 r4/f3 | |
277 |
|
277 | |||
278 | Update back to revision 12 in r4 should break hardlink of file f1 and f3: |
|
278 | Update back to revision 12 in r4 should break hardlink of file f1 and f3: | |
279 | #if hardlink-whitelisted |
|
279 | #if hardlink-whitelisted | |
280 |
$ nlinksdir r4/.hg/undo.backup.dirstate r4/.hg/ |
|
280 | $ nlinksdir r4/.hg/undo.backup.dirstate r4/.hg/dirstate | |
|
281 | 2 r4/.hg/dirstate | |||
281 | 4 r4/.hg/undo.backup.dirstate |
|
282 | 4 r4/.hg/undo.backup.dirstate | |
282 | 4 r4/.hg/undo.dirstate |
|
|||
283 | #endif |
|
283 | #endif | |
284 |
|
284 | |||
285 |
|
285 | |||
286 | $ hg -R r4 up 12 |
|
286 | $ hg -R r4 up 12 | |
287 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved (execbit !) |
|
287 | 2 files updated, 0 files merged, 0 files removed, 0 files unresolved (execbit !) | |
288 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved (no-execbit !) |
|
288 | 1 files updated, 0 files merged, 0 files removed, 0 files unresolved (no-execbit !) | |
289 |
|
289 | |||
290 | $ nlinksdir r4 |
|
290 | $ nlinksdir r4 | |
291 | 2 r4/.hg/00changelog.i |
|
291 | 2 r4/.hg/00changelog.i | |
292 | 1 r4/.hg/branch |
|
292 | 1 r4/.hg/branch | |
293 | 2 r4/.hg/cache/branch2-base |
|
293 | 2 r4/.hg/cache/branch2-base | |
294 | 2 r4/.hg/cache/branch2-immutable |
|
294 | 2 r4/.hg/cache/branch2-immutable | |
295 | 2 r4/.hg/cache/branch2-served |
|
295 | 2 r4/.hg/cache/branch2-served | |
296 | 2 r4/.hg/cache/branch2-served.hidden |
|
296 | 2 r4/.hg/cache/branch2-served.hidden | |
297 | 2 r4/.hg/cache/branch2-visible |
|
297 | 2 r4/.hg/cache/branch2-visible | |
298 | 2 r4/.hg/cache/branch2-visible-hidden |
|
298 | 2 r4/.hg/cache/branch2-visible-hidden | |
299 | 2 r4/.hg/cache/rbc-names-v1 |
|
299 | 2 r4/.hg/cache/rbc-names-v1 | |
300 | 2 r4/.hg/cache/rbc-revs-v1 |
|
300 | 2 r4/.hg/cache/rbc-revs-v1 | |
301 | 2 r4/.hg/cache/tags2 |
|
301 | 2 r4/.hg/cache/tags2 | |
302 | 2 r4/.hg/cache/tags2-served |
|
302 | 2 r4/.hg/cache/tags2-served | |
303 | 1 r4/.hg/dirstate |
|
303 | 1 r4/.hg/dirstate | |
304 | 1 r4/.hg/fsmonitor.state (fsmonitor !) |
|
304 | 1 r4/.hg/fsmonitor.state (fsmonitor !) | |
305 | 2 r4/.hg/hgrc |
|
305 | 2 r4/.hg/hgrc | |
306 | 2 r4/.hg/last-message.txt |
|
306 | 2 r4/.hg/last-message.txt | |
307 | 2 r4/.hg/requires |
|
307 | 2 r4/.hg/requires | |
308 | 2 r4/.hg/store/00changelog.i |
|
308 | 2 r4/.hg/store/00changelog.i | |
309 | 2 r4/.hg/store/00manifest.i |
|
309 | 2 r4/.hg/store/00manifest.i | |
310 | 2 r4/.hg/store/data/d1/f2.d |
|
310 | 2 r4/.hg/store/data/d1/f2.d | |
311 | 2 r4/.hg/store/data/d1/f2.i |
|
311 | 2 r4/.hg/store/data/d1/f2.i | |
312 | 2 r4/.hg/store/data/f1.i |
|
312 | 2 r4/.hg/store/data/f1.i | |
313 | 2 r4/.hg/store/data/f3.i |
|
313 | 2 r4/.hg/store/data/f3.i | |
314 | 2 r4/.hg/store/fncache |
|
314 | 2 r4/.hg/store/fncache | |
315 | 2 r4/.hg/store/phaseroots |
|
315 | 2 r4/.hg/store/phaseroots | |
316 | 2 r4/.hg/store/requires |
|
316 | 2 r4/.hg/store/requires | |
317 | 2 r4/.hg/store/undo |
|
317 | 2 r4/.hg/store/undo | |
318 | 2 r4/.hg/store/undo.backup.fncache (repofncache !) |
|
318 | 2 r4/.hg/store/undo.backup.fncache (repofncache !) | |
319 | 2 r4/.hg/store/undo.backup.phaseroots |
|
319 | 2 r4/.hg/store/undo.backup.phaseroots | |
320 | 2 r4/.hg/store/undo.backupfiles |
|
320 | 2 r4/.hg/store/undo.backupfiles | |
321 | 2 r4/.hg/store/undo.phaseroots |
|
321 | 2 r4/.hg/store/undo.phaseroots | |
322 | [24] r4/\.hg/undo\.backup\.dirstate (re) |
|
322 | [24] r4/\.hg/undo\.backup\.dirstate (re) | |
323 | 2 r4/.hg/undo.bookmarks |
|
323 | 2 r4/.hg/undo.bookmarks | |
324 | 2 r4/.hg/undo.branch |
|
324 | 2 r4/.hg/undo.branch | |
325 | 2 r4/.hg/undo.desc |
|
325 | 2 r4/.hg/undo.desc | |
326 | [24] r4/\.hg/undo\.dirstate (re) |
|
326 | [24] r4/\.hg/undo\.dirstate (re) | |
327 | 2 r4/.hg/wcache/checkisexec (execbit !) |
|
327 | 2 r4/.hg/wcache/checkisexec (execbit !) | |
328 | 2 r4/.hg/wcache/checklink-target (symlink !) |
|
328 | 2 r4/.hg/wcache/checklink-target (symlink !) | |
329 | 2 r4/.hg/wcache/checknoexec (execbit !) |
|
329 | 2 r4/.hg/wcache/checknoexec (execbit !) | |
330 | 1 r4/.hg/wcache/manifestfulltextcache (reporevlogstore !) |
|
330 | 1 r4/.hg/wcache/manifestfulltextcache (reporevlogstore !) | |
331 | 2 r4/d1/data1 |
|
331 | 2 r4/d1/data1 | |
332 | 2 r4/d1/f2 |
|
332 | 2 r4/d1/f2 | |
333 | 1 r4/f1 |
|
333 | 1 r4/f1 | |
334 | 1 r4/f3 (execbit !) |
|
334 | 1 r4/f3 (execbit !) | |
335 | 2 r4/f3 (no-execbit !) |
|
335 | 2 r4/f3 (no-execbit !) | |
336 |
|
336 | |||
337 | #if hardlink-whitelisted |
|
337 | #if hardlink-whitelisted | |
338 |
$ nlinksdir r4/.hg/undo.backup.dirstate r4/.hg/ |
|
338 | $ nlinksdir r4/.hg/undo.backup.dirstate r4/.hg/dirstate | |
|
339 | 1 r4/.hg/dirstate | |||
339 | 4 r4/.hg/undo.backup.dirstate |
|
340 | 4 r4/.hg/undo.backup.dirstate | |
340 | 4 r4/.hg/undo.dirstate |
|
|||
341 | #endif |
|
341 | #endif | |
342 |
|
342 | |||
343 | Test hardlinking outside hg: |
|
343 | Test hardlinking outside hg: | |
344 |
|
344 | |||
345 | $ mkdir x |
|
345 | $ mkdir x | |
346 | $ echo foo > x/a |
|
346 | $ echo foo > x/a | |
347 |
|
347 | |||
348 | $ linkcp x y |
|
348 | $ linkcp x y | |
349 | $ echo bar >> y/a |
|
349 | $ echo bar >> y/a | |
350 |
|
350 | |||
351 | No diff if hardlink: |
|
351 | No diff if hardlink: | |
352 |
|
352 | |||
353 | $ diff x/a y/a |
|
353 | $ diff x/a y/a | |
354 |
|
354 | |||
355 | Test mq hardlinking: |
|
355 | Test mq hardlinking: | |
356 |
|
356 | |||
357 | $ echo "[extensions]" >> $HGRCPATH |
|
357 | $ echo "[extensions]" >> $HGRCPATH | |
358 | $ echo "mq=" >> $HGRCPATH |
|
358 | $ echo "mq=" >> $HGRCPATH | |
359 |
|
359 | |||
360 | $ hg init a |
|
360 | $ hg init a | |
361 | $ cd a |
|
361 | $ cd a | |
362 |
|
362 | |||
363 | $ hg qimport -n foo - << EOF |
|
363 | $ hg qimport -n foo - << EOF | |
364 | > # HG changeset patch |
|
364 | > # HG changeset patch | |
365 | > # Date 1 0 |
|
365 | > # Date 1 0 | |
366 | > diff -r 2588a8b53d66 a |
|
366 | > diff -r 2588a8b53d66 a | |
367 | > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
367 | > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
368 | > +++ b/a Wed Jul 23 15:54:29 2008 +0200 |
|
368 | > +++ b/a Wed Jul 23 15:54:29 2008 +0200 | |
369 | > @@ -0,0 +1,1 @@ |
|
369 | > @@ -0,0 +1,1 @@ | |
370 | > +a |
|
370 | > +a | |
371 | > EOF |
|
371 | > EOF | |
372 | adding foo to series file |
|
372 | adding foo to series file | |
373 |
|
373 | |||
374 | $ hg qpush |
|
374 | $ hg qpush | |
375 | applying foo |
|
375 | applying foo | |
376 | now at: foo |
|
376 | now at: foo | |
377 |
|
377 | |||
378 | $ cd .. |
|
378 | $ cd .. | |
379 | $ linkcp a b |
|
379 | $ linkcp a b | |
380 | $ cd b |
|
380 | $ cd b | |
381 |
|
381 | |||
382 | $ hg qimport -n bar - << EOF |
|
382 | $ hg qimport -n bar - << EOF | |
383 | > # HG changeset patch |
|
383 | > # HG changeset patch | |
384 | > # Date 2 0 |
|
384 | > # Date 2 0 | |
385 | > diff -r 2588a8b53d66 a |
|
385 | > diff -r 2588a8b53d66 a | |
386 | > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 |
|
386 | > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 | |
387 | > +++ b/b Wed Jul 23 15:54:29 2008 +0200 |
|
387 | > +++ b/b Wed Jul 23 15:54:29 2008 +0200 | |
388 | > @@ -0,0 +1,1 @@ |
|
388 | > @@ -0,0 +1,1 @@ | |
389 | > +b |
|
389 | > +b | |
390 | > EOF |
|
390 | > EOF | |
391 | adding bar to series file |
|
391 | adding bar to series file | |
392 |
|
392 | |||
393 | $ hg qpush |
|
393 | $ hg qpush | |
394 | applying bar |
|
394 | applying bar | |
395 | now at: bar |
|
395 | now at: bar | |
396 |
|
396 | |||
397 | $ cat .hg/patches/status |
|
397 | $ cat .hg/patches/status | |
398 | 430ed4828a74fa4047bc816a25500f7472ab4bfe:foo |
|
398 | 430ed4828a74fa4047bc816a25500f7472ab4bfe:foo | |
399 | 4e7abb4840c46a910f6d7b4d3c3fc7e5209e684c:bar |
|
399 | 4e7abb4840c46a910f6d7b4d3c3fc7e5209e684c:bar | |
400 |
|
400 | |||
401 | $ cat .hg/patches/series |
|
401 | $ cat .hg/patches/series | |
402 | foo |
|
402 | foo | |
403 | bar |
|
403 | bar | |
404 |
|
404 | |||
405 | $ cat ../a/.hg/patches/status |
|
405 | $ cat ../a/.hg/patches/status | |
406 | 430ed4828a74fa4047bc816a25500f7472ab4bfe:foo |
|
406 | 430ed4828a74fa4047bc816a25500f7472ab4bfe:foo | |
407 |
|
407 | |||
408 | $ cat ../a/.hg/patches/series |
|
408 | $ cat ../a/.hg/patches/series | |
409 | foo |
|
409 | foo | |
410 |
|
410 | |||
411 | Test tags hardlinking: |
|
411 | Test tags hardlinking: | |
412 |
|
412 | |||
413 | $ hg qdel -r qbase:qtip |
|
413 | $ hg qdel -r qbase:qtip | |
414 | patch foo finalized without changeset message |
|
414 | patch foo finalized without changeset message | |
415 | patch bar finalized without changeset message |
|
415 | patch bar finalized without changeset message | |
416 |
|
416 | |||
417 | $ hg tag -l lfoo |
|
417 | $ hg tag -l lfoo | |
418 | $ hg tag foo |
|
418 | $ hg tag foo | |
419 |
|
419 | |||
420 | $ cd .. |
|
420 | $ cd .. | |
421 | $ linkcp b c |
|
421 | $ linkcp b c | |
422 | $ cd c |
|
422 | $ cd c | |
423 |
|
423 | |||
424 | $ hg tag -l -r 0 lbar |
|
424 | $ hg tag -l -r 0 lbar | |
425 | $ hg tag -r 0 bar |
|
425 | $ hg tag -r 0 bar | |
426 |
|
426 | |||
427 | $ cat .hgtags |
|
427 | $ cat .hgtags | |
428 | 4e7abb4840c46a910f6d7b4d3c3fc7e5209e684c foo |
|
428 | 4e7abb4840c46a910f6d7b4d3c3fc7e5209e684c foo | |
429 | 430ed4828a74fa4047bc816a25500f7472ab4bfe bar |
|
429 | 430ed4828a74fa4047bc816a25500f7472ab4bfe bar | |
430 |
|
430 | |||
431 | $ cat .hg/localtags |
|
431 | $ cat .hg/localtags | |
432 | 4e7abb4840c46a910f6d7b4d3c3fc7e5209e684c lfoo |
|
432 | 4e7abb4840c46a910f6d7b4d3c3fc7e5209e684c lfoo | |
433 | 430ed4828a74fa4047bc816a25500f7472ab4bfe lbar |
|
433 | 430ed4828a74fa4047bc816a25500f7472ab4bfe lbar | |
434 |
|
434 | |||
435 | $ cat ../b/.hgtags |
|
435 | $ cat ../b/.hgtags | |
436 | 4e7abb4840c46a910f6d7b4d3c3fc7e5209e684c foo |
|
436 | 4e7abb4840c46a910f6d7b4d3c3fc7e5209e684c foo | |
437 |
|
437 | |||
438 | $ cat ../b/.hg/localtags |
|
438 | $ cat ../b/.hg/localtags | |
439 | 4e7abb4840c46a910f6d7b4d3c3fc7e5209e684c lfoo |
|
439 | 4e7abb4840c46a910f6d7b4d3c3fc7e5209e684c lfoo | |
440 |
|
440 | |||
441 | $ cd .. |
|
441 | $ cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now