annotate tests/test-convert-tla.t @ 12761:11c3c77da62a

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