tests/test-convert-hg-startrev.t
author Matt Mackall <mpm@selenic.com>
Sun, 01 May 2016 14:36:12 -0500
branchstable
changeset 29053 61463b8fcef8
parent 28900 b65966f50058
child 42621 99ebde4fec99
permissions -rw-r--r--
Added signature for changeset a56296f55a5e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
12148
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
     1
13519
43b3b761d9d1 tests: don't overwrite HGRCPATH
Martin Geisler <mg@aragost.com>
parents: 12950
diff changeset
     2
  $ cat >> $HGRCPATH <<EOF
12148
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
     3
  > [extensions]
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
     4
  > convert =
12350
e7e3b0618d8d test-convert-hg-startrev: enable convert.hg.saverev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 12148
diff changeset
     5
  > [convert]
e7e3b0618d8d test-convert-hg-startrev: enable convert.hg.saverev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 12148
diff changeset
     6
  > hg.saverev = yes
12148
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
     7
  > EOF
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
     8
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
     9
  $ glog()
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
    10
  > {
20117
aa9385f983fa tests: don't load unnecessary graphlog extension
Martin Geisler <martin@geisler.net>
parents: 19891
diff changeset
    11
  >     hg -R "$1" log -G --template '{rev} "{desc}" files: {files}\n'
12148
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
    12
  > }
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
    13
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
    14
  $ hg init source
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
    15
  $ cd source
6885
6e253aa04ff7 convert: implement startrev for hg source
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    16
12148
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
    17
  $ echo a > a
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
    18
  $ echo b > b
19456
2345c9eb73c7 test-convert-hg-startrev: fix test for copy removal on missing parent
Mads Kiilerich <madski@unity3d.com>
parents: 16165
diff changeset
    19
  $ echo f > f
2345c9eb73c7 test-convert-hg-startrev: fix test for copy removal on missing parent
Mads Kiilerich <madski@unity3d.com>
parents: 16165
diff changeset
    20
  $ hg ci -d '0 0' -qAm '0: add a b f'
12148
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
    21
  $ echo c > c
19456
2345c9eb73c7 test-convert-hg-startrev: fix test for copy removal on missing parent
Mads Kiilerich <madski@unity3d.com>
parents: 16165
diff changeset
    22
  $ hg move f d
2345c9eb73c7 test-convert-hg-startrev: fix test for copy removal on missing parent
Mads Kiilerich <madski@unity3d.com>
parents: 16165
diff changeset
    23
  $ hg ci -d '1 0' -qAm '1: add c, move f to d'
12148
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
    24
  $ hg copy a e
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
    25
  $ echo b >> b
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
    26
  $ hg ci -d '2 0' -qAm '2: copy e from a, change b'
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
    27
  $ hg up -C 0
19456
2345c9eb73c7 test-convert-hg-startrev: fix test for copy removal on missing parent
Mads Kiilerich <madski@unity3d.com>
parents: 16165
diff changeset
    28
  2 files updated, 0 files merged, 3 files removed, 0 files unresolved
12148
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
    29
  $ echo a >> a
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
    30
  $ hg ci -d '3 0' -qAm '3: change a'
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
    31
  $ hg merge
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
    32
  merging a and e to e
19456
2345c9eb73c7 test-convert-hg-startrev: fix test for copy removal on missing parent
Mads Kiilerich <madski@unity3d.com>
parents: 16165
diff changeset
    33
  3 files updated, 1 files merged, 1 files removed, 0 files unresolved
12148
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
    34
  (branch merge, don't forget to commit)
19456
2345c9eb73c7 test-convert-hg-startrev: fix test for copy removal on missing parent
Mads Kiilerich <madski@unity3d.com>
parents: 16165
diff changeset
    35
  $ hg ci -d '4 0' -qAm '4: merge 2 and 3'
12148
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
    36
  $ echo a >> a
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
    37
  $ hg ci -d '5 0' -qAm '5: change a'
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
    38
  $ cd ..
6885
6e253aa04ff7 convert: implement startrev for hg source
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    39
12148
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
    40
Convert from null revision
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
    41
12950
2405b4a5964a revlog: fix descendants() if nullrev is in revs
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12350
diff changeset
    42
  $ hg convert --config convert.hg.startrev=null source full
2405b4a5964a revlog: fix descendants() if nullrev is in revs
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12350
diff changeset
    43
  initializing destination full repository
12148
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
    44
  scanning source...
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
    45
  sorting...
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
    46
  converting...
19456
2345c9eb73c7 test-convert-hg-startrev: fix test for copy removal on missing parent
Mads Kiilerich <madski@unity3d.com>
parents: 16165
diff changeset
    47
  5 0: add a b f
2345c9eb73c7 test-convert-hg-startrev: fix test for copy removal on missing parent
Mads Kiilerich <madski@unity3d.com>
parents: 16165
diff changeset
    48
  4 1: add c, move f to d
12950
2405b4a5964a revlog: fix descendants() if nullrev is in revs
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12350
diff changeset
    49
  3 2: copy e from a, change b
2405b4a5964a revlog: fix descendants() if nullrev is in revs
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12350
diff changeset
    50
  2 3: change a
19456
2345c9eb73c7 test-convert-hg-startrev: fix test for copy removal on missing parent
Mads Kiilerich <madski@unity3d.com>
parents: 16165
diff changeset
    51
  1 4: merge 2 and 3
12950
2405b4a5964a revlog: fix descendants() if nullrev is in revs
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12350
diff changeset
    52
  0 5: change a
12148
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
    53
12950
2405b4a5964a revlog: fix descendants() if nullrev is in revs
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12350
diff changeset
    54
  $ glog full
2405b4a5964a revlog: fix descendants() if nullrev is in revs
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12350
diff changeset
    55
  o  5 "5: change a" files: a
2405b4a5964a revlog: fix descendants() if nullrev is in revs
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12350
diff changeset
    56
  |
19456
2345c9eb73c7 test-convert-hg-startrev: fix test for copy removal on missing parent
Mads Kiilerich <madski@unity3d.com>
parents: 16165
diff changeset
    57
  o    4 "4: merge 2 and 3" files: e f
12950
2405b4a5964a revlog: fix descendants() if nullrev is in revs
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12350
diff changeset
    58
  |\
2405b4a5964a revlog: fix descendants() if nullrev is in revs
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12350
diff changeset
    59
  | o  3 "3: change a" files: a
2405b4a5964a revlog: fix descendants() if nullrev is in revs
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12350
diff changeset
    60
  | |
2405b4a5964a revlog: fix descendants() if nullrev is in revs
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12350
diff changeset
    61
  o |  2 "2: copy e from a, change b" files: b e
2405b4a5964a revlog: fix descendants() if nullrev is in revs
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12350
diff changeset
    62
  | |
19456
2345c9eb73c7 test-convert-hg-startrev: fix test for copy removal on missing parent
Mads Kiilerich <madski@unity3d.com>
parents: 16165
diff changeset
    63
  o |  1 "1: add c, move f to d" files: c d f
12950
2405b4a5964a revlog: fix descendants() if nullrev is in revs
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12350
diff changeset
    64
  |/
19456
2345c9eb73c7 test-convert-hg-startrev: fix test for copy removal on missing parent
Mads Kiilerich <madski@unity3d.com>
parents: 16165
diff changeset
    65
  o  0 "0: add a b f" files: a b f
12950
2405b4a5964a revlog: fix descendants() if nullrev is in revs
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12350
diff changeset
    66
  
2405b4a5964a revlog: fix descendants() if nullrev is in revs
Nicolas Dumazet <nicdumz.commits@gmail.com>
parents: 12350
diff changeset
    67
  $ rm -Rf full
12148
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
    68
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
    69
Convert from zero revision
6885
6e253aa04ff7 convert: implement startrev for hg source
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    70
12148
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
    71
  $ hg convert --config convert.hg.startrev=0 source full
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
    72
  initializing destination full repository
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
    73
  scanning source...
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
    74
  sorting...
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
    75
  converting...
19456
2345c9eb73c7 test-convert-hg-startrev: fix test for copy removal on missing parent
Mads Kiilerich <madski@unity3d.com>
parents: 16165
diff changeset
    76
  5 0: add a b f
2345c9eb73c7 test-convert-hg-startrev: fix test for copy removal on missing parent
Mads Kiilerich <madski@unity3d.com>
parents: 16165
diff changeset
    77
  4 1: add c, move f to d
12148
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
    78
  3 2: copy e from a, change b
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
    79
  2 3: change a
19456
2345c9eb73c7 test-convert-hg-startrev: fix test for copy removal on missing parent
Mads Kiilerich <madski@unity3d.com>
parents: 16165
diff changeset
    80
  1 4: merge 2 and 3
12148
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
    81
  0 5: change a
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
    82
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
    83
  $ glog full
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
    84
  o  5 "5: change a" files: a
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
    85
  |
19456
2345c9eb73c7 test-convert-hg-startrev: fix test for copy removal on missing parent
Mads Kiilerich <madski@unity3d.com>
parents: 16165
diff changeset
    86
  o    4 "4: merge 2 and 3" files: e f
12148
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
    87
  |\
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
    88
  | o  3 "3: change a" files: a
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
    89
  | |
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
    90
  o |  2 "2: copy e from a, change b" files: b e
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
    91
  | |
19456
2345c9eb73c7 test-convert-hg-startrev: fix test for copy removal on missing parent
Mads Kiilerich <madski@unity3d.com>
parents: 16165
diff changeset
    92
  o |  1 "1: add c, move f to d" files: c d f
12148
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
    93
  |/
19456
2345c9eb73c7 test-convert-hg-startrev: fix test for copy removal on missing parent
Mads Kiilerich <madski@unity3d.com>
parents: 16165
diff changeset
    94
  o  0 "0: add a b f" files: a b f
12148
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
    95
  
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
    96
Convert from merge parent
6885
6e253aa04ff7 convert: implement startrev for hg source
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
    97
12148
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
    98
  $ hg convert --config convert.hg.startrev=1 source conv1
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
    99
  initializing destination conv1 repository
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
   100
  scanning source...
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
   101
  sorting...
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
   102
  converting...
19456
2345c9eb73c7 test-convert-hg-startrev: fix test for copy removal on missing parent
Mads Kiilerich <madski@unity3d.com>
parents: 16165
diff changeset
   103
  3 1: add c, move f to d
12148
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
   104
  2 2: copy e from a, change b
19456
2345c9eb73c7 test-convert-hg-startrev: fix test for copy removal on missing parent
Mads Kiilerich <madski@unity3d.com>
parents: 16165
diff changeset
   105
  1 4: merge 2 and 3
12148
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
   106
  0 5: change a
6885
6e253aa04ff7 convert: implement startrev for hg source
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
   107
12148
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
   108
  $ glog conv1
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
   109
  o  3 "5: change a" files: a
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
   110
  |
19456
2345c9eb73c7 test-convert-hg-startrev: fix test for copy removal on missing parent
Mads Kiilerich <madski@unity3d.com>
parents: 16165
diff changeset
   111
  o  2 "4: merge 2 and 3" files: a e
12148
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
   112
  |
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
   113
  o  1 "2: copy e from a, change b" files: b e
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
   114
  |
19456
2345c9eb73c7 test-convert-hg-startrev: fix test for copy removal on missing parent
Mads Kiilerich <madski@unity3d.com>
parents: 16165
diff changeset
   115
  o  0 "1: add c, move f to d" files: a b c d
12148
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
   116
  
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
   117
  $ cd conv1
16165
60101427d618 log: fix --follow FILE ancestry calculation
Patrick Mezard <patrick@mezard.eu>
parents: 13519
diff changeset
   118
  $ hg up -q
12148
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
   119
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
   120
Check copy preservation
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
   121
19457
948df0f10ec1 convert: fix bad conversion of copies when hg.startrev is specified
Mads Kiilerich <madski@unity3d.com>
parents: 19456
diff changeset
   122
  $ hg st -C --change 2 e
948df0f10ec1 convert: fix bad conversion of copies when hg.startrev is specified
Mads Kiilerich <madski@unity3d.com>
parents: 19456
diff changeset
   123
  M e
948df0f10ec1 convert: fix bad conversion of copies when hg.startrev is specified
Mads Kiilerich <madski@unity3d.com>
parents: 19456
diff changeset
   124
  $ hg st -C --change 1 e
948df0f10ec1 convert: fix bad conversion of copies when hg.startrev is specified
Mads Kiilerich <madski@unity3d.com>
parents: 19456
diff changeset
   125
  A e
948df0f10ec1 convert: fix bad conversion of copies when hg.startrev is specified
Mads Kiilerich <madski@unity3d.com>
parents: 19456
diff changeset
   126
    a
948df0f10ec1 convert: fix bad conversion of copies when hg.startrev is specified
Mads Kiilerich <madski@unity3d.com>
parents: 19456
diff changeset
   127
  $ hg st -C --change 0 a
948df0f10ec1 convert: fix bad conversion of copies when hg.startrev is specified
Mads Kiilerich <madski@unity3d.com>
parents: 19456
diff changeset
   128
  A a
948df0f10ec1 convert: fix bad conversion of copies when hg.startrev is specified
Mads Kiilerich <madski@unity3d.com>
parents: 19456
diff changeset
   129
948df0f10ec1 convert: fix bad conversion of copies when hg.startrev is specified
Mads Kiilerich <madski@unity3d.com>
parents: 19456
diff changeset
   130
(It seems like a bug in log that the following doesn't show rev 1.)
948df0f10ec1 convert: fix bad conversion of copies when hg.startrev is specified
Mads Kiilerich <madski@unity3d.com>
parents: 19456
diff changeset
   131
12148
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
   132
  $ hg log --follow --copies e
19457
948df0f10ec1 convert: fix bad conversion of copies when hg.startrev is specified
Mads Kiilerich <madski@unity3d.com>
parents: 19456
diff changeset
   133
  changeset:   2:82bbac3d2cf4
12148
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
   134
  user:        test
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
   135
  date:        Thu Jan 01 00:00:04 1970 +0000
19456
2345c9eb73c7 test-convert-hg-startrev: fix test for copy removal on missing parent
Mads Kiilerich <madski@unity3d.com>
parents: 16165
diff changeset
   136
  summary:     4: merge 2 and 3
12148
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
   137
  
19457
948df0f10ec1 convert: fix bad conversion of copies when hg.startrev is specified
Mads Kiilerich <madski@unity3d.com>
parents: 19456
diff changeset
   138
  changeset:   0:23c3be426dce
12148
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
   139
  user:        test
19457
948df0f10ec1 convert: fix bad conversion of copies when hg.startrev is specified
Mads Kiilerich <madski@unity3d.com>
parents: 19456
diff changeset
   140
  date:        Thu Jan 01 00:00:01 1970 +0000
948df0f10ec1 convert: fix bad conversion of copies when hg.startrev is specified
Mads Kiilerich <madski@unity3d.com>
parents: 19456
diff changeset
   141
  summary:     1: add c, move f to d
12148
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
   142
  
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
   143
Check copy removal on missing parent
6885
6e253aa04ff7 convert: implement startrev for hg source
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
   144
12148
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
   145
  $ hg log --follow --copies d
19456
2345c9eb73c7 test-convert-hg-startrev: fix test for copy removal on missing parent
Mads Kiilerich <madski@unity3d.com>
parents: 16165
diff changeset
   146
  changeset:   0:23c3be426dce
12148
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
   147
  user:        test
19456
2345c9eb73c7 test-convert-hg-startrev: fix test for copy removal on missing parent
Mads Kiilerich <madski@unity3d.com>
parents: 16165
diff changeset
   148
  date:        Thu Jan 01 00:00:01 1970 +0000
2345c9eb73c7 test-convert-hg-startrev: fix test for copy removal on missing parent
Mads Kiilerich <madski@unity3d.com>
parents: 16165
diff changeset
   149
  summary:     1: add c, move f to d
12148
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
   150
  
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
   151
  $ hg cat -r tip a b
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
   152
  a
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
   153
  a
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
   154
  a
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
   155
  b
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
   156
  b
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
   157
  $ hg -q verify
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
   158
  $ cd ..
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
   159
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
   160
Convert from merge
6885
6e253aa04ff7 convert: implement startrev for hg source
Patrick Mezard <pmezard@gmail.com>
parents:
diff changeset
   161
12148
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
   162
  $ hg convert --config convert.hg.startrev=4 source conv4
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
   163
  initializing destination conv4 repository
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
   164
  scanning source...
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
   165
  sorting...
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
   166
  converting...
19456
2345c9eb73c7 test-convert-hg-startrev: fix test for copy removal on missing parent
Mads Kiilerich <madski@unity3d.com>
parents: 16165
diff changeset
   167
  1 4: merge 2 and 3
12148
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
   168
  0 5: change a
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
   169
  $ glog conv4
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
   170
  o  1 "5: change a" files: a
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
   171
  |
19456
2345c9eb73c7 test-convert-hg-startrev: fix test for copy removal on missing parent
Mads Kiilerich <madski@unity3d.com>
parents: 16165
diff changeset
   172
  o  0 "4: merge 2 and 3" files: a b c d e
12148
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
   173
  
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
   174
  $ cd conv4
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
   175
  $ hg up -C
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
   176
  5 files updated, 0 files merged, 0 files removed, 0 files unresolved
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
   177
  $ hg cat -r tip a b
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
   178
  a
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
   179
  a
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
   180
  a
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
   181
  b
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
   182
  b
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
   183
  $ hg -q verify
0a0592f8e11a tests: unify test-convert-hg-startrev.
Dan Villiom Podlaski Christiansen <danchr@gmail.com>
parents: 10119
diff changeset
   184
  $ cd ..
19891
e271970b9821 convert: introduce hg.revs to replace hg.startrev and --rev with a revset
Mads Kiilerich <madski@unity3d.com>
parents: 19457
diff changeset
   185
e271970b9821 convert: introduce hg.revs to replace hg.startrev and --rev with a revset
Mads Kiilerich <madski@unity3d.com>
parents: 19457
diff changeset
   186
Convert from revset in convert.hg.revs
e271970b9821 convert: introduce hg.revs to replace hg.startrev and --rev with a revset
Mads Kiilerich <madski@unity3d.com>
parents: 19457
diff changeset
   187
e271970b9821 convert: introduce hg.revs to replace hg.startrev and --rev with a revset
Mads Kiilerich <madski@unity3d.com>
parents: 19457
diff changeset
   188
  $ hg convert --config convert.hg.revs='3:4+0' source revsetrepo
e271970b9821 convert: introduce hg.revs to replace hg.startrev and --rev with a revset
Mads Kiilerich <madski@unity3d.com>
parents: 19457
diff changeset
   189
  initializing destination revsetrepo repository
e271970b9821 convert: introduce hg.revs to replace hg.startrev and --rev with a revset
Mads Kiilerich <madski@unity3d.com>
parents: 19457
diff changeset
   190
  scanning source...
e271970b9821 convert: introduce hg.revs to replace hg.startrev and --rev with a revset
Mads Kiilerich <madski@unity3d.com>
parents: 19457
diff changeset
   191
  sorting...
e271970b9821 convert: introduce hg.revs to replace hg.startrev and --rev with a revset
Mads Kiilerich <madski@unity3d.com>
parents: 19457
diff changeset
   192
  converting...
e271970b9821 convert: introduce hg.revs to replace hg.startrev and --rev with a revset
Mads Kiilerich <madski@unity3d.com>
parents: 19457
diff changeset
   193
  2 0: add a b f
e271970b9821 convert: introduce hg.revs to replace hg.startrev and --rev with a revset
Mads Kiilerich <madski@unity3d.com>
parents: 19457
diff changeset
   194
  1 3: change a
e271970b9821 convert: introduce hg.revs to replace hg.startrev and --rev with a revset
Mads Kiilerich <madski@unity3d.com>
parents: 19457
diff changeset
   195
  0 4: merge 2 and 3
e271970b9821 convert: introduce hg.revs to replace hg.startrev and --rev with a revset
Mads Kiilerich <madski@unity3d.com>
parents: 19457
diff changeset
   196
e271970b9821 convert: introduce hg.revs to replace hg.startrev and --rev with a revset
Mads Kiilerich <madski@unity3d.com>
parents: 19457
diff changeset
   197
  $ glog revsetrepo
e271970b9821 convert: introduce hg.revs to replace hg.startrev and --rev with a revset
Mads Kiilerich <madski@unity3d.com>
parents: 19457
diff changeset
   198
  o  2 "4: merge 2 and 3" files: b c d e f
e271970b9821 convert: introduce hg.revs to replace hg.startrev and --rev with a revset
Mads Kiilerich <madski@unity3d.com>
parents: 19457
diff changeset
   199
  |
e271970b9821 convert: introduce hg.revs to replace hg.startrev and --rev with a revset
Mads Kiilerich <madski@unity3d.com>
parents: 19457
diff changeset
   200
  o  1 "3: change a" files: a
e271970b9821 convert: introduce hg.revs to replace hg.startrev and --rev with a revset
Mads Kiilerich <madski@unity3d.com>
parents: 19457
diff changeset
   201
  |
e271970b9821 convert: introduce hg.revs to replace hg.startrev and --rev with a revset
Mads Kiilerich <madski@unity3d.com>
parents: 19457
diff changeset
   202
  o  0 "0: add a b f" files: a b f
e271970b9821 convert: introduce hg.revs to replace hg.startrev and --rev with a revset
Mads Kiilerich <madski@unity3d.com>
parents: 19457
diff changeset
   203
  
26154
242853e14804 convert: remove restriction on multiple --rev in hg source
Durham Goode <durham@fb.com>
parents: 20117
diff changeset
   204
Convert from specified revs
242853e14804 convert: remove restriction on multiple --rev in hg source
Durham Goode <durham@fb.com>
parents: 20117
diff changeset
   205
242853e14804 convert: remove restriction on multiple --rev in hg source
Durham Goode <durham@fb.com>
parents: 20117
diff changeset
   206
  $ hg convert --rev 3 --rev 2 source multiplerevs
242853e14804 convert: remove restriction on multiple --rev in hg source
Durham Goode <durham@fb.com>
parents: 20117
diff changeset
   207
  initializing destination multiplerevs repository
242853e14804 convert: remove restriction on multiple --rev in hg source
Durham Goode <durham@fb.com>
parents: 20117
diff changeset
   208
  scanning source...
242853e14804 convert: remove restriction on multiple --rev in hg source
Durham Goode <durham@fb.com>
parents: 20117
diff changeset
   209
  sorting...
242853e14804 convert: remove restriction on multiple --rev in hg source
Durham Goode <durham@fb.com>
parents: 20117
diff changeset
   210
  converting...
242853e14804 convert: remove restriction on multiple --rev in hg source
Durham Goode <durham@fb.com>
parents: 20117
diff changeset
   211
  3 0: add a b f
242853e14804 convert: remove restriction on multiple --rev in hg source
Durham Goode <durham@fb.com>
parents: 20117
diff changeset
   212
  2 1: add c, move f to d
242853e14804 convert: remove restriction on multiple --rev in hg source
Durham Goode <durham@fb.com>
parents: 20117
diff changeset
   213
  1 2: copy e from a, change b
242853e14804 convert: remove restriction on multiple --rev in hg source
Durham Goode <durham@fb.com>
parents: 20117
diff changeset
   214
  0 3: change a
242853e14804 convert: remove restriction on multiple --rev in hg source
Durham Goode <durham@fb.com>
parents: 20117
diff changeset
   215
  $ glog multiplerevs
242853e14804 convert: remove restriction on multiple --rev in hg source
Durham Goode <durham@fb.com>
parents: 20117
diff changeset
   216
  o  3 "3: change a" files: a
242853e14804 convert: remove restriction on multiple --rev in hg source
Durham Goode <durham@fb.com>
parents: 20117
diff changeset
   217
  |
242853e14804 convert: remove restriction on multiple --rev in hg source
Durham Goode <durham@fb.com>
parents: 20117
diff changeset
   218
  | o  2 "2: copy e from a, change b" files: b e
242853e14804 convert: remove restriction on multiple --rev in hg source
Durham Goode <durham@fb.com>
parents: 20117
diff changeset
   219
  | |
242853e14804 convert: remove restriction on multiple --rev in hg source
Durham Goode <durham@fb.com>
parents: 20117
diff changeset
   220
  | o  1 "1: add c, move f to d" files: c d f
242853e14804 convert: remove restriction on multiple --rev in hg source
Durham Goode <durham@fb.com>
parents: 20117
diff changeset
   221
  |/
242853e14804 convert: remove restriction on multiple --rev in hg source
Durham Goode <durham@fb.com>
parents: 20117
diff changeset
   222
  o  0 "0: add a b f" files: a b f
242853e14804 convert: remove restriction on multiple --rev in hg source
Durham Goode <durham@fb.com>
parents: 20117
diff changeset
   223
  
28899
8c94594adbef tests: coverage of ancestry with convert in multiple non-overlapping steps
Mads Kiilerich <madski@unity3d.com>
parents: 26154
diff changeset
   224
Convert in multiple steps that doesn't overlap - the link to the parent is
28900
b65966f50058 convert: keep converted hg parents that are outside convert.hg.revs (BC)
Mads Kiilerich <madski@unity3d.com>
parents: 28899
diff changeset
   225
preserved anyway
28899
8c94594adbef tests: coverage of ancestry with convert in multiple non-overlapping steps
Mads Kiilerich <madski@unity3d.com>
parents: 26154
diff changeset
   226
8c94594adbef tests: coverage of ancestry with convert in multiple non-overlapping steps
Mads Kiilerich <madski@unity3d.com>
parents: 26154
diff changeset
   227
  $ hg convert --config convert.hg.revs=::1 source multistep
8c94594adbef tests: coverage of ancestry with convert in multiple non-overlapping steps
Mads Kiilerich <madski@unity3d.com>
parents: 26154
diff changeset
   228
  initializing destination multistep repository
8c94594adbef tests: coverage of ancestry with convert in multiple non-overlapping steps
Mads Kiilerich <madski@unity3d.com>
parents: 26154
diff changeset
   229
  scanning source...
8c94594adbef tests: coverage of ancestry with convert in multiple non-overlapping steps
Mads Kiilerich <madski@unity3d.com>
parents: 26154
diff changeset
   230
  sorting...
8c94594adbef tests: coverage of ancestry with convert in multiple non-overlapping steps
Mads Kiilerich <madski@unity3d.com>
parents: 26154
diff changeset
   231
  converting...
8c94594adbef tests: coverage of ancestry with convert in multiple non-overlapping steps
Mads Kiilerich <madski@unity3d.com>
parents: 26154
diff changeset
   232
  1 0: add a b f
8c94594adbef tests: coverage of ancestry with convert in multiple non-overlapping steps
Mads Kiilerich <madski@unity3d.com>
parents: 26154
diff changeset
   233
  0 1: add c, move f to d
8c94594adbef tests: coverage of ancestry with convert in multiple non-overlapping steps
Mads Kiilerich <madski@unity3d.com>
parents: 26154
diff changeset
   234
  $ hg convert --config convert.hg.revs=2 source multistep
8c94594adbef tests: coverage of ancestry with convert in multiple non-overlapping steps
Mads Kiilerich <madski@unity3d.com>
parents: 26154
diff changeset
   235
  scanning source...
8c94594adbef tests: coverage of ancestry with convert in multiple non-overlapping steps
Mads Kiilerich <madski@unity3d.com>
parents: 26154
diff changeset
   236
  sorting...
8c94594adbef tests: coverage of ancestry with convert in multiple non-overlapping steps
Mads Kiilerich <madski@unity3d.com>
parents: 26154
diff changeset
   237
  converting...
8c94594adbef tests: coverage of ancestry with convert in multiple non-overlapping steps
Mads Kiilerich <madski@unity3d.com>
parents: 26154
diff changeset
   238
  0 2: copy e from a, change b
8c94594adbef tests: coverage of ancestry with convert in multiple non-overlapping steps
Mads Kiilerich <madski@unity3d.com>
parents: 26154
diff changeset
   239
  $ glog multistep
28900
b65966f50058 convert: keep converted hg parents that are outside convert.hg.revs (BC)
Mads Kiilerich <madski@unity3d.com>
parents: 28899
diff changeset
   240
  o  2 "2: copy e from a, change b" files: b e
b65966f50058 convert: keep converted hg parents that are outside convert.hg.revs (BC)
Mads Kiilerich <madski@unity3d.com>
parents: 28899
diff changeset
   241
  |
28899
8c94594adbef tests: coverage of ancestry with convert in multiple non-overlapping steps
Mads Kiilerich <madski@unity3d.com>
parents: 26154
diff changeset
   242
  o  1 "1: add c, move f to d" files: c d f
8c94594adbef tests: coverage of ancestry with convert in multiple non-overlapping steps
Mads Kiilerich <madski@unity3d.com>
parents: 26154
diff changeset
   243
  |
8c94594adbef tests: coverage of ancestry with convert in multiple non-overlapping steps
Mads Kiilerich <madski@unity3d.com>
parents: 26154
diff changeset
   244
  o  0 "0: add a b f" files: a b f
8c94594adbef tests: coverage of ancestry with convert in multiple non-overlapping steps
Mads Kiilerich <madski@unity3d.com>
parents: 26154
diff changeset
   245