Show More
@@ -1,66 +1,76 b'' | |||||
1 | #!/bin/sh |
|
1 | #!/bin/sh | |
2 |
|
2 | |||
3 | "$TESTDIR/hghave" baz || exit 80 |
|
3 | "$TESTDIR/hghave" baz || exit 80 | |
4 |
|
4 | |||
|
5 | # I cannot find a way to set the user name locally | |||
|
6 | tla my-id > /dev/null 2>&1 | |||
|
7 | if [ $? -ne 0 ]; then | |||
|
8 | echo '***' | |||
|
9 | echo '* PLEASE SET YOUR TLA USERNAME WITH:' | |||
|
10 | echo '* tla my-id username' | |||
|
11 | echo '***' | |||
|
12 | exit 1; | |||
|
13 | fi | |||
|
14 | ||||
5 | echo "[extensions]" >> $HGRCPATH |
|
15 | echo "[extensions]" >> $HGRCPATH | |
6 | echo "convert=" >> $HGRCPATH |
|
16 | echo "convert=" >> $HGRCPATH | |
7 | echo 'hgext.graphlog =' >> $HGRCPATH |
|
17 | echo 'hgext.graphlog =' >> $HGRCPATH | |
8 |
|
18 | |||
9 | echo % create baz archive |
|
19 | echo % create baz archive | |
10 | baz make-archive baz@mercurial--convert hg-test-convert-baz |
|
20 | baz make-archive baz@mercurial--convert hg-test-convert-baz | |
11 |
|
21 | |||
12 | echo % initialize baz repo |
|
22 | echo % initialize baz repo | |
13 | mkdir baz-repo |
|
23 | mkdir baz-repo | |
14 | cd baz-repo/ |
|
24 | cd baz-repo/ | |
15 | baz init-tree baz@mercurial--convert/baz--test--0 |
|
25 | baz init-tree baz@mercurial--convert/baz--test--0 | |
16 | baz import |
|
26 | baz import | |
17 |
|
27 | |||
18 | echo % create initial files |
|
28 | echo % create initial files | |
19 | echo 'this is a file' > a |
|
29 | echo 'this is a file' > a | |
20 | baz add a |
|
30 | baz add a | |
21 | mkdir src |
|
31 | mkdir src | |
22 | baz add src |
|
32 | baz add src | |
23 | cd src |
|
33 | cd src | |
24 | dd count=1 if=/dev/zero of=b > /dev/null 2> /dev/null |
|
34 | dd count=1 if=/dev/zero of=b > /dev/null 2> /dev/null | |
25 | baz add b |
|
35 | baz add b | |
26 | baz commit -s "added a file, src and src/b (binary)" |
|
36 | baz commit -s "added a file, src and src/b (binary)" | |
27 |
|
37 | |||
28 | echo % create link file and modify a |
|
38 | echo % create link file and modify a | |
29 | ln -s ../a a-link |
|
39 | ln -s ../a a-link | |
30 | baz add a-link |
|
40 | baz add a-link | |
31 | echo 'this a modification to a' >> ../a |
|
41 | echo 'this a modification to a' >> ../a | |
32 | baz commit -s "added link to a and modify a" |
|
42 | baz commit -s "added link to a and modify a" | |
33 |
|
43 | |||
34 | echo % create second link and modify b |
|
44 | echo % create second link and modify b | |
35 | ln -s ../a a-link-2 |
|
45 | ln -s ../a a-link-2 | |
36 | baz add a-link-2 |
|
46 | baz add a-link-2 | |
37 | dd count=1 seek=1 if=/dev/zero of=b > /dev/null 2> /dev/null |
|
47 | dd count=1 seek=1 if=/dev/zero of=b > /dev/null 2> /dev/null | |
38 | baz commit -s "added second link and modify b" |
|
48 | baz commit -s "added second link and modify b" | |
39 |
|
49 | |||
40 | echo % b file to link and a-link-2 to regular file |
|
50 | echo % b file to link and a-link-2 to regular file | |
41 | rm -f a-link-2 |
|
51 | rm -f a-link-2 | |
42 | echo 'this is now a regular file' > a-link-2 |
|
52 | echo 'this is now a regular file' > a-link-2 | |
43 | ln -sf ../a b |
|
53 | ln -sf ../a b | |
44 | baz commit -s "file to link and link to file test" |
|
54 | baz commit -s "file to link and link to file test" | |
45 |
|
55 | |||
46 | echo % move a-link-2 file and src directory |
|
56 | echo % move a-link-2 file and src directory | |
47 | cd .. |
|
57 | cd .. | |
48 | baz mv src/a-link-2 c |
|
58 | baz mv src/a-link-2 c | |
49 | baz mv src test |
|
59 | baz mv src test | |
50 | baz commit -s "move and rename a-link-2 file and src directory" |
|
60 | baz commit -s "move and rename a-link-2 file and src directory" | |
51 |
|
61 | |||
52 | cd .. |
|
62 | cd .. | |
53 |
|
63 | |||
54 | echo % converting baz repo to Mercurial |
|
64 | echo % converting baz repo to Mercurial | |
55 | hg convert baz-repo baz-repo-hg |
|
65 | hg convert baz-repo baz-repo-hg | |
56 |
|
66 | |||
57 | baz register-archive -d baz@mercurial--convert |
|
67 | baz register-archive -d baz@mercurial--convert | |
58 |
|
68 | |||
59 | glog() |
|
69 | glog() | |
60 | { |
|
70 | { | |
61 | hg glog --template '#rev# "#desc|firstline#" files: #files#\n' "$@" |
|
71 | hg glog --template '#rev# "#desc|firstline#" files: #files#\n' "$@" | |
62 | } |
|
72 | } | |
63 |
|
73 | |||
64 | echo % show graph log |
|
74 | echo % show graph log | |
65 | glog -R baz-repo-hg |
|
75 | glog -R baz-repo-hg | |
66 | hg -R baz-repo-hg manifest --debug |
|
76 | hg -R baz-repo-hg manifest --debug |
@@ -1,66 +1,76 b'' | |||||
1 | #!/bin/sh |
|
1 | #!/bin/sh | |
2 |
|
2 | |||
3 | "$TESTDIR/hghave" tla || exit 80 |
|
3 | "$TESTDIR/hghave" tla || exit 80 | |
4 |
|
4 | |||
|
5 | # I cannot find a way to set the user name locally | |||
|
6 | tla my-id > /dev/null 2>&1 | |||
|
7 | if [ $? -ne 0 ]; then | |||
|
8 | echo '***' | |||
|
9 | echo '* PLEASE SET YOUR TLA USERNAME WITH:' | |||
|
10 | echo '* tla my-id username' | |||
|
11 | echo '***' | |||
|
12 | exit 1; | |||
|
13 | fi | |||
|
14 | ||||
5 | echo "[extensions]" >> $HGRCPATH |
|
15 | echo "[extensions]" >> $HGRCPATH | |
6 | echo "convert=" >> $HGRCPATH |
|
16 | echo "convert=" >> $HGRCPATH | |
7 | echo 'hgext.graphlog =' >> $HGRCPATH |
|
17 | echo 'hgext.graphlog =' >> $HGRCPATH | |
8 |
|
18 | |||
9 | echo % create tla archive |
|
19 | echo % create tla archive | |
10 | tla make-archive tla@mercurial--convert `pwd`/hg-test-convert-tla |
|
20 | tla make-archive tla@mercurial--convert `pwd`/hg-test-convert-tla | |
11 |
|
21 | |||
12 | echo % initialize tla repo |
|
22 | echo % initialize tla repo | |
13 | mkdir tla-repo |
|
23 | mkdir tla-repo | |
14 | cd tla-repo/ |
|
24 | cd tla-repo/ | |
15 | tla init-tree tla@mercurial--convert/tla--test--0 |
|
25 | tla init-tree tla@mercurial--convert/tla--test--0 | |
16 | tla import |
|
26 | tla import | |
17 |
|
27 | |||
18 | echo % create initial files |
|
28 | echo % create initial files | |
19 | echo 'this is a file' > a |
|
29 | echo 'this is a file' > a | |
20 | tla add a |
|
30 | tla add a | |
21 | mkdir src |
|
31 | mkdir src | |
22 | tla add src |
|
32 | tla add src | |
23 | cd src |
|
33 | cd src | |
24 | dd count=1 if=/dev/zero of=b > /dev/null 2> /dev/null |
|
34 | dd count=1 if=/dev/zero of=b > /dev/null 2> /dev/null | |
25 | tla add b |
|
35 | tla add b | |
26 | tla commit -s "added a file, src and src/b (binary)" |
|
36 | tla commit -s "added a file, src and src/b (binary)" | |
27 |
|
37 | |||
28 | echo % create link file and modify a |
|
38 | echo % create link file and modify a | |
29 | ln -s ../a a-link |
|
39 | ln -s ../a a-link | |
30 | tla add a-link |
|
40 | tla add a-link | |
31 | echo 'this a modification to a' >> ../a |
|
41 | echo 'this a modification to a' >> ../a | |
32 | tla commit -s "added link to a and modify a" |
|
42 | tla commit -s "added link to a and modify a" | |
33 |
|
43 | |||
34 | echo % create second link and modify b |
|
44 | echo % create second link and modify b | |
35 | ln -s ../a a-link-2 |
|
45 | ln -s ../a a-link-2 | |
36 | tla add a-link-2 |
|
46 | tla add a-link-2 | |
37 | dd count=1 seek=1 if=/dev/zero of=b > /dev/null 2> /dev/null |
|
47 | dd count=1 seek=1 if=/dev/zero of=b > /dev/null 2> /dev/null | |
38 | tla commit -s "added second link and modify b" |
|
48 | tla commit -s "added second link and modify b" | |
39 |
|
49 | |||
40 | echo % b file to link and a-link-2 to regular file |
|
50 | echo % b file to link and a-link-2 to regular file | |
41 | rm -f a-link-2 |
|
51 | rm -f a-link-2 | |
42 | echo 'this is now a regular file' > a-link-2 |
|
52 | echo 'this is now a regular file' > a-link-2 | |
43 | ln -sf ../a b |
|
53 | ln -sf ../a b | |
44 | tla commit -s "file to link and link to file test" |
|
54 | tla commit -s "file to link and link to file test" | |
45 |
|
55 | |||
46 | echo % move a-link-2 file and src directory |
|
56 | echo % move a-link-2 file and src directory | |
47 | cd .. |
|
57 | cd .. | |
48 | tla mv src/a-link-2 c |
|
58 | tla mv src/a-link-2 c | |
49 | tla mv src test |
|
59 | tla mv src test | |
50 | tla commit -s "move and rename a-link-2 file and src directory" |
|
60 | tla commit -s "move and rename a-link-2 file and src directory" | |
51 |
|
61 | |||
52 | cd .. |
|
62 | cd .. | |
53 |
|
63 | |||
54 | echo % converting tla repo to Mercurial |
|
64 | echo % converting tla repo to Mercurial | |
55 | hg convert tla-repo tla-repo-hg |
|
65 | hg convert tla-repo tla-repo-hg | |
56 |
|
66 | |||
57 | tla register-archive -d tla@mercurial--convert |
|
67 | tla register-archive -d tla@mercurial--convert | |
58 |
|
68 | |||
59 | glog() |
|
69 | glog() | |
60 | { |
|
70 | { | |
61 | hg glog --template '#rev# "#desc|firstline#" files: #files#\n' "$@" |
|
71 | hg glog --template '#rev# "#desc|firstline#" files: #files#\n' "$@" | |
62 | } |
|
72 | } | |
63 |
|
73 | |||
64 | echo % show graph log |
|
74 | echo % show graph log | |
65 | glog -R tla-repo-hg |
|
75 | glog -R tla-repo-hg | |
66 | hg -R tla-repo-hg manifest --debug |
|
76 | hg -R tla-repo-hg manifest --debug |
General Comments 0
You need to be logged in to leave comments.
Login now