[PATCH] tests: non-GNU mv can't move a file onto a hardlink of itself

danek.duvall at oracle.com danek.duvall at oracle.com
Thu Jan 14 21:35:08 UTC 2016


# HG changeset patch
# User Danek Duvall <danek.duvall at oracle.com>
# Date 1452807188 28800
#      Thu Jan 14 13:33:08 2016 -0800
# Node ID e559d425fd25dd986d5297e2a6a046a6225de878
# Parent  4571c0b383378f5eec5189e3a39c672a169ce566
tests: non-GNU mv can't move a file onto a hardlink of itself

On Solaris, when you try to mv a file to another path that is a hardlink to
the original, it complains that they're identical.  GNU mv doesn't
complain, but it's simpler to just remove the original file instead.

diff --git a/tests/test-largefiles-update.t b/tests/test-largefiles-update.t
--- a/tests/test-largefiles-update.t
+++ b/tests/test-largefiles-update.t
@@ -160,7 +160,7 @@ mark the non-existing file as normal in 
   (branch merge, don't forget to commit)
   $ hg commit -m '1-2-3 testing'
   $ hg rollback -q
-  $ mv 58e24f733a964da346e2407a2bee99d9001184f5 .hg/largefiles/
+  $ rm 58e24f733a964da346e2407a2bee99d9001184f5
 
 Test that "hg revert -r REV" updates largefiles from "REV" correctly
 


More information about the Mercurial-devel mailing list