[PATCH 1 of 3] test-share: Solaris sed can't handle never-ending lines

Mads Kiilerich mads at kiilerich.com
Wed Dec 16 05:10:50 CST 2009


# HG changeset patch
# User Mads Kiilerich <mads at kiilerich.com>
# Date 1260961821 -3600
# Node ID 07a0be5ca636526be895c663b978501ade9b3c3e
# Parent  48a0b0fefd993f044068750f858d96dcd3e5fd9a
test-share: Solaris sed can't handle never-ending lines

diff --git a/tests/test-share b/tests/test-share
--- a/tests/test-share
+++ b/tests/test-share
@@ -18,8 +18,8 @@
 [ -d .hg/store ] \
   && echo "fail: .hg/store should not exist" \
   || echo "pass: .hg/store does not exist"
-# sed appends a newline to the stream if none, GNU sed does not
-sed "s:$HGTMP:*HGTMP*:" .hg/sharedpath | tr -d '\n'; echo
+# Some sed versions appends newline, some don't, and some just fails
+(cat .hg/sharedpath; echo) | head -n1 | sed "s:$HGTMP:*HGTMP*:"
 
 echo % commit in shared clone
 echo a >> a


More information about the Mercurial-devel mailing list