tests/test-convert-mtn.t
author FUJIWARA Katsunori <foozy@lares.dti.ne.jp>
Mon, 02 Dec 2013 00:50:29 +0900
changeset 20265 e5803150ea1d
parent 20117 aa9385f983fa
child 22046 7a9cbb315d84
permissions -rw-r--r--
ui: add "extractchoices()" to share the logic to extract choices from prompt
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
12532
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
     1
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
     2
  $ "$TESTDIR/hghave" mtn || exit 80
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
     3
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
     4
Monotone directory is called .monotone on *nix and monotone
17449
3d1b64bc8150 test-convert-mtn.t: use #if to set mtndir to the correct value
Patrick Mezard <patrick@mezard.eu>
parents: 14394
diff changeset
     5
on Windows.
3d1b64bc8150 test-convert-mtn.t: use #if to set mtndir to the correct value
Patrick Mezard <patrick@mezard.eu>
parents: 14394
diff changeset
     6
3d1b64bc8150 test-convert-mtn.t: use #if to set mtndir to the correct value
Patrick Mezard <patrick@mezard.eu>
parents: 14394
diff changeset
     7
#if windows
3d1b64bc8150 test-convert-mtn.t: use #if to set mtndir to the correct value
Patrick Mezard <patrick@mezard.eu>
parents: 14394
diff changeset
     8
3d1b64bc8150 test-convert-mtn.t: use #if to set mtndir to the correct value
Patrick Mezard <patrick@mezard.eu>
parents: 14394
diff changeset
     9
  $ mtndir=monotone
3d1b64bc8150 test-convert-mtn.t: use #if to set mtndir to the correct value
Patrick Mezard <patrick@mezard.eu>
parents: 14394
diff changeset
    10
3d1b64bc8150 test-convert-mtn.t: use #if to set mtndir to the correct value
Patrick Mezard <patrick@mezard.eu>
parents: 14394
diff changeset
    11
#else
12532
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    12
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    13
  $ mtndir=.monotone
17449
3d1b64bc8150 test-convert-mtn.t: use #if to set mtndir to the correct value
Patrick Mezard <patrick@mezard.eu>
parents: 14394
diff changeset
    14
3d1b64bc8150 test-convert-mtn.t: use #if to set mtndir to the correct value
Patrick Mezard <patrick@mezard.eu>
parents: 14394
diff changeset
    15
#endif
3d1b64bc8150 test-convert-mtn.t: use #if to set mtndir to the correct value
Patrick Mezard <patrick@mezard.eu>
parents: 14394
diff changeset
    16
12532
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    17
  $ echo "[extensions]" >> $HGRCPATH
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    18
  $ echo "convert=" >> $HGRCPATH
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    19
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    20
Windows version of monotone home
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    21
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    22
  $ APPDATA=$HOME; export APPDATA
6372
8f79820443a4 Add a test for monotone conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    23
12532
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    24
tedious monotone keys configuration
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    25
The /dev/null redirection is necessary under Windows, or
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    26
it complains about home directory permissions
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    27
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    28
  $ mtn --quiet genkey test@selenic.com 1>/dev/null 2>&1 <<EOF
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    29
  > passphrase
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    30
  > passphrase
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    31
  > EOF
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    32
  $ cat >> $HOME/$mtndir/monotonerc <<EOF
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    33
  > function get_passphrase(keypair_id)
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    34
  >     return "passphrase"
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    35
  > end
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    36
  > EOF
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    37
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    38
create monotone repository
6372
8f79820443a4 Add a test for monotone conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    39
12532
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    40
  $ mtn db init --db=repo.mtn
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    41
  $ mtn --db=repo.mtn --branch=com.selenic.test setup workingdir
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    42
  $ cd workingdir
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    43
  $ echo a > a
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    44
  $ mkdir dir
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    45
  $ echo b > dir/b
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    46
  $ echo d > dir/d
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    47
  $ python -c 'file("bin", "wb").write("a\\x00b")'
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    48
  $ echo c > c
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    49
  $ mtn add a dir/b dir/d c bin
14394
5b98d7416a32 tests: update monotone output for v1.0 changes
Matt Mackall <mpm@selenic.com>
parents: 13792
diff changeset
    50
  mtn: adding 'a' to workspace manifest
5b98d7416a32 tests: update monotone output for v1.0 changes
Matt Mackall <mpm@selenic.com>
parents: 13792
diff changeset
    51
  mtn: adding 'bin' to workspace manifest
5b98d7416a32 tests: update monotone output for v1.0 changes
Matt Mackall <mpm@selenic.com>
parents: 13792
diff changeset
    52
  mtn: adding 'c' to workspace manifest
5b98d7416a32 tests: update monotone output for v1.0 changes
Matt Mackall <mpm@selenic.com>
parents: 13792
diff changeset
    53
  mtn: adding 'dir' to workspace manifest
5b98d7416a32 tests: update monotone output for v1.0 changes
Matt Mackall <mpm@selenic.com>
parents: 13792
diff changeset
    54
  mtn: adding 'dir/b' to workspace manifest
5b98d7416a32 tests: update monotone output for v1.0 changes
Matt Mackall <mpm@selenic.com>
parents: 13792
diff changeset
    55
  mtn: adding 'dir/d' to workspace manifest
12532
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    56
  $ mtn ci -m initialize
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    57
  mtn: beginning commit on branch 'com.selenic.test'
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    58
  mtn: committed revision 0f6e5e4f2e7d2a8ef312408f57618abf026afd90
6372
8f79820443a4 Add a test for monotone conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    59
12532
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    60
update monotone working directory
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    61
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    62
  $ mtn mv a dir/a
14394
5b98d7416a32 tests: update monotone output for v1.0 changes
Matt Mackall <mpm@selenic.com>
parents: 13792
diff changeset
    63
  mtn: skipping 'dir', already accounted for in workspace
5b98d7416a32 tests: update monotone output for v1.0 changes
Matt Mackall <mpm@selenic.com>
parents: 13792
diff changeset
    64
  mtn: renaming 'a' to 'dir/a' in workspace manifest
12532
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    65
  $ echo a >> dir/a
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    66
  $ echo b >> dir/b
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    67
  $ mtn drop c
14394
5b98d7416a32 tests: update monotone output for v1.0 changes
Matt Mackall <mpm@selenic.com>
parents: 13792
diff changeset
    68
  mtn: dropping 'c' from workspace manifest
12532
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    69
  $ python -c 'file("bin", "wb").write("b\\x00c")'
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    70
  $ mtn ci -m update1
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    71
  mtn: beginning commit on branch 'com.selenic.test'
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    72
  mtn: committed revision 51d0a982464573a2a2cf5ee2c9219c652aaebeff
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    73
  $ cd ..
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    74
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    75
convert once
6372
8f79820443a4 Add a test for monotone conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    76
12532
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    77
  $ hg convert -s mtn repo.mtn
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    78
  assuming destination repo.mtn-hg
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    79
  initializing destination repo.mtn-hg repository
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    80
  scanning source...
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    81
  sorting...
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    82
  converting...
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    83
  1 initialize
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    84
  0 update1
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    85
  $ cd workingdir
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    86
  $ echo e > e
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    87
  $ mtn add e
14394
5b98d7416a32 tests: update monotone output for v1.0 changes
Matt Mackall <mpm@selenic.com>
parents: 13792
diff changeset
    88
  mtn: adding 'e' to workspace manifest
12532
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    89
  $ mtn drop dir/b
14394
5b98d7416a32 tests: update monotone output for v1.0 changes
Matt Mackall <mpm@selenic.com>
parents: 13792
diff changeset
    90
  mtn: dropping 'dir/b' from workspace manifest
12532
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    91
  $ mtn mv bin bin2
14394
5b98d7416a32 tests: update monotone output for v1.0 changes
Matt Mackall <mpm@selenic.com>
parents: 13792
diff changeset
    92
  mtn: renaming 'bin' to 'bin2' in workspace manifest
12532
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    93
  $ mtn ci -m 'update2 "with" quotes'
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    94
  mtn: beginning commit on branch 'com.selenic.test'
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    95
  mtn: committed revision ebe58335d85d8cb176b6d0a12be04f5314b998da
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    96
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    97
test directory move
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    98
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    99
  $ mkdir -p dir1/subdir1
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   100
  $ mkdir -p dir1/subdir2_other
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   101
  $ echo file1 > dir1/subdir1/file1
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   102
  $ echo file2 > dir1/subdir2_other/file1
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   103
  $ mtn add dir1/subdir1/file1 dir1/subdir2_other/file1
14394
5b98d7416a32 tests: update monotone output for v1.0 changes
Matt Mackall <mpm@selenic.com>
parents: 13792
diff changeset
   104
  mtn: adding 'dir1' to workspace manifest
5b98d7416a32 tests: update monotone output for v1.0 changes
Matt Mackall <mpm@selenic.com>
parents: 13792
diff changeset
   105
  mtn: adding 'dir1/subdir1' to workspace manifest
5b98d7416a32 tests: update monotone output for v1.0 changes
Matt Mackall <mpm@selenic.com>
parents: 13792
diff changeset
   106
  mtn: adding 'dir1/subdir1/file1' to workspace manifest
5b98d7416a32 tests: update monotone output for v1.0 changes
Matt Mackall <mpm@selenic.com>
parents: 13792
diff changeset
   107
  mtn: adding 'dir1/subdir2_other' to workspace manifest
5b98d7416a32 tests: update monotone output for v1.0 changes
Matt Mackall <mpm@selenic.com>
parents: 13792
diff changeset
   108
  mtn: adding 'dir1/subdir2_other/file1' to workspace manifest
12532
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   109
  $ mtn ci -m createdir1
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   110
  mtn: beginning commit on branch 'com.selenic.test'
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   111
  mtn: committed revision a8d62bc04fee4d2936d28e98bbcc81686dd74306
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   112
  $ mtn rename dir1/subdir1 dir1/subdir2
14394
5b98d7416a32 tests: update monotone output for v1.0 changes
Matt Mackall <mpm@selenic.com>
parents: 13792
diff changeset
   113
  mtn: skipping 'dir1', already accounted for in workspace
5b98d7416a32 tests: update monotone output for v1.0 changes
Matt Mackall <mpm@selenic.com>
parents: 13792
diff changeset
   114
  mtn: renaming 'dir1/subdir1' to 'dir1/subdir2' in workspace manifest
12532
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   115
  $ mtn ci -m movedir1
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   116
  mtn: beginning commit on branch 'com.selenic.test'
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   117
  mtn: committed revision 2c3d241bbbfe538b1b51d910f5676407e3f4d3a6
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   118
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   119
test subdirectory move
6372
8f79820443a4 Add a test for monotone conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
   120
12532
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   121
  $ mtn mv dir dir2
14394
5b98d7416a32 tests: update monotone output for v1.0 changes
Matt Mackall <mpm@selenic.com>
parents: 13792
diff changeset
   122
  mtn: renaming 'dir' to 'dir2' in workspace manifest
12532
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   123
  $ echo newfile > dir2/newfile
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   124
  $ mtn drop dir2/d
14394
5b98d7416a32 tests: update monotone output for v1.0 changes
Matt Mackall <mpm@selenic.com>
parents: 13792
diff changeset
   125
  mtn: dropping 'dir2/d' from workspace manifest
12532
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   126
  $ mtn add dir2/newfile
14394
5b98d7416a32 tests: update monotone output for v1.0 changes
Matt Mackall <mpm@selenic.com>
parents: 13792
diff changeset
   127
  mtn: adding 'dir2/newfile' to workspace manifest
12532
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   128
  $ mtn ci -m movedir
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   129
  mtn: beginning commit on branch 'com.selenic.test'
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   130
  mtn: committed revision fdb5a02dae8bfce3a79b3393680af471016e1b4c
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   131
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   132
Test directory removal with empty directory
6372
8f79820443a4 Add a test for monotone conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
   133
12532
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   134
  $ mkdir dir2/dir
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   135
  $ mkdir dir2/dir/subdir
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   136
  $ echo f > dir2/dir/subdir/f
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   137
  $ mkdir dir2/dir/emptydir
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   138
  $ mtn add --quiet -R dir2/dir
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   139
  $ mtn ci -m emptydir
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   140
  mtn: beginning commit on branch 'com.selenic.test'
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   141
  mtn: committed revision 8bbf76d717001d24964e4604739fdcd0f539fc88
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   142
  $ mtn drop -R dir2/dir
14394
5b98d7416a32 tests: update monotone output for v1.0 changes
Matt Mackall <mpm@selenic.com>
parents: 13792
diff changeset
   143
  mtn: dropping 'dir2/dir/subdir/f' from workspace manifest
5b98d7416a32 tests: update monotone output for v1.0 changes
Matt Mackall <mpm@selenic.com>
parents: 13792
diff changeset
   144
  mtn: dropping 'dir2/dir/subdir' from workspace manifest
5b98d7416a32 tests: update monotone output for v1.0 changes
Matt Mackall <mpm@selenic.com>
parents: 13792
diff changeset
   145
  mtn: dropping 'dir2/dir/emptydir' from workspace manifest
5b98d7416a32 tests: update monotone output for v1.0 changes
Matt Mackall <mpm@selenic.com>
parents: 13792
diff changeset
   146
  mtn: dropping 'dir2/dir' from workspace manifest
12532
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   147
  $ mtn ci -m dropdirectory
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   148
  mtn: beginning commit on branch 'com.selenic.test'
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   149
  mtn: committed revision 2323d4bc324e6c82628dc04d47a9fd32ad24e322
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   150
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   151
test directory and file move
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   152
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   153
  $ mkdir -p dir3/d1
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   154
  $ echo a > dir3/a
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   155
  $ mtn add dir3/a dir3/d1
14394
5b98d7416a32 tests: update monotone output for v1.0 changes
Matt Mackall <mpm@selenic.com>
parents: 13792
diff changeset
   156
  mtn: adding 'dir3' to workspace manifest
5b98d7416a32 tests: update monotone output for v1.0 changes
Matt Mackall <mpm@selenic.com>
parents: 13792
diff changeset
   157
  mtn: adding 'dir3/a' to workspace manifest
5b98d7416a32 tests: update monotone output for v1.0 changes
Matt Mackall <mpm@selenic.com>
parents: 13792
diff changeset
   158
  mtn: adding 'dir3/d1' to workspace manifest
12532
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   159
  $ mtn ci -m dirfilemove
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   160
  mtn: beginning commit on branch 'com.selenic.test'
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   161
  mtn: committed revision 47b192f720faa622f48c68d1eb075b26d405aa8b
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   162
  $ mtn mv dir3/a dir3/d1/a
14394
5b98d7416a32 tests: update monotone output for v1.0 changes
Matt Mackall <mpm@selenic.com>
parents: 13792
diff changeset
   163
  mtn: skipping 'dir3/d1', already accounted for in workspace
5b98d7416a32 tests: update monotone output for v1.0 changes
Matt Mackall <mpm@selenic.com>
parents: 13792
diff changeset
   164
  mtn: renaming 'dir3/a' to 'dir3/d1/a' in workspace manifest
12532
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   165
  $ mtn mv dir3/d1 dir3/d2
14394
5b98d7416a32 tests: update monotone output for v1.0 changes
Matt Mackall <mpm@selenic.com>
parents: 13792
diff changeset
   166
  mtn: skipping 'dir3', already accounted for in workspace
5b98d7416a32 tests: update monotone output for v1.0 changes
Matt Mackall <mpm@selenic.com>
parents: 13792
diff changeset
   167
  mtn: renaming 'dir3/d1' to 'dir3/d2' in workspace manifest
12532
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   168
  $ mtn ci -m dirfilemove2
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   169
  mtn: beginning commit on branch 'com.selenic.test'
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   170
  mtn: committed revision 8b543a400d3ee7f6d4bb1835b9b9e3747c8cb632
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   171
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   172
test directory move into another directory move
6372
8f79820443a4 Add a test for monotone conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
   173
12532
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   174
  $ mkdir dir4
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   175
  $ mkdir dir5
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   176
  $ echo a > dir4/a
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   177
  $ mtn add dir4/a dir5
14394
5b98d7416a32 tests: update monotone output for v1.0 changes
Matt Mackall <mpm@selenic.com>
parents: 13792
diff changeset
   178
  mtn: adding 'dir4' to workspace manifest
5b98d7416a32 tests: update monotone output for v1.0 changes
Matt Mackall <mpm@selenic.com>
parents: 13792
diff changeset
   179
  mtn: adding 'dir4/a' to workspace manifest
5b98d7416a32 tests: update monotone output for v1.0 changes
Matt Mackall <mpm@selenic.com>
parents: 13792
diff changeset
   180
  mtn: adding 'dir5' to workspace manifest
12532
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   181
  $ mtn ci -m dirdirmove
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   182
  mtn: beginning commit on branch 'com.selenic.test'
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   183
  mtn: committed revision 466e0b2afc7a55aa2b4ab2f57cb240bb6cd66fc7
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   184
  $ mtn mv dir5 dir6
14394
5b98d7416a32 tests: update monotone output for v1.0 changes
Matt Mackall <mpm@selenic.com>
parents: 13792
diff changeset
   185
  mtn: renaming 'dir5' to 'dir6' in workspace manifest
12532
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   186
  $ mtn mv dir4 dir6/dir4
14394
5b98d7416a32 tests: update monotone output for v1.0 changes
Matt Mackall <mpm@selenic.com>
parents: 13792
diff changeset
   187
  mtn: skipping 'dir6', already accounted for in workspace
5b98d7416a32 tests: update monotone output for v1.0 changes
Matt Mackall <mpm@selenic.com>
parents: 13792
diff changeset
   188
  mtn: renaming 'dir4' to 'dir6/dir4' in workspace manifest
12532
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   189
  $ mtn ci -m dirdirmove2
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   190
  mtn: beginning commit on branch 'com.selenic.test'
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   191
  mtn: committed revision 3d1f77ebad0c23a5d14911be3b670f990991b749
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   192
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   193
test diverging directory moves
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   194
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   195
  $ mkdir -p dir7/dir9/dir8
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   196
  $ echo a > dir7/dir9/dir8/a
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   197
  $ echo b > dir7/dir9/b
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   198
  $ echo c > dir7/c
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   199
  $ mtn add -R dir7
14394
5b98d7416a32 tests: update monotone output for v1.0 changes
Matt Mackall <mpm@selenic.com>
parents: 13792
diff changeset
   200
  mtn: adding 'dir7' to workspace manifest
5b98d7416a32 tests: update monotone output for v1.0 changes
Matt Mackall <mpm@selenic.com>
parents: 13792
diff changeset
   201
  mtn: adding 'dir7/c' to workspace manifest
5b98d7416a32 tests: update monotone output for v1.0 changes
Matt Mackall <mpm@selenic.com>
parents: 13792
diff changeset
   202
  mtn: adding 'dir7/dir9' to workspace manifest
5b98d7416a32 tests: update monotone output for v1.0 changes
Matt Mackall <mpm@selenic.com>
parents: 13792
diff changeset
   203
  mtn: adding 'dir7/dir9/b' to workspace manifest
5b98d7416a32 tests: update monotone output for v1.0 changes
Matt Mackall <mpm@selenic.com>
parents: 13792
diff changeset
   204
  mtn: adding 'dir7/dir9/dir8' to workspace manifest
5b98d7416a32 tests: update monotone output for v1.0 changes
Matt Mackall <mpm@selenic.com>
parents: 13792
diff changeset
   205
  mtn: adding 'dir7/dir9/dir8/a' to workspace manifest
12532
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   206
  $ mtn ci -m divergentdirmove
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   207
  mtn: beginning commit on branch 'com.selenic.test'
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   208
  mtn: committed revision 08a08511f18b428d840199b062de90d0396bc2ed
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   209
  $ mtn mv dir7 dir7-2
14394
5b98d7416a32 tests: update monotone output for v1.0 changes
Matt Mackall <mpm@selenic.com>
parents: 13792
diff changeset
   210
  mtn: renaming 'dir7' to 'dir7-2' in workspace manifest
12532
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   211
  $ mtn mv dir7-2/dir9 dir9-2
14394
5b98d7416a32 tests: update monotone output for v1.0 changes
Matt Mackall <mpm@selenic.com>
parents: 13792
diff changeset
   212
  mtn: renaming 'dir7-2/dir9' to 'dir9-2' in workspace manifest
12532
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   213
  $ mtn mv dir9-2/dir8 dir8-2
14394
5b98d7416a32 tests: update monotone output for v1.0 changes
Matt Mackall <mpm@selenic.com>
parents: 13792
diff changeset
   214
  mtn: renaming 'dir9-2/dir8' to 'dir8-2' in workspace manifest
12532
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   215
  $ mtn ci -m divergentdirmove2
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   216
  mtn: beginning commit on branch 'com.selenic.test'
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   217
  mtn: committed revision 4a736634505795f17786fffdf2c9cbf5b11df6f6
13779
c13bfa451656 convert/mtn: convert suspended branches as closed branches
Daniel Atallah <daniel.atallah@gmail.com>
parents: 13765
diff changeset
   218
13792
a916e8de4313 convert/mtn: Fix conversion of large files from mtn (broken in ed97955e0c04)
Daniel Atallah <daniel.atallah@gmail.com>
parents: 13779
diff changeset
   219
test large file support (> 32kB)
a916e8de4313 convert/mtn: Fix conversion of large files from mtn (broken in ed97955e0c04)
Daniel Atallah <daniel.atallah@gmail.com>
parents: 13779
diff changeset
   220
17450
9c362a497eae test-convert-mtn.t: generate files in binary mode
Patrick Mezard <patrick@mezard.eu>
parents: 17449
diff changeset
   221
  >>> fp = file('large-file', 'wb')
9c362a497eae test-convert-mtn.t: generate files in binary mode
Patrick Mezard <patrick@mezard.eu>
parents: 17449
diff changeset
   222
  >>> for x in xrange(10000): fp.write('%d\n' % x)
9c362a497eae test-convert-mtn.t: generate files in binary mode
Patrick Mezard <patrick@mezard.eu>
parents: 17449
diff changeset
   223
  >>> fp.close()
13792
a916e8de4313 convert/mtn: Fix conversion of large files from mtn (broken in ed97955e0c04)
Daniel Atallah <daniel.atallah@gmail.com>
parents: 13779
diff changeset
   224
  $ $TESTDIR/md5sum.py large-file
a916e8de4313 convert/mtn: Fix conversion of large files from mtn (broken in ed97955e0c04)
Daniel Atallah <daniel.atallah@gmail.com>
parents: 13779
diff changeset
   225
  5d6de8a95c3b6bf9e0ffb808ba5299c1  large-file
a916e8de4313 convert/mtn: Fix conversion of large files from mtn (broken in ed97955e0c04)
Daniel Atallah <daniel.atallah@gmail.com>
parents: 13779
diff changeset
   226
  $ mtn add large-file
14394
5b98d7416a32 tests: update monotone output for v1.0 changes
Matt Mackall <mpm@selenic.com>
parents: 13792
diff changeset
   227
  mtn: adding 'large-file' to workspace manifest
13792
a916e8de4313 convert/mtn: Fix conversion of large files from mtn (broken in ed97955e0c04)
Daniel Atallah <daniel.atallah@gmail.com>
parents: 13779
diff changeset
   228
  $ mtn ci -m largefile
a916e8de4313 convert/mtn: Fix conversion of large files from mtn (broken in ed97955e0c04)
Daniel Atallah <daniel.atallah@gmail.com>
parents: 13779
diff changeset
   229
  mtn: beginning commit on branch 'com.selenic.test'
a916e8de4313 convert/mtn: Fix conversion of large files from mtn (broken in ed97955e0c04)
Daniel Atallah <daniel.atallah@gmail.com>
parents: 13779
diff changeset
   230
  mtn: committed revision f0a20fecd10dc4392d18fe69a03f1f4919d3387b
a916e8de4313 convert/mtn: Fix conversion of large files from mtn (broken in ed97955e0c04)
Daniel Atallah <daniel.atallah@gmail.com>
parents: 13779
diff changeset
   231
13779
c13bfa451656 convert/mtn: convert suspended branches as closed branches
Daniel Atallah <daniel.atallah@gmail.com>
parents: 13765
diff changeset
   232
test suspending (closing a branch)
c13bfa451656 convert/mtn: convert suspended branches as closed branches
Daniel Atallah <daniel.atallah@gmail.com>
parents: 13765
diff changeset
   233
13792
a916e8de4313 convert/mtn: Fix conversion of large files from mtn (broken in ed97955e0c04)
Daniel Atallah <daniel.atallah@gmail.com>
parents: 13779
diff changeset
   234
  $ mtn suspend f0a20fecd10dc4392d18fe69a03f1f4919d3387b 2> /dev/null
12532
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   235
  $ cd ..
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   236
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   237
convert incrementally
6372
8f79820443a4 Add a test for monotone conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
   238
12532
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   239
  $ hg convert -s mtn repo.mtn
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   240
  assuming destination repo.mtn-hg
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   241
  scanning source...
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   242
  sorting...
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   243
  converting...
13792
a916e8de4313 convert/mtn: Fix conversion of large files from mtn (broken in ed97955e0c04)
Daniel Atallah <daniel.atallah@gmail.com>
parents: 13779
diff changeset
   244
  12 update2 "with" quotes
a916e8de4313 convert/mtn: Fix conversion of large files from mtn (broken in ed97955e0c04)
Daniel Atallah <daniel.atallah@gmail.com>
parents: 13779
diff changeset
   245
  11 createdir1
a916e8de4313 convert/mtn: Fix conversion of large files from mtn (broken in ed97955e0c04)
Daniel Atallah <daniel.atallah@gmail.com>
parents: 13779
diff changeset
   246
  10 movedir1
a916e8de4313 convert/mtn: Fix conversion of large files from mtn (broken in ed97955e0c04)
Daniel Atallah <daniel.atallah@gmail.com>
parents: 13779
diff changeset
   247
  9 movedir
a916e8de4313 convert/mtn: Fix conversion of large files from mtn (broken in ed97955e0c04)
Daniel Atallah <daniel.atallah@gmail.com>
parents: 13779
diff changeset
   248
  8 emptydir
a916e8de4313 convert/mtn: Fix conversion of large files from mtn (broken in ed97955e0c04)
Daniel Atallah <daniel.atallah@gmail.com>
parents: 13779
diff changeset
   249
  7 dropdirectory
a916e8de4313 convert/mtn: Fix conversion of large files from mtn (broken in ed97955e0c04)
Daniel Atallah <daniel.atallah@gmail.com>
parents: 13779
diff changeset
   250
  6 dirfilemove
a916e8de4313 convert/mtn: Fix conversion of large files from mtn (broken in ed97955e0c04)
Daniel Atallah <daniel.atallah@gmail.com>
parents: 13779
diff changeset
   251
  5 dirfilemove2
a916e8de4313 convert/mtn: Fix conversion of large files from mtn (broken in ed97955e0c04)
Daniel Atallah <daniel.atallah@gmail.com>
parents: 13779
diff changeset
   252
  4 dirdirmove
a916e8de4313 convert/mtn: Fix conversion of large files from mtn (broken in ed97955e0c04)
Daniel Atallah <daniel.atallah@gmail.com>
parents: 13779
diff changeset
   253
  3 dirdirmove2
a916e8de4313 convert/mtn: Fix conversion of large files from mtn (broken in ed97955e0c04)
Daniel Atallah <daniel.atallah@gmail.com>
parents: 13779
diff changeset
   254
  2 divergentdirmove
a916e8de4313 convert/mtn: Fix conversion of large files from mtn (broken in ed97955e0c04)
Daniel Atallah <daniel.atallah@gmail.com>
parents: 13779
diff changeset
   255
  1 divergentdirmove2
a916e8de4313 convert/mtn: Fix conversion of large files from mtn (broken in ed97955e0c04)
Daniel Atallah <daniel.atallah@gmail.com>
parents: 13779
diff changeset
   256
  0 largefile
12532
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   257
  $ glog()
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   258
  > {
20117
aa9385f983fa tests: don't load unnecessary graphlog extension
Martin Geisler <martin@geisler.net>
parents: 17450
diff changeset
   259
  >     hg log -G --template '{rev} "{desc|firstline}" files: {files}\n' "$@"
12532
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   260
  > }
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   261
  $ cd repo.mtn-hg
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   262
  $ hg up -C
13792
a916e8de4313 convert/mtn: Fix conversion of large files from mtn (broken in ed97955e0c04)
Daniel Atallah <daniel.atallah@gmail.com>
parents: 13779
diff changeset
   263
  12 files updated, 0 files merged, 0 files removed, 0 files unresolved
12532
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   264
  $ glog
13792
a916e8de4313 convert/mtn: Fix conversion of large files from mtn (broken in ed97955e0c04)
Daniel Atallah <daniel.atallah@gmail.com>
parents: 13779
diff changeset
   265
  @  14 "largefile" files: large-file
a916e8de4313 convert/mtn: Fix conversion of large files from mtn (broken in ed97955e0c04)
Daniel Atallah <daniel.atallah@gmail.com>
parents: 13779
diff changeset
   266
  |
a916e8de4313 convert/mtn: Fix conversion of large files from mtn (broken in ed97955e0c04)
Daniel Atallah <daniel.atallah@gmail.com>
parents: 13779
diff changeset
   267
  o  13 "divergentdirmove2" files: dir7-2/c dir7/c dir7/dir9/b dir7/dir9/dir8/a dir8-2/a dir9-2/b
12532
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   268
  |
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   269
  o  12 "divergentdirmove" files: dir7/c dir7/dir9/b dir7/dir9/dir8/a
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   270
  |
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   271
  o  11 "dirdirmove2" files: dir4/a dir6/dir4/a
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   272
  |
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   273
  o  10 "dirdirmove" files: dir4/a
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   274
  |
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   275
  o  9 "dirfilemove2" files: dir3/a dir3/d2/a
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   276
  |
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   277
  o  8 "dirfilemove" files: dir3/a
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   278
  |
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   279
  o  7 "dropdirectory" files: dir2/dir/subdir/f
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   280
  |
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   281
  o  6 "emptydir" files: dir2/dir/subdir/f
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   282
  |
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   283
  o  5 "movedir" files: dir/a dir/d dir2/a dir2/newfile
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   284
  |
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   285
  o  4 "movedir1" files: dir1/subdir1/file1 dir1/subdir2/file1
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   286
  |
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   287
  o  3 "createdir1" files: dir1/subdir1/file1 dir1/subdir2_other/file1
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   288
  |
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   289
  o  2 "update2 "with" quotes" files: bin bin2 dir/b e
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   290
  |
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   291
  o  1 "update1" files: a bin c dir/a dir/b
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   292
  |
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   293
  o  0 "initialize" files: a bin c dir/b dir/d
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   294
  
6372
8f79820443a4 Add a test for monotone conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
   295
12532
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   296
manifest
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   297
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   298
  $ hg manifest
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   299
  bin2
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   300
  dir1/subdir2/file1
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   301
  dir1/subdir2_other/file1
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   302
  dir2/a
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   303
  dir2/newfile
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   304
  dir3/d2/a
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   305
  dir6/dir4/a
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   306
  dir7-2/c
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   307
  dir8-2/a
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   308
  dir9-2/b
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   309
  e
13792
a916e8de4313 convert/mtn: Fix conversion of large files from mtn (broken in ed97955e0c04)
Daniel Atallah <daniel.atallah@gmail.com>
parents: 13779
diff changeset
   310
  large-file
12532
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   311
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   312
contents
8050
087cc65bebff convert/mtn: record changes from directory renames (issue1587)
Patrick Mezard <pmezard@gmail.com>
parents: 6873
diff changeset
   313
12532
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   314
  $ cat dir2/a
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   315
  a
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   316
  a
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   317
  $ test -d dir2/dir && echo 'removed dir2/dir is still there!'
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   318
  [1]
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   319
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   320
file move
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   321
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   322
  $ hg log -v -C -r 1 | grep copies
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   323
  copies:      dir/a (a)
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   324
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   325
check directory move
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   326
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   327
  $ hg manifest -r 4
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   328
  bin2
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   329
  dir/a
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   330
  dir/d
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   331
  dir1/subdir2/file1
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   332
  dir1/subdir2_other/file1
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   333
  e
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   334
  $ test -d dir1/subdir2 || echo 'new dir1/subdir2 does not exist!'
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   335
  $ test -d dir1/subdir1 && echo 'renamed dir1/subdir1 is still there!'
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   336
  [1]
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   337
  $ hg log -v -C -r 4 | grep copies
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   338
  copies:      dir1/subdir2/file1 (dir1/subdir1/file1)
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   339
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   340
check file remove with directory move
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   341
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   342
  $ hg manifest -r 5
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   343
  bin2
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   344
  dir1/subdir2/file1
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   345
  dir1/subdir2_other/file1
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   346
  dir2/a
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   347
  dir2/newfile
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   348
  e
6372
8f79820443a4 Add a test for monotone conversion
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
   349
12532
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   350
check file move with directory move
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   351
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   352
  $ hg manifest -r 9
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   353
  bin2
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   354
  dir1/subdir2/file1
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   355
  dir1/subdir2_other/file1
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   356
  dir2/a
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   357
  dir2/newfile
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   358
  dir3/d2/a
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   359
  e
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   360
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   361
check file directory directory move
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   362
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   363
  $ hg manifest -r 11
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   364
  bin2
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   365
  dir1/subdir2/file1
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   366
  dir1/subdir2_other/file1
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   367
  dir2/a
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   368
  dir2/newfile
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   369
  dir3/d2/a
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   370
  dir6/dir4/a
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   371
  e
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   372
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   373
check divergent directory moves
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   374
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   375
  $ hg manifest -r 13
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   376
  bin2
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   377
  dir1/subdir2/file1
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   378
  dir1/subdir2_other/file1
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   379
  dir2/a
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   380
  dir2/newfile
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   381
  dir3/d2/a
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   382
  dir6/dir4/a
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   383
  dir7-2/c
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   384
  dir8-2/a
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   385
  dir9-2/b
742bb15d94a8 tests: unify test-convert-mtn
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   386
  e
13779
c13bfa451656 convert/mtn: convert suspended branches as closed branches
Daniel Atallah <daniel.atallah@gmail.com>
parents: 13765
diff changeset
   387
13792
a916e8de4313 convert/mtn: Fix conversion of large files from mtn (broken in ed97955e0c04)
Daniel Atallah <daniel.atallah@gmail.com>
parents: 13779
diff changeset
   388
test large file support (> 32kB)
a916e8de4313 convert/mtn: Fix conversion of large files from mtn (broken in ed97955e0c04)
Daniel Atallah <daniel.atallah@gmail.com>
parents: 13779
diff changeset
   389
a916e8de4313 convert/mtn: Fix conversion of large files from mtn (broken in ed97955e0c04)
Daniel Atallah <daniel.atallah@gmail.com>
parents: 13779
diff changeset
   390
  $ $TESTDIR/md5sum.py large-file
a916e8de4313 convert/mtn: Fix conversion of large files from mtn (broken in ed97955e0c04)
Daniel Atallah <daniel.atallah@gmail.com>
parents: 13779
diff changeset
   391
  5d6de8a95c3b6bf9e0ffb808ba5299c1  large-file
a916e8de4313 convert/mtn: Fix conversion of large files from mtn (broken in ed97955e0c04)
Daniel Atallah <daniel.atallah@gmail.com>
parents: 13779
diff changeset
   392
13779
c13bfa451656 convert/mtn: convert suspended branches as closed branches
Daniel Atallah <daniel.atallah@gmail.com>
parents: 13765
diff changeset
   393
check branch closing
c13bfa451656 convert/mtn: convert suspended branches as closed branches
Daniel Atallah <daniel.atallah@gmail.com>
parents: 13765
diff changeset
   394
c13bfa451656 convert/mtn: convert suspended branches as closed branches
Daniel Atallah <daniel.atallah@gmail.com>
parents: 13765
diff changeset
   395
  $ hg branches -a
c13bfa451656 convert/mtn: convert suspended branches as closed branches
Daniel Atallah <daniel.atallah@gmail.com>
parents: 13765
diff changeset
   396
  $ hg branches -c
13792
a916e8de4313 convert/mtn: Fix conversion of large files from mtn (broken in ed97955e0c04)
Daniel Atallah <daniel.atallah@gmail.com>
parents: 13779
diff changeset
   397
  com.selenic.test              14:* (closed) (glob)
13779
c13bfa451656 convert/mtn: convert suspended branches as closed branches
Daniel Atallah <daniel.atallah@gmail.com>
parents: 13765
diff changeset
   398