[cig-commits] commit: test: adapt to tempdir location on MacOS

Mercurial hg at geodynamics.org
Mon Nov 24 11:27:04 PST 2008


changeset:   45:c00f4879211c
user:        Christian Ebert <blacktrash at gmx.net>
date:        Fri Mar 30 18:25:54 2007 +0200
files:       test-forest
description:
test: adapt to tempdir location on MacOS

On MacOS X the location of the default temporary directory is at
/private/tmp/
Adapt sed commands accordingly.


diff -r 3a2665d193d0 -r c00f4879211c test-forest
--- a/test-forest	Thu Jan 11 15:38:21 2007 +0100
+++ b/test-forest	Fri Mar 30 18:25:54 2007 +0200
@@ -69,18 +69,19 @@ hg fseed -R newtop top-snap default
 hg fseed -R newtop top-snap default
 rm -rf newtop
 hg fseed --root newtop top-snap default >/dev/null
-hg fsnap --cwd newtop | sed "s@$HGTMP at HGTMP@g"
+hg fsnap --cwd newtop | sed "s@\(/private\)*$HGTMP at HGTMP@g"
 rm -rf newtop
 
 echo "# fpull"
-hg fpull --cwd topcopy -u ../top-snap default | sed "s@$HGTMP at HGTMP@g"
+hg fpull --cwd topcopy -u ../top-snap default \
+    | sed "s@\(/private\)*$HGTMP at HGTMP@g"
 
 echo "# fpush"
 echo "t/t/f" > topcopy/t/t/f
 hg commit --cwd topcopy/t/t -m "delete new line" -d "0 0"
 hg remove --cwd topcopy/d/d f2
 hg commit -R topcopy -m "remove new file" -d "0 0"
-hg fpush -R topcopy top-snap default | sed "s@$HGTMP at HGTMP@g"
+hg fpush -R topcopy top-snap default | sed "s@\(/private\)*$HGTMP at HGTMP@g"
 
 echo "# fseed and fpull, missing section"
 cat top-snap | \
@@ -96,7 +97,7 @@ hg ftrees -R missing --convert
 hg ftrees -R missing --convert
 # pull (should find toplevel changesets)
 hg fpull -R missing top-snap-missing default \
-    | sed "s@$HGTMP at HGTMP@g"
+    | sed "s@\(/private\)*$HGTMP at HGTMP@g"
 rm -rf missing
 
 echo "# fseed and fpull, named section"
@@ -106,7 +107,7 @@ hg ftrees --cwd named --convert
 hg ftrees --cwd named --convert
 # pull (should find nothing)
 hg fpull --cwd named ../top-snap-named default \
-    | sed "s@$HGTMP at HGTMP@g"
+    | sed "s@\(/private\)*$HGTMP at HGTMP@g"
 rm -rf named
 
 # create an mq patch in topcopy/t
@@ -127,10 +128,12 @@ hg fsnap --cwd topcopy ../top-snap1
 hg fsnap --cwd topcopy ../top-snap1
 
 echo "# fpull + mq"
-hg fpull --cwd topcopy -u ../top-snap default | sed "s@$HGTMP at HGTMP@g"
+hg fpull --cwd topcopy -u ../top-snap default \
+    | sed "s@\(/private\)*$HGTMP at HGTMP@g"
 
 echo "# fpush + mq"
-hg fpush --cwd topcopy ../top-snap default | sed "s@$HGTMP at HGTMP@g"
+hg fpush --cwd topcopy ../top-snap default \
+    | sed "s@\(/private\)*$HGTMP at HGTMP@g"
 
 echo "# walk **/.hg"
 hg init walkhg



More information about the CIG-COMMITS mailing list