Mercurial > hg
comparison tests/test-convert-tla.t @ 12533:068449e515e2
tests: unify test-convert-tla
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Sun, 26 Sep 2010 17:18:53 -0500 |
parents | tests/test-convert-tla@bb5ea66789e3 |
children | 7fc79055a62b |
comparison
equal
deleted
inserted
replaced
12532:742bb15d94a8 | 12533:068449e515e2 |
---|---|
1 | |
2 $ "$TESTDIR/hghave" tla || exit 80 | |
3 $ mkdir do_not_use_HOME_tla | |
4 $ cd do_not_use_HOME_tla | |
5 $ HOME=`pwd`; export HOME | |
6 $ cd .. | |
7 $ tla my-id "mercurial <mercurial@selenic.com>" | |
8 $ echo "[extensions]" >> $HGRCPATH | |
9 $ echo "convert=" >> $HGRCPATH | |
10 $ echo 'graphlog =' >> $HGRCPATH | |
11 | |
12 create tla archive | |
13 | |
14 $ tla make-archive tla@mercurial--convert `pwd`/hg-test-convert-tla | |
15 | |
16 initialize tla repo | |
17 | |
18 $ mkdir tla-repo | |
19 $ cd tla-repo/ | |
20 $ tla init-tree tla@mercurial--convert/tla--test--0 | |
21 $ tla import | |
22 * creating version tla@mercurial--convert/tla--test--0 | |
23 * imported tla@mercurial--convert/tla--test--0 | |
24 | |
25 create initial files | |
26 | |
27 $ echo 'this is a file' > a | |
28 $ tla add a | |
29 $ mkdir src | |
30 $ tla add src | |
31 $ cd src | |
32 $ dd count=1 if=/dev/zero of=b > /dev/null 2> /dev/null | |
33 $ tla add b | |
34 $ tla commit -s "added a file, src and src/b (binary)" | |
35 A/ .arch-ids | |
36 A/ src | |
37 A/ src/.arch-ids | |
38 A .arch-ids/a.id | |
39 A a | |
40 A src/.arch-ids/=id | |
41 A src/.arch-ids/b.id | |
42 A src/b | |
43 * update pristine tree (tla@mercurial--convert/tla--test--0--base-0 => tla--test--0--patch-1) | |
44 * committed tla@mercurial--convert/tla--test--0--patch-1 | |
45 | |
46 create link file and modify a | |
47 | |
48 $ ln -s ../a a-link | |
49 $ tla add a-link | |
50 $ echo 'this a modification to a' >> ../a | |
51 $ tla commit -s "added link to a and modify a" | |
52 A src/.arch-ids/a-link.id | |
53 A src/a-link | |
54 M a | |
55 * update pristine tree (tla@mercurial--convert/tla--test--0--patch-1 => tla--test--0--patch-2) | |
56 * committed tla@mercurial--convert/tla--test--0--patch-2 | |
57 | |
58 create second link and modify b | |
59 | |
60 $ ln -s ../a a-link-2 | |
61 $ tla add a-link-2 | |
62 $ dd count=1 seek=1 if=/dev/zero of=b > /dev/null 2> /dev/null | |
63 $ tla commit -s "added second link and modify b" | |
64 A src/.arch-ids/a-link-2.id | |
65 A src/a-link-2 | |
66 Mb src/b | |
67 * update pristine tree (tla@mercurial--convert/tla--test--0--patch-2 => tla--test--0--patch-3) | |
68 * committed tla@mercurial--convert/tla--test--0--patch-3 | |
69 | |
70 b file to link and a-link-2 to regular file | |
71 | |
72 $ rm -f a-link-2 | |
73 $ echo 'this is now a regular file' > a-link-2 | |
74 $ ln -sf ../a b | |
75 $ tla commit -s "file to link and link to file test" | |
76 fl src/b | |
77 lf src/a-link-2 | |
78 * update pristine tree (tla@mercurial--convert/tla--test--0--patch-3 => tla--test--0--patch-4) | |
79 * committed tla@mercurial--convert/tla--test--0--patch-4 | |
80 | |
81 move a-link-2 file and src directory | |
82 | |
83 $ cd .. | |
84 $ tla mv src/a-link-2 c | |
85 $ tla mv src test | |
86 $ tla commit -s "move and rename a-link-2 file and src directory" | |
87 D/ src/.arch-ids | |
88 A/ test/.arch-ids | |
89 /> src test | |
90 => src/.arch-ids/a-link-2.id .arch-ids/c.id | |
91 => src/a-link-2 c | |
92 => src/.arch-ids/=id test/.arch-ids/=id | |
93 => src/.arch-ids/a-link.id test/.arch-ids/a-link.id | |
94 => src/.arch-ids/b.id test/.arch-ids/b.id | |
95 * update pristine tree (tla@mercurial--convert/tla--test--0--patch-4 => tla--test--0--patch-5) | |
96 * committed tla@mercurial--convert/tla--test--0--patch-5 | |
97 $ cd .. | |
98 | |
99 converting tla repo to Mercurial | |
100 | |
101 $ hg convert tla-repo tla-repo-hg | |
102 initializing destination tla-repo-hg repository | |
103 analyzing tree version tla@mercurial--convert/tla--test--0... | |
104 scanning source... | |
105 sorting... | |
106 converting... | |
107 5 initial import | |
108 4 added a file, src and src/b (binary) | |
109 3 added link to a and modify a | |
110 2 added second link and modify b | |
111 1 file to link and link to file test | |
112 0 move and rename a-link-2 file and src directory | |
113 $ tla register-archive -d tla@mercurial--convert | |
114 $ glog() | |
115 > { | |
116 > hg glog --template '{rev} "{desc|firstline}" files: {files}\n' "$@" | |
117 > } | |
118 | |
119 show graph log | |
120 | |
121 $ glog -R tla-repo-hg | |
122 o 5 "move and rename a-link-2 file and src directory" files: c src/a-link src/a-link-2 src/b test/a-link test/b | |
123 | | |
124 o 4 "file to link and link to file test" files: src/a-link-2 src/b | |
125 | | |
126 o 3 "added second link and modify b" files: src/a-link-2 src/b | |
127 | | |
128 o 2 "added link to a and modify a" files: a src/a-link | |
129 | | |
130 o 1 "added a file, src and src/b (binary)" files: a src/b | |
131 | | |
132 o 0 "initial import" files: | |
133 | |
134 $ hg up -q -R tla-repo-hg | |
135 $ hg -R tla-repo-hg manifest --debug | |
136 c4072c4b72e1cabace081888efa148ee80ca3cbb 644 a | |
137 0201ac32a3a8e86e303dff60366382a54b48a72e 644 c | |
138 c0067ba5ff0b7c9a3eb17270839d04614c435623 644 @ test/a-link | |
139 375f4263d86feacdea7e3c27100abd1560f2a973 644 @ test/b |