Show More
@@ -1055,11 +1055,6 b' def checksignature(func):' | |||||
1055 |
|
1055 | |||
1056 | return check |
|
1056 | return check | |
1057 |
|
1057 | |||
1058 | # Hardlinks are problematic on CIFS, do not allow hardlinks |
|
|||
1059 | # until we find a way to work around it cleanly (issue4546). |
|
|||
1060 | # This is a variable so extensions can opt-in to using them. |
|
|||
1061 | allowhardlinks = False |
|
|||
1062 |
|
||||
1063 | # a whilelist of known filesystems where hardlink works reliably |
|
1058 | # a whilelist of known filesystems where hardlink works reliably | |
1064 | _hardlinkfswhitelist = set([ |
|
1059 | _hardlinkfswhitelist = set([ | |
1065 | 'btrfs', |
|
1060 | 'btrfs', | |
@@ -1095,7 +1090,7 b' def copyfile(src, dest, hardlink=False, ' | |||||
1095 | fstype = getattr(osutil, 'getfstype', lambda x: None)(destdir) |
|
1090 | fstype = getattr(osutil, 'getfstype', lambda x: None)(destdir) | |
1096 | if fstype not in _hardlinkfswhitelist: |
|
1091 | if fstype not in _hardlinkfswhitelist: | |
1097 | hardlink = False |
|
1092 | hardlink = False | |
1098 |
if |
|
1093 | if hardlink: | |
1099 | try: |
|
1094 | try: | |
1100 | oslink(src, dest) |
|
1095 | oslink(src, dest) | |
1101 | return |
|
1096 | return |
@@ -1,4 +1,10 b'' | |||||
1 | #require hardlink |
|
1 | #require hardlink | |
|
2 | #require hardlink-whitelisted | |||
|
3 | ||||
|
4 | This test is similar to test-hardlinks.t, but will only run on some filesystems | |||
|
5 | that we are sure to have known good hardlink supports (see issue4546 for an | |||
|
6 | example where the filesystem claims hardlink support but is actually | |||
|
7 | problematic). | |||
2 |
|
|
8 | ||
3 | $ cat > nlinks.py <<EOF |
|
9 | $ cat > nlinks.py <<EOF | |
4 | > import sys |
|
10 | > import sys | |
@@ -166,7 +172,7 b' Push to repo r1 should break up most har' | |||||
166 | 1 r2/.hg/store/00manifest.i |
|
172 | 1 r2/.hg/store/00manifest.i | |
167 | 1 r2/.hg/store/data/d1/f2.i |
|
173 | 1 r2/.hg/store/data/d1/f2.i | |
168 | 2 r2/.hg/store/data/f1.i |
|
174 | 2 r2/.hg/store/data/f1.i | |
169 |
|
|
175 | 2 r2/.hg/store/fncache | |
170 |
|
176 | |||
171 | $ hg -R r2 verify |
|
177 | $ hg -R r2 verify | |
172 | checking changesets |
|
178 | checking changesets | |
@@ -191,7 +197,7 b' Committing a change to f1 in r1 must bre' | |||||
191 | 1 r2/.hg/store/00manifest.i |
|
197 | 1 r2/.hg/store/00manifest.i | |
192 | 1 r2/.hg/store/data/d1/f2.i |
|
198 | 1 r2/.hg/store/data/d1/f2.i | |
193 | 1 r2/.hg/store/data/f1.i |
|
199 | 1 r2/.hg/store/data/f1.i | |
194 |
|
|
200 | 2 r2/.hg/store/fncache | |
195 |
|
201 | |||
196 |
|
202 | |||
197 | $ cd r3 |
|
203 | $ cd r3 | |
@@ -233,11 +239,11 b' r4 has hardlinks in the working dir (not' | |||||
233 | 2 r4/.hg/store/undo.backup.phaseroots |
|
239 | 2 r4/.hg/store/undo.backup.phaseroots | |
234 | 2 r4/.hg/store/undo.backupfiles |
|
240 | 2 r4/.hg/store/undo.backupfiles | |
235 | 2 r4/.hg/store/undo.phaseroots |
|
241 | 2 r4/.hg/store/undo.phaseroots | |
236 |
|
|
242 | 4 r4/.hg/undo.backup.dirstate | |
237 | 2 r4/.hg/undo.bookmarks |
|
243 | 2 r4/.hg/undo.bookmarks | |
238 | 2 r4/.hg/undo.branch |
|
244 | 2 r4/.hg/undo.branch | |
239 | 2 r4/.hg/undo.desc |
|
245 | 2 r4/.hg/undo.desc | |
240 |
|
|
246 | 4 r4/.hg/undo.dirstate | |
241 | 2 r4/d1/data1 |
|
247 | 2 r4/d1/data1 | |
242 | 2 r4/d1/f2 |
|
248 | 2 r4/d1/f2 | |
243 | 2 r4/f1 |
|
249 | 2 r4/f1 | |
@@ -272,11 +278,11 b' Update back to revision 11 in r4 should ' | |||||
272 | 2 r4/.hg/store/undo.backup.phaseroots |
|
278 | 2 r4/.hg/store/undo.backup.phaseroots | |
273 | 2 r4/.hg/store/undo.backupfiles |
|
279 | 2 r4/.hg/store/undo.backupfiles | |
274 | 2 r4/.hg/store/undo.phaseroots |
|
280 | 2 r4/.hg/store/undo.phaseroots | |
275 |
|
|
281 | 4 r4/.hg/undo.backup.dirstate | |
276 | 2 r4/.hg/undo.bookmarks |
|
282 | 2 r4/.hg/undo.bookmarks | |
277 | 2 r4/.hg/undo.branch |
|
283 | 2 r4/.hg/undo.branch | |
278 | 2 r4/.hg/undo.desc |
|
284 | 2 r4/.hg/undo.desc | |
279 |
|
|
285 | 4 r4/.hg/undo.dirstate | |
280 | 2 r4/d1/data1 |
|
286 | 2 r4/d1/data1 | |
281 | 2 r4/d1/f2 |
|
287 | 2 r4/d1/f2 | |
282 | 1 r4/f1 |
|
288 | 1 r4/f1 |
@@ -166,7 +166,7 b' Push to repo r1 should break up most har' | |||||
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 | 1 r2/.hg/store/fncache |
|
169 | [12] r2/\.hg/store/fncache (re) | |
170 |
|
170 | |||
171 | $ hg -R r2 verify |
|
171 | $ hg -R r2 verify | |
172 | checking changesets |
|
172 | checking changesets | |
@@ -191,7 +191,7 b' Committing a change to f1 in r1 must bre' | |||||
191 | 1 r2/.hg/store/00manifest.i |
|
191 | 1 r2/.hg/store/00manifest.i | |
192 | 1 r2/.hg/store/data/d1/f2.i |
|
192 | 1 r2/.hg/store/data/d1/f2.i | |
193 | 1 r2/.hg/store/data/f1.i |
|
193 | 1 r2/.hg/store/data/f1.i | |
194 | 1 r2/.hg/store/fncache |
|
194 | [12] r2/\.hg/store/fncache (re) | |
195 |
|
195 | |||
196 |
|
196 | |||
197 | $ cd r3 |
|
197 | $ cd r3 | |
@@ -233,11 +233,11 b' r4 has hardlinks in the working dir (not' | |||||
233 | 2 r4/.hg/store/undo.backup.phaseroots |
|
233 | 2 r4/.hg/store/undo.backup.phaseroots | |
234 | 2 r4/.hg/store/undo.backupfiles |
|
234 | 2 r4/.hg/store/undo.backupfiles | |
235 | 2 r4/.hg/store/undo.phaseroots |
|
235 | 2 r4/.hg/store/undo.phaseroots | |
236 | 2 r4/.hg/undo.backup.dirstate |
|
236 | [24] r4/\.hg/undo\.backup\.dirstate (re) | |
237 | 2 r4/.hg/undo.bookmarks |
|
237 | 2 r4/.hg/undo.bookmarks | |
238 | 2 r4/.hg/undo.branch |
|
238 | 2 r4/.hg/undo.branch | |
239 | 2 r4/.hg/undo.desc |
|
239 | 2 r4/.hg/undo.desc | |
240 | 2 r4/.hg/undo.dirstate |
|
240 | [24] r4/\.hg/undo\.dirstate (re) | |
241 | 2 r4/d1/data1 |
|
241 | 2 r4/d1/data1 | |
242 | 2 r4/d1/f2 |
|
242 | 2 r4/d1/f2 | |
243 | 2 r4/f1 |
|
243 | 2 r4/f1 | |
@@ -272,11 +272,11 b' Update back to revision 11 in r4 should ' | |||||
272 | 2 r4/.hg/store/undo.backup.phaseroots |
|
272 | 2 r4/.hg/store/undo.backup.phaseroots | |
273 | 2 r4/.hg/store/undo.backupfiles |
|
273 | 2 r4/.hg/store/undo.backupfiles | |
274 | 2 r4/.hg/store/undo.phaseroots |
|
274 | 2 r4/.hg/store/undo.phaseroots | |
275 | 2 r4/.hg/undo.backup.dirstate |
|
275 | [24] r4/\.hg/undo\.backup\.dirstate (re) | |
276 | 2 r4/.hg/undo.bookmarks |
|
276 | 2 r4/.hg/undo.bookmarks | |
277 | 2 r4/.hg/undo.branch |
|
277 | 2 r4/.hg/undo.branch | |
278 | 2 r4/.hg/undo.desc |
|
278 | 2 r4/.hg/undo.desc | |
279 | 2 r4/.hg/undo.dirstate |
|
279 | [24] r4/\.hg/undo\.dirstate (re) | |
280 | 2 r4/d1/data1 |
|
280 | 2 r4/d1/data1 | |
281 | 2 r4/d1/f2 |
|
281 | 2 r4/d1/f2 | |
282 | 1 r4/f1 |
|
282 | 1 r4/f1 |
General Comments 0
You need to be logged in to leave comments.
Login now