|
1 $ "$TESTDIR/hghave" baz || exit 80 |
|
2 |
|
3 $ baz my-id "mercurial <mercurial@selenic.com>" |
|
4 |
|
5 $ echo "[extensions]" >> $HGRCPATH |
|
6 $ echo "convert=" >> $HGRCPATH |
|
7 $ echo 'graphlog =' >> $HGRCPATH |
|
8 |
|
9 create baz archive |
|
10 $ baz make-archive baz@mercurial--convert hg-test-convert-baz |
|
11 |
|
12 initialize baz repo |
|
13 $ mkdir baz-repo |
|
14 $ cd baz-repo/ |
|
15 $ baz init-tree baz@mercurial--convert/baz--test--0 |
|
16 $ baz import |
|
17 * creating version baz@mercurial--convert/baz--test--0 |
|
18 * imported baz@mercurial--convert/baz--test--0 |
|
19 |
|
20 create initial files |
|
21 $ echo 'this is a file' > a |
|
22 $ baz add a |
|
23 $ mkdir src |
|
24 $ baz add src |
|
25 $ cd src |
|
26 $ dd count=1 if=/dev/zero of=b > /dev/null 2> /dev/null |
|
27 $ baz add b |
|
28 HACK: hide GNU tar-1.22 "tar: The --preserve option is deprecated, use --preserve-permissions --preserve-order instead" |
|
29 $ baz commit -s "added a file, src and src/b (binary)" 2>&1 | grep -v '^tar' |
|
30 * build pristine tree for baz@mercurial--convert/baz--test--0--base-0 |
|
31 * Scanning for full-tree revision: . |
|
32 * from import revision: baz@mercurial--convert/baz--test--0--base-0 |
|
33 A/ .arch-ids |
|
34 A/ src |
|
35 A/ src/.arch-ids |
|
36 A .arch-ids/a.id |
|
37 A a |
|
38 A src/.arch-ids/=id |
|
39 A src/.arch-ids/b.id |
|
40 A src/b |
|
41 * update pristine tree (baz@mercurial--convert/baz--test--0--base-0 => baz--test--0--patch-1) |
|
42 * committed baz@mercurial--convert/baz--test--0--patch-1 |
|
43 |
|
44 create link file and modify a |
|
45 $ ln -s ../a a-link |
|
46 $ baz add a-link |
|
47 $ echo 'this a modification to a' >> ../a |
|
48 $ baz commit -s "added link to a and modify a" |
|
49 A src/.arch-ids/a-link.id |
|
50 A src/a-link |
|
51 M a |
|
52 * update pristine tree (baz@mercurial--convert/baz--test--0--patch-1 => baz--test--0--patch-2) |
|
53 * committed baz@mercurial--convert/baz--test--0--patch-2 |
|
54 |
|
55 create second link and modify b |
|
56 $ ln -s ../a a-link-2 |
|
57 $ baz add a-link-2 |
|
58 $ dd count=1 seek=1 if=/dev/zero of=b > /dev/null 2> /dev/null |
|
59 $ baz commit -s "added second link and modify b" |
|
60 A src/.arch-ids/a-link-2.id |
|
61 A src/a-link-2 |
|
62 Mb src/b |
|
63 * update pristine tree (baz@mercurial--convert/baz--test--0--patch-2 => baz--test--0--patch-3) |
|
64 * committed baz@mercurial--convert/baz--test--0--patch-3 |
|
65 |
|
66 b file to link and a-link-2 to regular file |
|
67 $ rm -f a-link-2 |
|
68 $ echo 'this is now a regular file' > a-link-2 |
|
69 $ ln -sf ../a b |
|
70 $ baz commit -s "file to link and link to file test" |
|
71 fl src/b |
|
72 lf src/a-link-2 |
|
73 * update pristine tree (baz@mercurial--convert/baz--test--0--patch-3 => baz--test--0--patch-4) |
|
74 * committed baz@mercurial--convert/baz--test--0--patch-4 |
|
75 |
|
76 move a-link-2 file and src directory |
|
77 $ cd .. |
|
78 $ baz mv src/a-link-2 c |
|
79 $ baz mv src test |
|
80 $ baz commit -s "move and rename a-link-2 file and src directory" |
|
81 D/ src/.arch-ids |
|
82 A/ test/.arch-ids |
|
83 /> src test |
|
84 => src/.arch-ids/a-link-2.id .arch-ids/c.id |
|
85 => src/a-link-2 c |
|
86 => src/.arch-ids/=id test/.arch-ids/=id |
|
87 => src/.arch-ids/a-link.id test/.arch-ids/a-link.id |
|
88 => src/.arch-ids/b.id test/.arch-ids/b.id |
|
89 * update pristine tree (baz@mercurial--convert/baz--test--0--patch-4 => baz--test--0--patch-5) |
|
90 * committed baz@mercurial--convert/baz--test--0--patch-5 |
|
91 |
|
92 move and add the moved file again |
|
93 $ echo e > e |
|
94 $ baz add e |
|
95 $ baz commit -s "add e" |
|
96 A .arch-ids/e.id |
|
97 A e |
|
98 * update pristine tree (baz@mercurial--convert/baz--test--0--patch-5 => baz--test--0--patch-6) |
|
99 * committed baz@mercurial--convert/baz--test--0--patch-6 |
|
100 $ baz mv e f |
|
101 $ echo ee > e |
|
102 $ baz add e |
|
103 $ baz commit -s "move e and recreate it again" |
|
104 A .arch-ids/e.id |
|
105 A e |
|
106 => .arch-ids/e.id .arch-ids/f.id |
|
107 => e f |
|
108 * update pristine tree (baz@mercurial--convert/baz--test--0--patch-6 => baz--test--0--patch-7) |
|
109 * committed baz@mercurial--convert/baz--test--0--patch-7 |
|
110 $ cd .. |
|
111 |
|
112 converting baz repo to Mercurial |
|
113 $ hg convert baz-repo baz-repo-hg |
|
114 initializing destination baz-repo-hg repository |
|
115 analyzing tree version baz@mercurial--convert/baz--test--0... |
|
116 scanning source... |
|
117 sorting... |
|
118 converting... |
|
119 7 initial import |
|
120 6 added a file, src and src/b (binary) |
|
121 5 added link to a and modify a |
|
122 4 added second link and modify b |
|
123 3 file to link and link to file test |
|
124 2 move and rename a-link-2 file and src directory |
|
125 1 add e |
|
126 0 move e and recreate it again |
|
127 |
|
128 $ baz register-archive -d baz@mercurial--convert |
|
129 |
|
130 $ glog() |
|
131 > { |
|
132 > hg glog --template '{rev} "{desc|firstline}" files: {files}\n' "$@" |
|
133 > } |
|
134 |
|
135 show graph log |
|
136 $ glog -R baz-repo-hg |
|
137 o 7 "move e and recreate it again" files: e f |
|
138 | |
|
139 o 6 "add e" files: e |
|
140 | |
|
141 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 |
|
142 | |
|
143 o 4 "file to link and link to file test" files: src/a-link-2 src/b |
|
144 | |
|
145 o 3 "added second link and modify b" files: src/a-link-2 src/b |
|
146 | |
|
147 o 2 "added link to a and modify a" files: a src/a-link |
|
148 | |
|
149 o 1 "added a file, src and src/b (binary)" files: a src/b |
|
150 | |
|
151 o 0 "initial import" files: |
|
152 |
|
153 $ hg up -q -R baz-repo-hg |
|
154 $ hg -R baz-repo-hg manifest --debug |
|
155 c4072c4b72e1cabace081888efa148ee80ca3cbb 644 a |
|
156 0201ac32a3a8e86e303dff60366382a54b48a72e 644 c |
|
157 1a4a864db0073705a11b1439f563bfa4b46d9246 644 e |
|
158 09e0222742fc3f75777fa9d68a5d8af7294cb5e7 644 f |
|
159 c0067ba5ff0b7c9a3eb17270839d04614c435623 644 @ test/a-link |
|
160 375f4263d86feacdea7e3c27100abd1560f2a973 644 @ test/b |
|
161 $ hg -R baz-repo-hg log -r 5 -r 7 -C --debug | grep copies |
|
162 copies: c (src/a-link-2) test/a-link (src/a-link) test/b (src/b) |
|
163 copies: f (e) |