Comments
Patch
@@ -1057,9 +1057,4 @@ def checksignature(func):
return check
-# Hardlinks are problematic on CIFS, do not allow hardlinks
-# until we find a way to work around it cleanly (issue4546).
-# This is a variable so extensions can opt-in to using them.
-allowhardlinks = False
-
# a whilelist of known filesystems where hardlink works reliably
_hardlinkfswhitelist = set([
@@ -1097,5 +1092,5 @@ def copyfile(src, dest, hardlink=False,
if fstype not in _hardlinkfswhitelist:
hardlink = False
- if allowhardlinks and hardlink:
+ if hardlink:
try:
oslink(src, dest)
copy from tests/test-hardlinks.t
copy to tests/test-hardlinks-whitelisted.t
@@ -1,3 +1,9 @@
#require hardlink
+#require hardlink-whitelisted
+
+This test is similar to test-hardlinks.t, but will only run on some filesystems
+that we are sure to have known good hardlink supports (see issue4546 for an
+example where the filesystem claims hardlink support but is actually
+problematic).
$ cat > nlinks.py <<EOF
@@ -167,5 +173,5 @@ Push to repo r1 should break up most har
1 r2/.hg/store/data/d1/f2.i
2 r2/.hg/store/data/f1.i
- 1 r2/.hg/store/fncache
+ 2 r2/.hg/store/fncache
$ hg -R r2 verify
@@ -192,5 +198,5 @@ Committing a change to f1 in r1 must bre
1 r2/.hg/store/data/d1/f2.i
1 r2/.hg/store/data/f1.i
- 1 r2/.hg/store/fncache
+ 2 r2/.hg/store/fncache
@@ -234,9 +240,9 @@ r4 has hardlinks in the working dir (not
2 r4/.hg/store/undo.backupfiles
2 r4/.hg/store/undo.phaseroots
- 2 r4/.hg/undo.backup.dirstate
+ 4 r4/.hg/undo.backup.dirstate
2 r4/.hg/undo.bookmarks
2 r4/.hg/undo.branch
2 r4/.hg/undo.desc
- 2 r4/.hg/undo.dirstate
+ 4 r4/.hg/undo.dirstate
2 r4/d1/data1
2 r4/d1/f2
@@ -273,9 +279,9 @@ Update back to revision 11 in r4 should
2 r4/.hg/store/undo.backupfiles
2 r4/.hg/store/undo.phaseroots
- 2 r4/.hg/undo.backup.dirstate
+ 4 r4/.hg/undo.backup.dirstate
2 r4/.hg/undo.bookmarks
2 r4/.hg/undo.branch
2 r4/.hg/undo.desc
- 2 r4/.hg/undo.dirstate
+ 4 r4/.hg/undo.dirstate
2 r4/d1/data1
2 r4/d1/f2
@@ -167,5 +167,5 @@ Push to repo r1 should break up most har
1 r2/.hg/store/data/d1/f2.i
2 r2/.hg/store/data/f1.i
- 1 r2/.hg/store/fncache
+ [12] r2/\.hg/store/fncache (re)
$ hg -R r2 verify
@@ -192,5 +192,5 @@ Committing a change to f1 in r1 must bre
1 r2/.hg/store/data/d1/f2.i
1 r2/.hg/store/data/f1.i
- 1 r2/.hg/store/fncache
+ [12] r2/\.hg/store/fncache (re)
@@ -234,9 +234,9 @@ r4 has hardlinks in the working dir (not
2 r4/.hg/store/undo.backupfiles
2 r4/.hg/store/undo.phaseroots
- 2 r4/.hg/undo.backup.dirstate
+ [24] r4/\.hg/undo\.backup\.dirstate (re)
2 r4/.hg/undo.bookmarks
2 r4/.hg/undo.branch
2 r4/.hg/undo.desc
- 2 r4/.hg/undo.dirstate
+ [24] r4/\.hg/undo\.dirstate (re)
2 r4/d1/data1
2 r4/d1/f2
@@ -273,9 +273,9 @@ Update back to revision 11 in r4 should
2 r4/.hg/store/undo.backupfiles
2 r4/.hg/store/undo.phaseroots
- 2 r4/.hg/undo.backup.dirstate
+ [24] r4/\.hg/undo\.backup\.dirstate (re)
2 r4/.hg/undo.bookmarks
2 r4/.hg/undo.branch
2 r4/.hg/undo.desc
- 2 r4/.hg/undo.dirstate
+ [24] r4/\.hg/undo\.dirstate (re)
2 r4/d1/data1
2 r4/d1/f2