tests/test-convert-tla.t
author Martin Geisler <mg@aragost.com>
Mon, 30 Apr 2012 12:04:30 +0200
branchstable
changeset 16548 e49e039acd5e
parent 15441 e0348815e806
child 20117 aa9385f983fa
permissions -rw-r--r--
doc: update copyright years to 2012 I sometimes look at a piece of software and if the man page says "Copyright 2004", then I'm inclined to think that the project is stale or that the authors are lazy. Neither is good publicity for us :-)
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
6079
ea34059b89de convert: added GNU Arch (tla) tests and related fixes
Aleix Conchillo Flaque <aleix@member.fsf.org>
parents:
diff changeset
     1
15441
e0348815e806 tests: use 'hghave symlink' for tests using symlinks
Mads Kiilerich <mads@kiilerich.com>
parents: 13765
diff changeset
     2
  $ "$TESTDIR/hghave" tla symlink || exit 80
12533
068449e515e2 tests: unify test-convert-tla
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
     3
  $ tla my-id "mercurial <mercurial@selenic.com>"
068449e515e2 tests: unify test-convert-tla
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
     4
  $ echo "[extensions]" >> $HGRCPATH
068449e515e2 tests: unify test-convert-tla
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
     5
  $ echo "convert=" >> $HGRCPATH
068449e515e2 tests: unify test-convert-tla
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
     6
  $ echo 'graphlog =' >> $HGRCPATH
068449e515e2 tests: unify test-convert-tla
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
     7
068449e515e2 tests: unify test-convert-tla
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
     8
create tla archive
6079
ea34059b89de convert: added GNU Arch (tla) tests and related fixes
Aleix Conchillo Flaque <aleix@member.fsf.org>
parents:
diff changeset
     9
12533
068449e515e2 tests: unify test-convert-tla
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    10
  $ 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
    11
068449e515e2 tests: unify test-convert-tla
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    12
initialize tla repo
6084
a672df805855 Document and fix tla/baz conversion tests
Patrick Mezard <pmezard@gmail.com>
parents: 6079
diff changeset
    13
12533
068449e515e2 tests: unify test-convert-tla
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    14
  $ mkdir tla-repo
068449e515e2 tests: unify test-convert-tla
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    15
  $ cd tla-repo/
068449e515e2 tests: unify test-convert-tla
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    16
  $ tla init-tree tla@mercurial--convert/tla--test--0
068449e515e2 tests: unify test-convert-tla
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    17
  $ tla import
068449e515e2 tests: unify test-convert-tla
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    18
  * creating version tla@mercurial--convert/tla--test--0
068449e515e2 tests: unify test-convert-tla
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    19
  * imported tla@mercurial--convert/tla--test--0
068449e515e2 tests: unify test-convert-tla
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    20
068449e515e2 tests: unify test-convert-tla
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    21
create initial files
6079
ea34059b89de convert: added GNU Arch (tla) tests and related fixes
Aleix Conchillo Flaque <aleix@member.fsf.org>
parents:
diff changeset
    22
12533
068449e515e2 tests: unify test-convert-tla
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    23
  $ echo 'this is a file' > a
068449e515e2 tests: unify test-convert-tla
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    24
  $ tla add a
068449e515e2 tests: unify test-convert-tla
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    25
  $ mkdir src
068449e515e2 tests: unify test-convert-tla
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    26
  $ tla add src
068449e515e2 tests: unify test-convert-tla
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    27
  $ cd src
068449e515e2 tests: unify test-convert-tla
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    28
  $ 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
    29
  $ tla add b
068449e515e2 tests: unify test-convert-tla
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    30
  $ 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
    31
  A/ .arch-ids
068449e515e2 tests: unify test-convert-tla
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    32
  A/ src
068449e515e2 tests: unify test-convert-tla
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    33
  A/ src/.arch-ids
068449e515e2 tests: unify test-convert-tla
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    34
  A  .arch-ids/a.id
068449e515e2 tests: unify test-convert-tla
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    35
  A  a
068449e515e2 tests: unify test-convert-tla
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    36
  A  src/.arch-ids/=id
068449e515e2 tests: unify test-convert-tla
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    37
  A  src/.arch-ids/b.id
068449e515e2 tests: unify test-convert-tla
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    38
  A  src/b
068449e515e2 tests: unify test-convert-tla
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    39
  * 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
    40
  * 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
    41
12533
068449e515e2 tests: unify test-convert-tla
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    42
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
    43
12533
068449e515e2 tests: unify test-convert-tla
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    44
  $ ln -s ../a a-link
068449e515e2 tests: unify test-convert-tla
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    45
  $ tla add a-link
068449e515e2 tests: unify test-convert-tla
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    46
  $ echo 'this a modification to a' >> ../a
068449e515e2 tests: unify test-convert-tla
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    47
  $ 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
    48
  A  src/.arch-ids/a-link.id
068449e515e2 tests: unify test-convert-tla
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    49
  A  src/a-link
068449e515e2 tests: unify test-convert-tla
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    50
  M  a
068449e515e2 tests: unify test-convert-tla
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    51
  * 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
    52
  * committed tla@mercurial--convert/tla--test--0--patch-2
068449e515e2 tests: unify test-convert-tla
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    53
068449e515e2 tests: unify test-convert-tla
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    54
create second link and modify b
068449e515e2 tests: unify test-convert-tla
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    55
068449e515e2 tests: unify test-convert-tla
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    56
  $ ln -s ../a a-link-2
068449e515e2 tests: unify test-convert-tla
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    57
  $ tla add a-link-2
068449e515e2 tests: unify test-convert-tla
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    58
  $ 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
    59
  $ tla commit -s "added second link and modify b"
068449e515e2 tests: unify test-convert-tla
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    60
  A  src/.arch-ids/a-link-2.id
068449e515e2 tests: unify test-convert-tla
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    61
  A  src/a-link-2
068449e515e2 tests: unify test-convert-tla
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    62
  Mb src/b
068449e515e2 tests: unify test-convert-tla
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    63
  * 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
    64
  * 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
    65
12533
068449e515e2 tests: unify test-convert-tla
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    66
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
    67
068449e515e2 tests: unify test-convert-tla
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    68
  $ rm -f a-link-2
068449e515e2 tests: unify test-convert-tla
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    69
  $ 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
    70
  $ ln -sf ../a b
068449e515e2 tests: unify test-convert-tla
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    71
  $ 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
    72
  fl src/b
068449e515e2 tests: unify test-convert-tla
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    73
  lf src/a-link-2
068449e515e2 tests: unify test-convert-tla
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    74
  * 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
    75
  * committed tla@mercurial--convert/tla--test--0--patch-4
068449e515e2 tests: unify test-convert-tla
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    76
068449e515e2 tests: unify test-convert-tla
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    77
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
    78
12533
068449e515e2 tests: unify test-convert-tla
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    79
  $ cd ..
068449e515e2 tests: unify test-convert-tla
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    80
  $ tla mv src/a-link-2 c
068449e515e2 tests: unify test-convert-tla
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    81
  $ tla mv src test
068449e515e2 tests: unify test-convert-tla
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    82
  $ 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
    83
  D/ src/.arch-ids
068449e515e2 tests: unify test-convert-tla
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    84
  A/ test/.arch-ids
068449e515e2 tests: unify test-convert-tla
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    85
  /> src	test
068449e515e2 tests: unify test-convert-tla
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    86
  => 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
    87
  => src/a-link-2	c
068449e515e2 tests: unify test-convert-tla
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    88
  => src/.arch-ids/=id	test/.arch-ids/=id
068449e515e2 tests: unify test-convert-tla
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    89
  => 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
    90
  => 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
    91
  * 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
    92
  * committed tla@mercurial--convert/tla--test--0--patch-5
068449e515e2 tests: unify test-convert-tla
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    93
  $ cd ..
6079
ea34059b89de convert: added GNU Arch (tla) tests and related fixes
Aleix Conchillo Flaque <aleix@member.fsf.org>
parents:
diff changeset
    94
12533
068449e515e2 tests: unify test-convert-tla
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    95
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
    96
12533
068449e515e2 tests: unify test-convert-tla
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    97
  $ hg convert tla-repo tla-repo-hg
068449e515e2 tests: unify test-convert-tla
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    98
  initializing destination tla-repo-hg repository
068449e515e2 tests: unify test-convert-tla
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    99
  analyzing tree version tla@mercurial--convert/tla--test--0...
068449e515e2 tests: unify test-convert-tla
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   100
  scanning source...
068449e515e2 tests: unify test-convert-tla
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   101
  sorting...
068449e515e2 tests: unify test-convert-tla
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   102
  converting...
068449e515e2 tests: unify test-convert-tla
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   103
  5 initial import
068449e515e2 tests: unify test-convert-tla
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   104
  4 added a file, src and src/b (binary)
068449e515e2 tests: unify test-convert-tla
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   105
  3 added link to a and modify a
068449e515e2 tests: unify test-convert-tla
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   106
  2 added second link and modify b
068449e515e2 tests: unify test-convert-tla
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   107
  1 file to link and link to file test
068449e515e2 tests: unify test-convert-tla
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   108
  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
   109
  $ tla register-archive -d tla@mercurial--convert
068449e515e2 tests: unify test-convert-tla
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   110
  $ glog()
068449e515e2 tests: unify test-convert-tla
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   111
  > {
068449e515e2 tests: unify test-convert-tla
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   112
  >     hg glog --template '{rev} "{desc|firstline}" files: {files}\n' "$@"
068449e515e2 tests: unify test-convert-tla
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   113
  > }
6079
ea34059b89de convert: added GNU Arch (tla) tests and related fixes
Aleix Conchillo Flaque <aleix@member.fsf.org>
parents:
diff changeset
   114
12533
068449e515e2 tests: unify test-convert-tla
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   115
show graph log
6079
ea34059b89de convert: added GNU Arch (tla) tests and related fixes
Aleix Conchillo Flaque <aleix@member.fsf.org>
parents:
diff changeset
   116
12533
068449e515e2 tests: unify test-convert-tla
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   117
  $ glog -R tla-repo-hg
068449e515e2 tests: unify test-convert-tla
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   118
  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
   119
  |
068449e515e2 tests: unify test-convert-tla
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   120
  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
   121
  |
068449e515e2 tests: unify test-convert-tla
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   122
  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
   123
  |
068449e515e2 tests: unify test-convert-tla
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   124
  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
   125
  |
068449e515e2 tests: unify test-convert-tla
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   126
  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
   127
  |
068449e515e2 tests: unify test-convert-tla
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   128
  o  0 "initial import" files:
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
  $ hg up -q -R tla-repo-hg
068449e515e2 tests: unify test-convert-tla
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   131
  $ hg -R tla-repo-hg manifest --debug
068449e515e2 tests: unify test-convert-tla
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   132
  c4072c4b72e1cabace081888efa148ee80ca3cbb 644   a
068449e515e2 tests: unify test-convert-tla
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   133
  0201ac32a3a8e86e303dff60366382a54b48a72e 644   c
068449e515e2 tests: unify test-convert-tla
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   134
  c0067ba5ff0b7c9a3eb17270839d04614c435623 644 @ test/a-link
068449e515e2 tests: unify test-convert-tla
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   135
  375f4263d86feacdea7e3c27100abd1560f2a973 644 @ test/b