tests/test-convert-splicemap.t
author Patrick Mezard <patrick@mezard.eu>
Mon, 23 Apr 2012 12:12:04 +0200
branchstable
changeset 16491 bfe89d65d651
parent 16480 123f96c4d454
child 19120 58e782f076e7
permissions -rw-r--r--
update: make --check abort with dirty subrepos Aka "we could use dirty() but... yeah let's use it"
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
8047
04c62275cbc7 convert: better mapfile parsing errors (issue1581/1)
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
     1
12531
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
     2
  $ echo "[extensions]" >> $HGRCPATH
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
     3
  $ echo "convert=" >> $HGRCPATH
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
     4
  $ echo 'graphlog =' >> $HGRCPATH
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
     5
  $ glog()
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
     6
  > {
16106
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
     7
  >     hg glog --template '{rev}:{node|short} "{desc|firstline}"\
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
     8
  >  files: {files}\n' "$@"
12531
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
     9
  > }
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    10
  $ hg init repo1
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    11
  $ cd repo1
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    12
  $ echo a > a
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    13
  $ hg ci -Am adda
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    14
  adding a
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    15
  $ echo b > b
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    16
  $ echo a >> a
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    17
  $ hg ci -Am addb
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    18
  adding b
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    19
  $ PARENTID1=`hg id --debug -i`
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    20
  $ echo c > c
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    21
  $ hg ci -Am addc
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    22
  adding c
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    23
  $ PARENTID2=`hg id --debug -i`
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    24
  $ cd ..
16106
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
    25
  $ glog -R repo1
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
    26
  @  2:e55c719b85b6 "addc" files: c
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
    27
  |
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
    28
  o  1:6d4c2037ddc2 "addb" files: a b
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
    29
  |
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
    30
  o  0:07f494440405 "adda" files: a
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
    31
  
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
    32
12531
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    33
  $ hg init repo2
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    34
  $ cd repo2
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    35
  $ echo b > a
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    36
  $ echo d > d
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    37
  $ hg ci -Am addaandd
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    38
  adding a
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    39
  adding d
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    40
  $ CHILDID1=`hg id --debug -i`
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    41
  $ echo d >> d
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    42
  $ hg ci -Am changed
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    43
  $ CHILDID2=`hg id --debug -i`
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    44
  $ echo e > e
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    45
  $ hg ci -Am adde
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    46
  adding e
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    47
  $ cd ..
16106
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
    48
  $ glog -R repo2
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
    49
  @  2:a39b65753b0a "adde" files: e
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
    50
  |
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
    51
  o  1:e4ea00df9189 "changed" files: d
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
    52
  |
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
    53
  o  0:527cdedf31fb "addaandd" files: a d
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
    54
  
8047
04c62275cbc7 convert: better mapfile parsing errors (issue1581/1)
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    55
12531
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    56
test invalid splicemap
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    57
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    58
  $ cat > splicemap <<EOF
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    59
  > $CHILDID2
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    60
  > EOF
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    61
  $ hg convert --splicemap splicemap repo2 repo1
16105
ebaa0aa749e2 convert: turn splicemap into a simple dictionary
Patrick Mezard <patrick@mezard.eu>
parents: 15608
diff changeset
    62
  abort: syntax error in splicemap(1): child parent1[,parent2] expected
12531
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    63
  [255]
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    64
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    65
splice repo2 on repo1
8047
04c62275cbc7 convert: better mapfile parsing errors (issue1581/1)
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    66
12531
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    67
  $ cat > splicemap <<EOF
16106
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
    68
  > $CHILDID1 $PARENTID1
12531
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    69
  > $CHILDID2 $PARENTID2,$CHILDID1
16190
9479c28a22bf convert: ignore blank lines in mapfiles (issue3286)
Patrick Mezard <patrick@mezard.eu>
parents: 16162
diff changeset
    70
  > 
12531
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    71
  > EOF
16106
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
    72
  $ cat splicemap
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
    73
  527cdedf31fbd5ea708aa14eeecf53d4676f38db 6d4c2037ddc2cb2627ac3a244ecce35283268f8e
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
    74
  e4ea00df91897da3079a10fab658c1eddba6617b e55c719b85b60e5102fac26110ba626e7cb6b7dc,527cdedf31fbd5ea708aa14eeecf53d4676f38db
16190
9479c28a22bf convert: ignore blank lines in mapfiles (issue3286)
Patrick Mezard <patrick@mezard.eu>
parents: 16162
diff changeset
    75
  
12531
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    76
  $ hg clone repo1 target1
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    77
  updating to branch default
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    78
  3 files updated, 0 files merged, 0 files removed, 0 files unresolved
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    79
  $ hg convert --splicemap splicemap repo2 target1
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    80
  scanning source...
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    81
  sorting...
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    82
  converting...
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    83
  2 addaandd
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    84
  spliced in ['6d4c2037ddc2cb2627ac3a244ecce35283268f8e'] as parents of 527cdedf31fbd5ea708aa14eeecf53d4676f38db
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    85
  1 changed
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    86
  spliced in ['e55c719b85b60e5102fac26110ba626e7cb6b7dc', '527cdedf31fbd5ea708aa14eeecf53d4676f38db'] as parents of e4ea00df91897da3079a10fab658c1eddba6617b
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    87
  0 adde
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    88
  $ glog -R target1
16106
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
    89
  o  5:16bc847b02aa "adde" files: e
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
    90
  |
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
    91
  o    4:e30e4fee3418 "changed" files: d
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
    92
  |\
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
    93
  | o  3:e673348c3a3c "addaandd" files: a d
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
    94
  | |
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
    95
  @ |  2:e55c719b85b6 "addc" files: c
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
    96
  |/
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
    97
  o  1:6d4c2037ddc2 "addb" files: a b
12531
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
    98
  |
16106
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
    99
  o  0:07f494440405 "adda" files: a
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   100
  
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   101
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   102
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   103
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   104
Test splicemap and conversion order
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   105
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   106
  $ hg init ordered
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   107
  $ cd ordered
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   108
  $ echo a > a
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   109
  $ hg ci -Am adda
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   110
  adding a
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   111
  $ hg branch branch
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   112
  marked working directory as branch branch
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   113
  (branches are permanent and global, did you want a bookmark?)
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   114
  $ echo a >> a
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   115
  $ hg ci -Am changea
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   116
  $ echo a >> a
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   117
  $ hg ci -Am changeaagain
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   118
  $ hg up 0
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   119
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   120
  $ echo b > b
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   121
  $ hg ci -Am addb
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   122
  adding b
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   123
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   124
We want 2 to depend on 1 and 3. Since 3 is always converted after 2,
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   125
the bug should be exhibited with all conversion orders.
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   126
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   127
  $ cat > ../splicemap <<EOF
16480
123f96c4d454 tests: fix bashism in test-convert-splicemap.t
Mads Kiilerich <mads@kiilerich.com>
parents: 16190
diff changeset
   128
  > `(hg id -r 2 -i --debug)` `(hg id -r 1 -i --debug)`, `(hg id -r 3 -i --debug)`
16106
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   129
  > EOF
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   130
  $ cd ..
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   131
  $ cat splicemap
16118
d554a3dcae5a convert: tolerate spaces between splicemap parent ids (issue3203)
Patrick Mezard <patrick@mezard.eu>
parents: 16106
diff changeset
   132
  7c364e7fa7d70ae525610c016317ed717b519d97 717d54d67e6c31fd75ffef2ff3042bdd98418437, 102a90ea7b4a3361e4082ed620918c261189a36a
16106
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   133
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   134
Test regular conversion
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   135
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   136
  $ hg convert --splicemap splicemap ordered ordered-hg1
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   137
  initializing destination ordered-hg1 repository
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   138
  scanning source...
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   139
  sorting...
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   140
  converting...
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   141
  3 adda
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   142
  2 changea
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   143
  1 addb
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   144
  0 changeaagain
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   145
  spliced in ['717d54d67e6c31fd75ffef2ff3042bdd98418437', '102a90ea7b4a3361e4082ed620918c261189a36a'] as parents of 7c364e7fa7d70ae525610c016317ed717b519d97
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   146
  $ glog -R ordered-hg1
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   147
  o    3:4cb04b9afbf2 "changeaagain" files: a
12531
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   148
  |\
16106
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   149
  | o  2:102a90ea7b4a "addb" files: b
12531
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   150
  | |
16106
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   151
  o |  1:717d54d67e6c "changea" files: a
12531
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   152
  |/
16106
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   153
  o  0:07f494440405 "adda" files: a
12531
a1cbcc1a21f6 tests: unify test-convert-splicemap
Matt Mackall <mpm@selenic.com>
parents: 10119
diff changeset
   154
  
16106
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   155
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   156
Test conversion with parent revisions already in dest, using source
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   157
and destination identifiers. Test unknown splicemap target.
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   158
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   159
  $ hg convert -r1 ordered ordered-hg2
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   160
  initializing destination ordered-hg2 repository
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   161
  scanning source...
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   162
  sorting...
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   163
  converting...
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   164
  1 adda
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   165
  0 changea
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   166
  $ hg convert -r3 ordered ordered-hg2
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   167
  scanning source...
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   168
  sorting...
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   169
  converting...
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   170
  0 addb
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   171
  $ cat > splicemap <<EOF
16480
123f96c4d454 tests: fix bashism in test-convert-splicemap.t
Mads Kiilerich <mads@kiilerich.com>
parents: 16190
diff changeset
   172
  > `(hg -R ordered id -r 2 -i --debug)` \
123f96c4d454 tests: fix bashism in test-convert-splicemap.t
Mads Kiilerich <mads@kiilerich.com>
parents: 16190
diff changeset
   173
  > `(hg -R ordered-hg2 id -r 1 -i --debug)`,\
123f96c4d454 tests: fix bashism in test-convert-splicemap.t
Mads Kiilerich <mads@kiilerich.com>
parents: 16190
diff changeset
   174
  > `(hg -R ordered-hg2 id -r 2 -i --debug)`
16106
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   175
  > deadbeef102a90ea7b4a3361e4082ed620918c26 deadbeef102a90ea7b4a3361e4082ed620918c27
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   176
  > EOF
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   177
  $ hg convert --splicemap splicemap ordered ordered-hg2
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   178
  scanning source...
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   179
  splice map revision deadbeef102a90ea7b4a3361e4082ed620918c26 is not being converted, ignoring
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   180
  sorting...
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   181
  converting...
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   182
  0 changeaagain
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   183
  spliced in ['717d54d67e6c31fd75ffef2ff3042bdd98418437', '102a90ea7b4a3361e4082ed620918c261189a36a'] as parents of 7c364e7fa7d70ae525610c016317ed717b519d97
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   184
  $ glog -R ordered-hg2
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   185
  o    3:4cb04b9afbf2 "changeaagain" files: a
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   186
  |\
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   187
  | o  2:102a90ea7b4a "addb" files: b
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   188
  | |
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   189
  o |  1:717d54d67e6c "changea" files: a
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   190
  |/
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   191
  o  0:07f494440405 "adda" files: a
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   192
  
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   193
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   194
Test empty conversion
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   195
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   196
  $ hg convert --splicemap splicemap ordered ordered-hg2
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   197
  scanning source...
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   198
  splice map revision deadbeef102a90ea7b4a3361e4082ed620918c26 is not being converted, ignoring
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   199
  sorting...
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   200
  converting...
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   201
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   202
Test clonebranches
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   203
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   204
  $ hg --config convert.hg.clonebranches=true convert \
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   205
  >   --splicemap splicemap ordered ordered-hg3
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   206
  initializing destination ordered-hg3 repository
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   207
  scanning source...
16162
7e279d475669 convert: fix typos in error messages
Wagner Bruna <wbruna@softwareexpress.com.br>
parents: 16118
diff changeset
   208
  abort: revision 717d54d67e6c31fd75ffef2ff3042bdd98418437 not found in destination repository (lookups with clonebranches=true are not implemented)
16106
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   209
  [255]
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   210
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   211
Test invalid dependency
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   212
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   213
  $ cat > splicemap <<EOF
16480
123f96c4d454 tests: fix bashism in test-convert-splicemap.t
Mads Kiilerich <mads@kiilerich.com>
parents: 16190
diff changeset
   214
  > `(hg -R ordered id -r 2 -i --debug)` \
16106
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   215
  > deadbeef102a90ea7b4a3361e4082ed620918c26,\
16480
123f96c4d454 tests: fix bashism in test-convert-splicemap.t
Mads Kiilerich <mads@kiilerich.com>
parents: 16190
diff changeset
   216
  > `(hg -R ordered-hg2 id -r 2 -i --debug)`
16106
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   217
  > EOF
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   218
  $ hg convert --splicemap splicemap ordered ordered-hg4
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   219
  initializing destination ordered-hg4 repository
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   220
  scanning source...
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   221
  abort: unknown splice map parent: deadbeef102a90ea7b4a3361e4082ed620918c26
d75aa756149b convert: use splicemap entries when sorting revisions (issue1748)
Patrick Mezard <patrick@mezard.eu>
parents: 16105
diff changeset
   222
  [255]