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