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