##// END OF EJS Templates
tests: remove more instances of export FOO=bar bashism
Brodie Rao -
r9042:95046688 default
parent child Browse files
Show More
@@ -1,19 +1,19 b''
1 1 # this file holds the definitions that are used in various bzr tests
2 2
3 3 "$TESTDIR/hghave" bzr || exit 80
4 4
5 export TERM=dumb
5 TERM=dumb; export TERM
6 6 echo '[extensions]' >> $HGRCPATH
7 7 echo 'convert = ' >> $HGRCPATH
8 8 echo 'hgext.graphlog = ' >> $HGRCPATH
9 9
10 10 glog()
11 11 {
12 12 hg glog --template '{rev} "{desc|firstline}" files: {files}\n' "$@"
13 13 }
14 14
15 15 manifest()
16 16 {
17 17 echo "% manifest of $2"
18 18 hg -R $1 manifest -v -r $2
19 19 }
@@ -1,75 +1,75 b''
1 1 #!/bin/sh
2 2
3 3 "$TESTDIR/hghave" p4 || exit 80
4 4
5 5 echo "[extensions]" >> $HGRCPATH
6 6 echo "convert = " >> $HGRCPATH
7 7
8 8 echo % create p4 depot
9 export P4ROOT=$PWD/depot
10 export P4AUDIT=$P4ROOT/audit
11 export P4JOURNAL=$P4ROOT/journal
12 export P4LOG=$P4ROOT/log
13 export P4PORT=localhost:16661
14 export P4DEBUG=1
9 P4ROOT=$PWD/depot; export P4ROOT
10 P4AUDIT=$P4ROOT/audit; export P4AUDIT
11 P4JOURNAL=$P4ROOT/journal; export P4JOURNAL
12 P4LOG=$P4ROOT/log; export P4LOG
13 P4PORT=localhost:16661; export P4PORT
14 P4DEBUG=1; export P4DEBUG
15 15
16 16 echo % start the p4 server
17 17 [ ! -d $P4ROOT ] && mkdir $P4ROOT
18 18 p4d -f -J off >$P4ROOT/stdout 2>$P4ROOT/stderr &
19 19 trap "echo % stop the p4 server ; p4 admin stop" EXIT
20 20
21 21 # wait for the server to initialize
22 22 while ! p4 ; do
23 23 sleep 1
24 24 done >/dev/null 2>/dev/null
25 25
26 26 echo % create a client spec
27 export P4CLIENT=hg-p4-import
27 P4CLIENT=hg-p4-import; export P4CLIENT
28 28 DEPOTPATH=//depot/test-mercurial-import/...
29 29 p4 client -o | sed '/^View:/,$ d' >p4client
30 30 echo View: >>p4client
31 31 echo " $DEPOTPATH //$P4CLIENT/..." >>p4client
32 32 p4 client -i <p4client
33 33
34 34 echo % populate the depot
35 35 echo a > a
36 36 mkdir b
37 37 echo c > b/c
38 38 p4 add a b/c
39 39 p4 submit -d initial
40 40
41 41 echo % change some files
42 42 p4 edit a
43 43 echo aa >> a
44 44 p4 submit -d "change a"
45 45
46 46 p4 edit b/c
47 47 echo cc >> b/c
48 48 p4 submit -d "change b/c"
49 49
50 50 echo % convert
51 51 hg convert -s p4 $DEPOTPATH dst
52 52 hg -R dst log --template 'rev={rev} desc="{desc}" tags="{tags}" files="{files}"\n'
53 53
54 54 echo % change some files
55 55 p4 edit a b/c
56 56 echo aaa >> a
57 57 echo ccc >> b/c
58 58 p4 submit -d "change a b/c"
59 59
60 60 echo % convert again
61 61 hg convert -s p4 $DEPOTPATH dst
62 62 hg -R dst log --template 'rev={rev} desc="{desc}" tags="{tags}" files="{files}"\n'
63 63
64 64 echo % interesting names
65 65 echo dddd > "d d"
66 66 mkdir " e"
67 67 echo fff >" e/ f"
68 68 p4 add "d d" " e/ f"
69 69 p4 submit -d "add d e f"
70 70
71 71 echo % convert again
72 72 hg convert -s p4 $DEPOTPATH dst
73 73 hg -R dst log --template 'rev={rev} desc="{desc}" tags="{tags}" files="{files}"\n'
74 74
75 75
@@ -1,104 +1,104 b''
1 1 #!/bin/sh
2 2
3 3 "$TESTDIR/hghave" p4 execbit symlink || exit 80
4 4
5 5 echo "[extensions]" >> $HGRCPATH
6 6 echo "convert = " >> $HGRCPATH
7 7
8 8 echo % create p4 depot
9 export P4ROOT=$PWD/depot
10 export P4AUDIT=$P4ROOT/audit
11 export P4JOURNAL=$P4ROOT/journal
12 export P4LOG=$P4ROOT/log
13 export P4PORT=localhost:16661
14 export P4DEBUG=1
15 export P4CHARSET=utf8
9 P4ROOT=$PWD/depot; export P4ROOT
10 P4AUDIT=$P4ROOT/audit; export P4AUDIT
11 P4JOURNAL=$P4ROOT/journal; export P4JOURNAL
12 P4LOG=$P4ROOT/log; export P4LOG
13 P4PORT=localhost:16661; export P4PORT
14 P4DEBUG=1; export P4DEBUG
15 P4CHARSET=utf8; export P4CHARSET
16 16
17 17 echo % start the p4 server
18 18 [ ! -d $P4ROOT ] && mkdir $P4ROOT
19 19 p4d -f -J off -xi >$P4ROOT/stdout 2>$P4ROOT/stderr
20 20 p4d -f -J off >$P4ROOT/stdout 2>$P4ROOT/stderr &
21 21 trap "echo % stop the p4 server ; p4 admin stop" EXIT
22 22
23 23 # wait for the server to initialize
24 24 while ! p4 ; do
25 25 sleep 1
26 26 done >/dev/null 2>/dev/null
27 27
28 28 echo % create a client spec
29 export P4CLIENT=hg-p4-import
29 P4CLIENT=hg-p4-import; export P4CLIENT
30 30 DEPOTPATH=//depot/test-mercurial-import/...
31 31 p4 client -o | sed '/^View:/,$ d' >p4client
32 32 echo View: >>p4client
33 33 echo " $DEPOTPATH //$P4CLIENT/..." >>p4client
34 34 p4 client -i <p4client
35 35
36 36 echo % populate the depot
37 37 TYPES="text binary symlink"
38 38 TYPES="$TYPES text+m text+w text+x text+k text+kx text+ko text+l text+C text+D text+F text+S text+S2"
39 39 TYPES="$TYPES binary+k binary+x binary+kx symlink+k"
40 40 TYPES="$TYPES ctext cxtext ktext kxtext ltext tempobj ubinary uxbinary xbinary xltext xtempobj xtext"
41 41 # not testing these
42 42 #TYPES="$TYPES apple resource unicode utf16 uresource xunicode xutf16"
43 43 for T in $TYPES ; do
44 44 T2=`echo $T | tr [:upper:] [:lower:]`
45 45 case $T in
46 46 apple)
47 47 ;;
48 48 symlink*)
49 49 echo "this is target $T" >target_$T2
50 50 ln -s target_$T file_$T2
51 51 p4 add target_$T2
52 52 p4 add -t $T file_$T2
53 53 ;;
54 54 binary*)
55 55 python -c "file('file_$T2', 'wb').write('this is $T')"
56 56 p4 add -t $T file_$T2
57 57 ;;
58 58 *)
59 59 echo "this is $T" >file_$T2
60 60 p4 add -t $T file_$T2
61 61 ;;
62 62 esac
63 63 done
64 64 p4 submit -d initial
65 65
66 66 echo % test keyword expansion
67 67 p4 edit file_* target_*
68 68 for T in $TYPES ; do
69 69 T2=`echo $T | tr [:upper:] [:lower:]`
70 70 echo '$Id$' >>file_$T2
71 71 echo '$Header$' >>file_$T2
72 72 echo '$Date$' >>file_$T2
73 73 echo '$DateTime$' >>file_$T2
74 74 echo '$Change$' >>file_$T2
75 75 echo '$File$' >>file_$T2
76 76 echo '$Revision$' >>file_$T2
77 77 echo '$Header$$Header$Header$' >>file_$T2
78 78 done
79 79
80 80 ln -s 'target_$Header$' crazy_symlink+k
81 81 p4 add -t symlink+k crazy_symlink+k
82 82
83 83 p4 submit -d keywords
84 84
85 85 echo % check keywords in p4
86 86 grep -H Header file_*
87 87
88 88 echo % convert
89 89 hg convert -s p4 $DEPOTPATH dst
90 90 hg -R dst log --template 'rev={rev} desc="{desc}" tags="{tags}" files="{files}"\n'g
91 91
92 92 echo % revision 0
93 93 hg -R dst update 0
94 94 head dst/file_* | cat -v
95 95
96 96 echo
97 97 echo % revision 1
98 98 hg -R dst update 1
99 99 head dst/file_* | cat -v
100 100 echo
101 101 echo % crazy_symlink
102 102 readlink crazy_symlink+k
103 103 readlink dst/crazy_symlink+k
104 104
General Comments 0
You need to be logged in to leave comments. Login now