1 #!/bin/sh |
|
2 |
|
3 "$TESTDIR/hghave" tla || exit 80 |
|
4 |
|
5 mkdir do_not_use_HOME_tla |
|
6 cd do_not_use_HOME_tla |
|
7 HOME=`pwd`; export HOME |
|
8 cd .. |
|
9 tla my-id "mercurial <mercurial@selenic.com>" |
|
10 |
|
11 echo "[extensions]" >> $HGRCPATH |
|
12 echo "convert=" >> $HGRCPATH |
|
13 echo 'graphlog =' >> $HGRCPATH |
|
14 |
|
15 echo % create tla archive |
|
16 tla make-archive tla@mercurial--convert `pwd`/hg-test-convert-tla |
|
17 |
|
18 echo % initialize tla repo |
|
19 mkdir tla-repo |
|
20 cd tla-repo/ |
|
21 tla init-tree tla@mercurial--convert/tla--test--0 |
|
22 tla import |
|
23 |
|
24 echo % create initial files |
|
25 echo 'this is a file' > a |
|
26 tla add a |
|
27 mkdir src |
|
28 tla add src |
|
29 cd src |
|
30 dd count=1 if=/dev/zero of=b > /dev/null 2> /dev/null |
|
31 tla add b |
|
32 tla commit -s "added a file, src and src/b (binary)" |
|
33 |
|
34 echo % create link file and modify a |
|
35 ln -s ../a a-link |
|
36 tla add a-link |
|
37 echo 'this a modification to a' >> ../a |
|
38 tla commit -s "added link to a and modify a" |
|
39 |
|
40 echo % create second link and modify b |
|
41 ln -s ../a a-link-2 |
|
42 tla add a-link-2 |
|
43 dd count=1 seek=1 if=/dev/zero of=b > /dev/null 2> /dev/null |
|
44 tla commit -s "added second link and modify b" |
|
45 |
|
46 echo % b file to link and a-link-2 to regular file |
|
47 rm -f a-link-2 |
|
48 echo 'this is now a regular file' > a-link-2 |
|
49 ln -sf ../a b |
|
50 tla commit -s "file to link and link to file test" |
|
51 |
|
52 echo % move a-link-2 file and src directory |
|
53 cd .. |
|
54 tla mv src/a-link-2 c |
|
55 tla mv src test |
|
56 tla commit -s "move and rename a-link-2 file and src directory" |
|
57 |
|
58 cd .. |
|
59 |
|
60 echo % converting tla repo to Mercurial |
|
61 hg convert tla-repo tla-repo-hg |
|
62 |
|
63 tla register-archive -d tla@mercurial--convert |
|
64 |
|
65 glog() |
|
66 { |
|
67 hg glog --template '{rev} "{desc|firstline}" files: {files}\n' "$@" |
|
68 } |
|
69 |
|
70 echo % show graph log |
|
71 glog -R tla-repo-hg |
|
72 hg up -q -R tla-repo-hg |
|
73 hg -R tla-repo-hg manifest --debug |
|