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