[PATCH STABLE V2] opener: do not unlink symlinks on 'w'rite

Christian Ebert blacktrash at gmx.net
Thu Nov 25 16:55:43 CST 2010


* Adrian Buehlmann on Thursday, November 25, 2010 at 23:40:33 +0100
> # HG changeset patch
> # User Adrian Buehlmann <adrian at cadifra.com>
> # Date 1290708399 -3600
> # Branch stable
> # Node ID 0162f745b6ba9f422e22c71f03b0c7d91a17cacb
> # Parent  dd24f3e7ca9e68a49fd7f38803e4d98469cad6e4
> opener: do not unlink symlinks on 'w'rite
> 
> The current code replaces symlinks with a normal file on 'w'rite.
> 
> This patch restores the pre 1.7.1 behavior, which preserves symlinks.

I will try to get on your nerves again ;-) test-hardlinks.t
throws an error with this patch on MacOS X:

~/hgworkspace/hg-crew-mq/tests▷hg•default•13041:092d0f81d652[opener.diff]$ ./run-tests.py test-hardlinks.t

ERROR: /Users/chris/hgworkspace/hg-crew-mq/tests/test-hardlinks.t output changed
--- /Users/chris/hgworkspace/hg-crew-mq/tests/test-hardlinks.t
+++ /Users/chris/hgworkspace/hg-crew-mq/tests/test-hardlinks.t.err
@@ -210,10 +210,14 @@


   $ cd r3
+  /var/folders/Uv/Uv1fv0Yz2RaBNU+BYnlOsU+++TM/-Tmp-/tmpxsGiFzhg-tst: line 139: cd: r3: No such file or directory
+  [1]
   $ hg tip --template '{rev}:{node|short}\n'
-  11:a6451b6bc41f
+  1:7069c422939c
   $ echo bla > f1
   $ hg ci -m1
+  nothing changed
+  [1]
   $ cd ..

 Create hardlinked copy r4 of r3 (on Linux, we would call 'cp -al'):
@@ -248,7 +252,7 @@
 Update back to revision 11 in r4 should break hardlink of file f1:

   $ hg -R r4 up 11
-  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
+  0 files updated, 0 files merged, 0 files removed, 0 files unresolved

   $ nlinksdir r4
   2 r4/.hg/00changelog.i
@@ -271,7 +275,7 @@
   2 r4/.hg/undo.dirstate
   2 r4/d1/data1
   2 r4/d1/f2
-  1 r4/f1
+  2 r4/f1


 Test hardlinking outside hg:
!
Failed test-hardlinks.t: output changed
# Ran 1 tests, 0 skipped, 1 failed.


c
-- 
theatre - books - texts - movies
Black Trash Productions at home: http://www.blacktrash.org
Black Trash Productions on Facebook:
http://www.facebook.com/blacktrashproductions


More information about the Mercurial-devel mailing list