##// END OF EJS Templates
Don't use 'set -x', fix exports, sed and hexdump usage for Solaris.
Thomas Arendsen Hein -
r800:ec85f9e6 default
parent child Browse files
Show More
@@ -1,12 +1,12 b''
1 #!/bin/sh -x
1 #!/bin/sh
2 2 hg init
3 3 echo This is file a1 > a
4 4 hg add a
5 5 hg commit -m "commit #0" -d "0 0"
6 6 ls
7 7 echo This is file b1 > b
8 8 hg add b
9 9 hg commit -m "commit #1" -d "0 0"
10 10 hg co 0
11 11 # B should disappear
12 12 ls
@@ -1,28 +1,25 b''
1 #!/bin/sh -x
1 #!/bin/sh
2 2
3 3 hg clone http://localhost:20059/ copy
4 4 echo $?
5 5 ls copy
6 6
7 7 cat > dumb.py <<EOF
8 8 import BaseHTTPServer, SimpleHTTPServer, signal
9 9
10 10 def run(server_class=BaseHTTPServer.HTTPServer,
11 11 handler_class=SimpleHTTPServer.SimpleHTTPRequestHandler):
12 12 server_address = ('localhost', 20059)
13 13 httpd = server_class(server_address, handler_class)
14 14 httpd.serve_forever()
15 15
16 16 signal.signal(signal.SIGTERM, lambda x: sys.exit(0))
17 17 run()
18 18 EOF
19 19
20 set +x # backgrounding sometimes disturbs the order of command tracing
21 20 python dumb.py 2>/dev/null &
22 set -x
23 21
24 22 hg clone http://localhost:20059/foo copy2
25 23 echo $?
26 24
27 set +x
28 25 kill $!
@@ -1,13 +1,12 b''
1 1 #!/bin/sh
2 2
3 set -x
4 3 mkdir t
5 4 cd t
6 5 hg init
7 6 echo a > a
8 7 hg add a
9 8 hg commit -m test -d "0 0"
10 9 hg history
11 10 hg manifest
12 11 hg cat a
13 12 hg verify
@@ -1,28 +1,27 b''
1 1 #!/bin/bash
2 2
3 set -x
4 3 mkdir a
5 4 cd a
6 5 hg init
7 6 echo a > a
8 7 hg add a
9 8 hg commit -m test -d '0 0'
10 9
11 10 # Default operation
12 11 hg clone . ../b
13 12 cd ../b
14 13 cat a
15 14 hg verify
16 15
17 16 # No update
18 17 hg clone -U . ../c
19 18 cd ../c
20 19 cat a
21 20 hg verify
22 21
23 22 # Default destination
24 23 mkdir ../d
25 24 cd ../d
26 25 hg clone ../a
27 26 cd a
28 27 hg cat a
@@ -1,43 +1,41 b''
1 1 #!/bin/bash
2 2
3 set -x
4
5 3 # No local source
6 4 hg clone a b
7 5 echo $?
8 6
9 7 # No remote source
10 8 hg clone http://127.0.0.1:3121/a b
11 9 echo $?
12 10 rm -rf b # work around bug with http clone
13 11
14 12 # Inaccessible source
15 13 mkdir a
16 14 chmod 000 a
17 15 hg clone a b
18 16 echo $?
19 17
20 18 # Inaccessible destination
21 19 mkdir b
22 20 cd b
23 21 hg init
24 22 hg clone . ../a
25 23 echo $?
26 24 cd ..
27 25 chmod 700 a
28 26 rm -rf a b
29 27
30 28 # Source of wrong type
31 29 mkfifo a
32 30 hg clone a b
33 31 echo $?
34 32 rm a
35 33
36 34 # Default destination, same directory
37 35 mkdir q
38 36 cd q
39 37 hg init
40 38 cd ..
41 39 hg clone q
42 40
43 41 true
@@ -1,17 +1,16 b''
1 1 #!/bin/sh
2 2
3 set -x
4 3 hg init
5 4 echo "nothing" > a
6 5 hg add a
7 6 hg commit -m ancestor -d "0 0"
8 7 echo "something" > a
9 8 hg commit -m branch1 -d "0 0"
10 9 hg co 0
11 10 echo "something else" > a
12 11 hg commit -m branch2 -d "0 0"
13 export HGMERGE=merge
12 HGMERGE=merge; export HGMERGE
14 13 hg up -m 1
15 14 hg id
16 15 grep -Ev ">>>|<<<" a
17 16 hg status
@@ -1,20 +1,19 b''
1 1 #!/bin/sh
2 2
3 set -x
4 3 hg init
5 4 echo a > a
6 5 hg add a
7 6 hg commit -m "1" -d "0 0"
8 7 hg status
9 8 cp a b
10 9 hg copy a b
11 10 hg status
12 11 hg --debug commit -m "2" -d "0 0"
13 12 hg history
14 13 hg log a
15 hexdump -C .hg/data/b.d
14 md5sum .hg/data/b.d
16 15 hg cat b > bsum
17 16 md5sum bsum
18 17 hg cat a > asum
19 18 md5sum asum
20 19 hg verify
@@ -1,12 +1,12 b''
1 1 #!/bin/sh
2 2
3 3 hg init
4 4 touch a
5 5 hg add a
6 6 hg ci -m "a" -d "0 0"
7 7
8 8 echo 123 > b
9 9 hg add b
10 hg diff | sed "s/\(\(---\|+++\) [^ \t]*\)[ \t].*/\1/"
10 hg diff | sed "s/\(\(---\|+++\) [a-zA-Z0-9_/.-]*\).*/\1/"
11 11
12 hg diff -r tip | sed "s/\(\(---\|+++\) [^ \t]*\)[ \t].*/\1/"
12 hg diff -r tip | sed "s/\(\(---\|+++\) [a-zA-Z0-9_/.-]*\).*/\1/"
@@ -1,34 +1,34 b''
1 #!/bin/sh -ex
1 #!/bin/sh -e
2 2
3 3 umask 027
4 4 mkdir test1
5 5 cd test1
6 6
7 7 hg init
8 8 touch a b
9 9 hg add a b
10 10 hg ci -m "added a b" -d "0 0"
11 11
12 12 cd ..
13 13 mkdir test2
14 14 cd test2
15 15
16 16 hg init
17 17 hg pull ../test1
18 18 hg co
19 19 chmod +x a
20 20 hg ci -m "chmod +x a" -d "0 0"
21 21
22 22 cd ../test1
23 23 echo 123 >>a
24 24 hg ci -m "a updated" -d "0 0"
25 25
26 26 hg pull ../test2
27 27 hg heads
28 28 hg history
29 29
30 30 hg -v co -m
31 31
32 32 ls -l ../test[12]/a > foo
33 33 cut -b 0-10 < foo
34 34
@@ -1,9 +1,9 b''
1 #!/bin/sh -x
1 #!/bin/sh
2 2
3 3 hg init
4 4 echo "[hooks]" > .hg/hgrc
5 5 echo 'precommit = echo precommit hook' >> .hg/hgrc
6 6 echo 'commit = echo commit hook: $NODE' >> .hg/hgrc
7 7 echo a > a
8 8 hg add a
9 9 hg commit -m "test" -d "0 0"
@@ -1,45 +1,45 b''
1 #!/bin/sh -x
1 #!/bin/sh
2 2
3 3 mkdir t
4 4 cd t
5 5 hg init
6 6 echo "added file1" > file1
7 7 echo "added file2" > file2
8 8 hg add file1 file2
9 9 hg commit -m "added file1 and file2" -d "0 0" -u user
10 10 echo "changed file1" >> file1
11 11 hg commit -m "changed file1" -d "0 0" -u user
12 12 hg -q log
13 13 hg id
14 14 hg update -C 0
15 15 hg id
16 16 echo "changed file1" >> file1
17 17 hg id
18 18 hg revert
19 19 hg diff
20 20 hg status
21 21 hg id
22 22 hg update
23 23 hg diff
24 24 hg status
25 25 hg id
26 26 hg update -C 0
27 27 echo "changed file1" >> file1
28 28 HGMERGE=merge hg update
29 29 hg diff
30 30 hg status
31 31 hg id
32 32 hg revert
33 33 hg diff
34 34 hg status
35 35 hg id
36 36 hg revert -r tip
37 37 hg diff
38 38 hg status
39 39 hg id
40 40 hg update -C
41 41 hg diff
42 42 hg status
43 43 hg id
44 44 cd ..; /bin/rm -rf t
45 45
@@ -1,45 +1,45 b''
1 #!/bin/sh -x
1 #!/bin/sh
2 2
3 3 mkdir t
4 4 cd t
5 5 hg init
6 6 echo "added file1" > file1
7 7 echo "added file2" > file2
8 8 hg add file1 file2
9 9 hg commit -m "added file1 and file2" -d "0 0" -u user
10 10 echo "changed file1" >> file1
11 11 hg commit -m "changed file1" -d "0 0" -u user
12 12 hg -q log
13 13 hg id
14 14 hg update -C 0
15 15 hg id
16 16 echo "changed file1" >> file1
17 17 hg id
18 18 hg revert
19 19 hg diff
20 20 hg status
21 21 hg id
22 22 hg update
23 23 hg diff
24 24 hg status
25 25 hg id
26 26 hg update -C 0
27 27 echo "changed file1 different" >> file1
28 28 HGMERGE=merge hg update
29 hg diff | sed -e "s/\(\(---\|+++\).*\)\t.*/\1/" -e "s/\(<<<<<<<\|>>>>>>>\) .*/\1/"
29 hg diff | sed -e "s/\(\(---\|+++\) [a-zA-Z0-9_/.-]*\).*/\1/" -e "s/\(<<<<<<<\|>>>>>>>\) .*/\1/"
30 30 hg status
31 31 hg id
32 32 hg revert
33 33 hg diff
34 34 hg status
35 35 hg id
36 36 hg revert -r tip
37 37 hg diff
38 38 hg status
39 39 hg id
40 40 hg update -C
41 41 hg diff
42 42 hg status
43 43 hg id
44 44 cd ..; /bin/rm -rf t
45 45
@@ -1,86 +1,86 b''
1 #!/bin/sh -x
1 #!/bin/sh
2 2
3 3 cat <<'EOF' > merge
4 4 #!/bin/sh
5 5 echo merging for `basename $1`
6 6 EOF
7 7 chmod +x merge
8 8
9 9 mkdir t
10 10 cd t
11 11 hg init
12 12 echo This is file a1 > a
13 13 hg add a
14 14 hg commit -m "commit #0" -d "0 0"
15 15 echo This is file b1 > b
16 16 hg add b
17 17 hg commit -m "commit #1" -d "0 0"
18 18
19 19 hg update 0
20 20 echo This is file c1 > c
21 21 hg add c
22 22 hg commit -m "commit #2" -d "0 0"
23 23 echo This is file b1 > b
24 24 env HGMERGE=../merge hg update -m 1
25 25 # no merges expected
26 26 cd ..; /bin/rm -rf t
27 27
28 28 mkdir t
29 29 cd t
30 30 hg init
31 31 echo This is file a1 > a
32 32 hg add a
33 33 hg commit -m "commit #0" -d "0 0"
34 34 echo This is file b1 > b
35 35 hg add b
36 36 hg commit -m "commit #1" -d "0 0"
37 37
38 38 hg update 0
39 39 echo This is file c1 > c
40 40 hg add c
41 41 hg commit -m "commit #2" -d "0 0"
42 42 echo This is file b2 > b
43 43 env HGMERGE=../merge hg update -m 1
44 44 # merge of b expected
45 45 cd ..; /bin/rm -rf t
46 46
47 47 mkdir t
48 48 cd t
49 49 hg init
50 50 echo This is file a1 > a
51 51 hg add a
52 52 hg commit -m "commit #0" -d "0 0"
53 53 echo This is file b1 > b
54 54 hg add b
55 55 hg commit -m "commit #1" -d "0 0"
56 56 echo This is file b22 > b
57 57 hg commit -m "commit #2" -d "0 0"
58 58 hg update 1
59 59 echo This is file c1 > c
60 60 hg add c
61 61 hg commit -m "commit #3" -d "0 0"
62 62 cat b
63 63 echo This is file b22 > b
64 64 env HGMERGE=../merge hg update -m 2
65 65 # merge expected!
66 66 cd ..; /bin/rm -rf t
67 67
68 68 mkdir t
69 69 cd t
70 70 hg init
71 71 echo This is file a1 > a
72 72 hg add a
73 73 hg commit -m "commit #0" -d "0 0"
74 74 echo This is file b1 > b
75 75 hg add b
76 76 hg commit -m "commit #1" -d "0 0"
77 77 echo This is file b22 > b
78 78 hg commit -m "commit #2" -d "0 0"
79 79 hg update 1
80 80 echo This is file c1 > c
81 81 hg add c
82 82 hg commit -m "commit #3" -d "0 0"
83 83 echo This is file b33 > b
84 84 env HGMERGE=../merge hg update -m 2
85 85 # merge of b expected
86 86 cd ..; /bin/rm -rf t
@@ -1,48 +1,48 b''
1 #!/bin/sh -x
1 #!/bin/sh
2 2
3 3 mkdir t
4 4 cd t
5 5 hg init
6 6 echo This is file a1 > a
7 7 hg add a
8 8 hg commit -m "commit #0" -d "0 0"
9 9 echo This is file b1 > b
10 10 hg add b
11 11 hg commit -m "commit #1" -d "0 0"
12 12 rm b
13 13 hg update 0
14 14 echo This is file b2 > b
15 15 hg add b
16 16 hg commit -m "commit #2" -d "0 0"
17 17 cd ..; /bin/rm -rf t
18 18
19 19 mkdir t
20 20 cd t
21 21 hg init
22 22 echo This is file a1 > a
23 23 hg add a
24 24 hg commit -m "commit #0" -d "0 0"
25 25 echo This is file b1 > b
26 26 hg add b
27 27 hg commit -m "commit #1" -d "0 0"
28 28 rm b
29 29 hg update 0
30 30 echo This is file b2 > b
31 31 hg commit -A -m "commit #2" -d "0 0"
32 32 cd ..; /bin/rm -rf t
33 33
34 34 mkdir t
35 35 cd t
36 36 hg init
37 37 echo This is file a1 > a
38 38 hg add a
39 39 hg commit -m "commit #0" -d "0 0"
40 40 echo This is file b1 > b
41 41 hg add b
42 42 hg commit -m "commit #1" -d "0 0"
43 43 rm b
44 44 hg remove b
45 45 hg update 0
46 46 echo This is file b2 > b
47 47 hg commit -A -m "commit #2" -d "0 0"
48 48 cd ..; /bin/rm -rf t
@@ -1,10 +1,10 b''
1 #!/bin/sh -x
1 #!/bin/sh
2 2
3 3 hg init
4 4 echo This is file a1 > a
5 5 hg add a
6 6 hg commit -m "commit #0" -d "0 0"
7 7 touch b
8 8 hg add b
9 9 rm b
10 10 hg commit -A -m"comment #1" -d "0 0"
@@ -1,17 +1,17 b''
1 #!/bin/sh -x
1 #!/bin/sh
2 2
3 3 hg init
4 4 echo This is file a1 > a
5 5 hg add a
6 6 hg commit -m "commit #0" -d "0 0"
7 7 echo This is file b1 > b
8 8 hg add b
9 9 hg commit -m "commit #1" -d "0 0"
10 10 hg update 0
11 11 echo This is file c1 > c
12 12 hg add c
13 13 hg commit -m "commit #2" -d "0 0"
14 14 hg update -m 1
15 15 rm b
16 16 echo This is file c22 > c
17 17 hg commit -m "commit #3" -d "0 0"
@@ -1,21 +1,21 b''
1 #!/bin/sh -x
1 #!/bin/sh
2 2
3 3 mkdir t
4 4 cd t
5 5 hg init
6 6 echo This is file a1 > a
7 7 echo This is file b1 > b
8 8 hg add a b
9 9 hg commit -m "commit #0" -d "0 0"
10 10 echo This is file b22 > b
11 11 hg commit -m"comment #1" -d "0 0"
12 12 hg update 0
13 13 rm b
14 14 hg commit -A -m"comment #2" -d "0 0"
15 15 # in theory, we shouldn't need the "yes k" below, but it prevents
16 16 # this test from hanging when "hg update" erroneously prompts the
17 17 # user for "keep or delete"
18 18 yes k | hg update 1
19 19 # we exit with 0 to avoid the unavoidable SIGPIPE from above causing
20 20 # us to fail this test
21 21 exit 0
@@ -1,46 +1,46 b''
1 #!/bin/sh -x
1 #!/bin/sh
2 2
3 3 cat <<'EOF' > merge
4 4 #!/bin/sh
5 5 echo merging for `basename $1`
6 6 EOF
7 7 chmod +x merge
8 export HGMERGE=./merge
8 HGMERGE=./merge; export HGMERGE
9 9
10 10 mkdir A1
11 11 cd A1
12 12 hg init
13 13 echo This is file foo1 > foo
14 14 echo This is file bar1 > bar
15 15 hg add foo bar
16 16 hg commit -m "commit text" -d "0 0"
17 17
18 18 cd ..
19 19 hg clone A1 B1
20 20
21 21 cd A1
22 22 rm bar
23 23 hg remove bar
24 24 hg commit -m "commit test" -d "0 0"
25 25
26 26 cd ../B1
27 27 echo This is file foo22 > foo
28 28 hg commit -m "commit test" -d "0 0"
29 29
30 30 cd ..
31 31 hg clone A1 A2
32 32 hg clone B1 B2
33 33
34 34 cd A1
35 35 hg pull ../B1
36 36 hg update -m
37 37 hg commit -m "commit test" -d "0 0"
38 38 echo bar should remain deleted.
39 39 hg manifest
40 40
41 41 cd ../B2
42 42 hg pull ../A2
43 43 hg update -m
44 44 hg commit -m "commit test" -d "0 0"
45 45 echo bar should remain deleted.
46 46 hg manifest
@@ -1,33 +1,33 b''
1 #!/bin/sh -x
1 #!/bin/sh
2 2 hg --debug init
3 3 echo this is a1 > a
4 4 hg add a
5 5 hg commit -m0 -d "0 0"
6 6 echo this is b1 > b
7 7 hg add b
8 8 hg commit -m1 -d "0 0"
9 9 hg manifest 1
10 10 echo this is c1 > c
11 11 hg rawcommit -p 1 -d "0 0" -m2 c
12 12 hg manifest 2
13 13 hg parents
14 14 rm b
15 15 hg rawcommit -p 2 -d "0 0" -m3 b
16 16 hg manifest 3
17 17 hg parents
18 18 echo this is a22 > a
19 19 hg rawcommit -p 3 -d "0 0" -m4 a
20 20 hg manifest 4
21 21 hg parents
22 22 echo this is c22 > c
23 23 hg rawcommit -p 1 -d "0 0" -m5 c
24 24 hg manifest 5
25 25 hg parents
26 26 # merge, but no files changed
27 27 hg rawcommit -p 4 -p 5 -d "0 0" -m6
28 28 hg manifest 6
29 29 hg parents
30 30 # no changes what-so-ever
31 31 hg rawcommit -p 6 -d "0 0" -m7
32 32 hg manifest 7
33 33 hg parents
@@ -1,24 +1,24 b''
1 1 #!/bin/sh
2 2
3 set -ex
3 set -e
4 4
5 5 mkdir test
6 6 cd test
7 7 echo foo>foo
8 8 hg init
9 9 hg addremove
10 10 hg commit -m "1"
11 11 hg verify
12 12
13 13 hg clone . ../branch
14 14 cd ../branch
15 15 hg co
16 16 echo bar>>foo
17 17 hg commit -m "2"
18 18
19 19 cd ../test
20 20 hg pull ../branch
21 21 hg verify
22 22 hg co
23 23 cat foo
24 24 hg manifest
@@ -1,13 +1,13 b''
1 #!/bin/sh -x
1 #!/bin/sh
2 2
3 3 hg init
4 4 echo a > a
5 5 hg add a
6 6 hg commit -m "test" -d "0 0"
7 7 hg history
8 8 hg tag -d "0 0" "bleah"
9 9 hg history
10 10
11 11 echo foo >> .hgtags
12 12 hg tag -d "0 0" "bleah2" || echo "failed"
13 13
@@ -1,34 +1,33 b''
1 1 #!/bin/sh
2 2
3 set -x
4 3 mkdir t
5 4 cd t
6 5 hg init
7 6 hg id
8 7 echo a > a
9 8 hg add a
10 9 hg commit -m "test" -d "0 0"
11 10 hg co
12 11 hg identify
13 12 T=`hg -q tip | cut -d : -f 2`
14 13 echo "$T first" > .hgtags
15 14 cat .hgtags
16 15 hg add .hgtags
17 16 hg commit -m "add tags" -d "0 0"
18 17 hg tags
19 18 hg identify
20 19 echo bb > a
21 20 hg status
22 21 hg identify
23 22 hg co first
24 23 hg id
25 24 hg -v id
26 25 hg status
27 26 echo 1 > b
28 27 hg add b
29 28 hg commit -m "branch" -d "0 0"
30 29 hg id
31 30 hg co -m 1
32 31 hg id
33 32 hg status
34 33
@@ -1,16 +1,15 b''
1 1 #!/bin/sh
2 2
3 set -x
4 3 mkdir t
5 4 cd t
6 5 hg init
7 6 echo a > a
8 7 hg add a
9 8 hg commit -m "test" -d "0 0"
10 9 hg verify
11 10 hg parents
12 11 hg status
13 12 hg undo
14 13 hg verify
15 14 hg parents
16 15 hg status
@@ -1,33 +1,33 b''
1 1 #!/bin/sh
2 2
3 set -ex
3 set -e
4 4 mkdir r1
5 5 cd r1
6 6 hg init
7 7 echo a > a
8 8 hg addremove
9 9 hg commit -m "1" -d "0 0"
10 10
11 11 hg clone . ../r2
12 12 cd ../r2
13 13 hg up
14 14 echo abc > a
15 15 hg diff > ../d
16 sed "s/\(\(---\|+++\) [^ \t]*\)[ \t].*/\1/" < ../d
16 sed "s/\(\(---\|+++\) [a-zA-Z0-9_/.-]*\).*/\1/" < ../d
17 17
18 18 cd ../r1
19 19 echo b > b
20 20 echo a2 > a
21 21 hg addremove
22 22 hg commit -m "2" -d "0 0"
23 23
24 24 cd ../r2
25 25 hg -q pull ../r1
26 26 hg status
27 27 hg --debug up
28 28 hg --debug up -m
29 29 hg parents
30 30 hg -v history
31 31 hg diff > ../d
32 sed "s/\(\(---\|+++\) [^ \t]*\)[ \t].*/\1/" < ../d
32 sed "s/\(\(---\|+++\) [a-zA-Z0-9_/.-]*\).*/\1/" < ../d
33 33
General Comments 0
You need to be logged in to leave comments. Login now