tests/test-convert-hg-sink.t
author Pierre-Yves David <pierre-yves.david@octobus.net>
Fri, 01 Oct 2021 23:13:44 +0200
changeset 48140 a8ff00ad290b
parent 42361 c0e1ea0c4cee
permissions -rw-r--r--
dirstatemap: add a common `_insert_entry` method for dirstatemap This method is called to add a new DirstateItem to the map. Each variant have a different implementation (which is … the point). Differential Revision: https://phab.mercurial-scm.org/D11573
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
5278
70e9a527cc61 convert: avoid dirstate checks; add a test
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
     1
12525
81bf25ddd76a tests: unify test-convert-hg-sink
Matt Mackall <mpm@selenic.com>
parents: 8693
diff changeset
     2
  $ cat >> $HGRCPATH <<EOF
81bf25ddd76a tests: unify test-convert-hg-sink
Matt Mackall <mpm@selenic.com>
parents: 8693
diff changeset
     3
  > [extensions]
81bf25ddd76a tests: unify test-convert-hg-sink
Matt Mackall <mpm@selenic.com>
parents: 8693
diff changeset
     4
  > convert=
81bf25ddd76a tests: unify test-convert-hg-sink
Matt Mackall <mpm@selenic.com>
parents: 8693
diff changeset
     5
  > [convert]
81bf25ddd76a tests: unify test-convert-hg-sink
Matt Mackall <mpm@selenic.com>
parents: 8693
diff changeset
     6
  > hg.saverev=False
81bf25ddd76a tests: unify test-convert-hg-sink
Matt Mackall <mpm@selenic.com>
parents: 8693
diff changeset
     7
  > EOF
81bf25ddd76a tests: unify test-convert-hg-sink
Matt Mackall <mpm@selenic.com>
parents: 8693
diff changeset
     8
  $ hg init orig
81bf25ddd76a tests: unify test-convert-hg-sink
Matt Mackall <mpm@selenic.com>
parents: 8693
diff changeset
     9
  $ cd orig
81bf25ddd76a tests: unify test-convert-hg-sink
Matt Mackall <mpm@selenic.com>
parents: 8693
diff changeset
    10
  $ echo foo > foo
81bf25ddd76a tests: unify test-convert-hg-sink
Matt Mackall <mpm@selenic.com>
parents: 8693
diff changeset
    11
  $ echo bar > bar
81bf25ddd76a tests: unify test-convert-hg-sink
Matt Mackall <mpm@selenic.com>
parents: 8693
diff changeset
    12
  $ hg ci -qAm 'add foo and bar'
81bf25ddd76a tests: unify test-convert-hg-sink
Matt Mackall <mpm@selenic.com>
parents: 8693
diff changeset
    13
  $ hg rm foo
81bf25ddd76a tests: unify test-convert-hg-sink
Matt Mackall <mpm@selenic.com>
parents: 8693
diff changeset
    14
  $ hg ci -m 'remove foo'
81bf25ddd76a tests: unify test-convert-hg-sink
Matt Mackall <mpm@selenic.com>
parents: 8693
diff changeset
    15
  $ mkdir foo
81bf25ddd76a tests: unify test-convert-hg-sink
Matt Mackall <mpm@selenic.com>
parents: 8693
diff changeset
    16
  $ echo file > foo/file
81bf25ddd76a tests: unify test-convert-hg-sink
Matt Mackall <mpm@selenic.com>
parents: 8693
diff changeset
    17
  $ hg ci -qAm 'add foo/file'
81bf25ddd76a tests: unify test-convert-hg-sink
Matt Mackall <mpm@selenic.com>
parents: 8693
diff changeset
    18
  $ hg tag some-tag
21498
6b8daeea638a convert: mercurial source: convert global tags only - not local tags
Mads Kiilerich <madski@unity3d.com>
parents: 20372
diff changeset
    19
  $ hg tag -l local-tag
38769
7e023ce26c7f convert: don't drop missing or corrupt tag entries
Matt Harbison <matt_harbison@yahoo.com>
parents: 32066
diff changeset
    20
  $ echo '1234567890123456789012345678901234567890 missing_tag' >> .hgtags
7e023ce26c7f convert: don't drop missing or corrupt tag entries
Matt Harbison <matt_harbison@yahoo.com>
parents: 32066
diff changeset
    21
  $ hg ci -m 'add a missing tag'
12525
81bf25ddd76a tests: unify test-convert-hg-sink
Matt Mackall <mpm@selenic.com>
parents: 8693
diff changeset
    22
  $ hg log
38769
7e023ce26c7f convert: don't drop missing or corrupt tag entries
Matt Harbison <matt_harbison@yahoo.com>
parents: 32066
diff changeset
    23
  changeset:   4:3fb95ee23a66
7e023ce26c7f convert: don't drop missing or corrupt tag entries
Matt Harbison <matt_harbison@yahoo.com>
parents: 32066
diff changeset
    24
  tag:         tip
7e023ce26c7f convert: don't drop missing or corrupt tag entries
Matt Harbison <matt_harbison@yahoo.com>
parents: 32066
diff changeset
    25
  user:        test
7e023ce26c7f convert: don't drop missing or corrupt tag entries
Matt Harbison <matt_harbison@yahoo.com>
parents: 32066
diff changeset
    26
  date:        Thu Jan 01 00:00:00 1970 +0000
7e023ce26c7f convert: don't drop missing or corrupt tag entries
Matt Harbison <matt_harbison@yahoo.com>
parents: 32066
diff changeset
    27
  summary:     add a missing tag
7e023ce26c7f convert: don't drop missing or corrupt tag entries
Matt Harbison <matt_harbison@yahoo.com>
parents: 32066
diff changeset
    28
  
12525
81bf25ddd76a tests: unify test-convert-hg-sink
Matt Mackall <mpm@selenic.com>
parents: 8693
diff changeset
    29
  changeset:   3:593cbf6fb2b4
21498
6b8daeea638a convert: mercurial source: convert global tags only - not local tags
Mads Kiilerich <madski@unity3d.com>
parents: 20372
diff changeset
    30
  tag:         local-tag
12525
81bf25ddd76a tests: unify test-convert-hg-sink
Matt Mackall <mpm@selenic.com>
parents: 8693
diff changeset
    31
  user:        test
81bf25ddd76a tests: unify test-convert-hg-sink
Matt Mackall <mpm@selenic.com>
parents: 8693
diff changeset
    32
  date:        Thu Jan 01 00:00:00 1970 +0000
81bf25ddd76a tests: unify test-convert-hg-sink
Matt Mackall <mpm@selenic.com>
parents: 8693
diff changeset
    33
  summary:     Added tag some-tag for changeset ad681a868e44
81bf25ddd76a tests: unify test-convert-hg-sink
Matt Mackall <mpm@selenic.com>
parents: 8693
diff changeset
    34
  
81bf25ddd76a tests: unify test-convert-hg-sink
Matt Mackall <mpm@selenic.com>
parents: 8693
diff changeset
    35
  changeset:   2:ad681a868e44
81bf25ddd76a tests: unify test-convert-hg-sink
Matt Mackall <mpm@selenic.com>
parents: 8693
diff changeset
    36
  tag:         some-tag
81bf25ddd76a tests: unify test-convert-hg-sink
Matt Mackall <mpm@selenic.com>
parents: 8693
diff changeset
    37
  user:        test
81bf25ddd76a tests: unify test-convert-hg-sink
Matt Mackall <mpm@selenic.com>
parents: 8693
diff changeset
    38
  date:        Thu Jan 01 00:00:00 1970 +0000
81bf25ddd76a tests: unify test-convert-hg-sink
Matt Mackall <mpm@selenic.com>
parents: 8693
diff changeset
    39
  summary:     add foo/file
81bf25ddd76a tests: unify test-convert-hg-sink
Matt Mackall <mpm@selenic.com>
parents: 8693
diff changeset
    40
  
81bf25ddd76a tests: unify test-convert-hg-sink
Matt Mackall <mpm@selenic.com>
parents: 8693
diff changeset
    41
  changeset:   1:cbba8ecc03b7
81bf25ddd76a tests: unify test-convert-hg-sink
Matt Mackall <mpm@selenic.com>
parents: 8693
diff changeset
    42
  user:        test
81bf25ddd76a tests: unify test-convert-hg-sink
Matt Mackall <mpm@selenic.com>
parents: 8693
diff changeset
    43
  date:        Thu Jan 01 00:00:00 1970 +0000
81bf25ddd76a tests: unify test-convert-hg-sink
Matt Mackall <mpm@selenic.com>
parents: 8693
diff changeset
    44
  summary:     remove foo
81bf25ddd76a tests: unify test-convert-hg-sink
Matt Mackall <mpm@selenic.com>
parents: 8693
diff changeset
    45
  
81bf25ddd76a tests: unify test-convert-hg-sink
Matt Mackall <mpm@selenic.com>
parents: 8693
diff changeset
    46
  changeset:   0:327daa9251fa
81bf25ddd76a tests: unify test-convert-hg-sink
Matt Mackall <mpm@selenic.com>
parents: 8693
diff changeset
    47
  user:        test
81bf25ddd76a tests: unify test-convert-hg-sink
Matt Mackall <mpm@selenic.com>
parents: 8693
diff changeset
    48
  date:        Thu Jan 01 00:00:00 1970 +0000
81bf25ddd76a tests: unify test-convert-hg-sink
Matt Mackall <mpm@selenic.com>
parents: 8693
diff changeset
    49
  summary:     add foo and bar
81bf25ddd76a tests: unify test-convert-hg-sink
Matt Mackall <mpm@selenic.com>
parents: 8693
diff changeset
    50
  
25571
1abfe639a70c convert: apply the appropriate phases to the destination (issue4165)
Matt Harbison <matt_harbison@yahoo.com>
parents: 22300
diff changeset
    51
  $ hg phase --public -r tip
12525
81bf25ddd76a tests: unify test-convert-hg-sink
Matt Mackall <mpm@selenic.com>
parents: 8693
diff changeset
    52
  $ cd ..
81bf25ddd76a tests: unify test-convert-hg-sink
Matt Mackall <mpm@selenic.com>
parents: 8693
diff changeset
    53
  $ hg convert orig new 2>&1 | grep -v 'subversion python bindings could not be loaded'
81bf25ddd76a tests: unify test-convert-hg-sink
Matt Mackall <mpm@selenic.com>
parents: 8693
diff changeset
    54
  initializing destination new repository
81bf25ddd76a tests: unify test-convert-hg-sink
Matt Mackall <mpm@selenic.com>
parents: 8693
diff changeset
    55
  scanning source...
81bf25ddd76a tests: unify test-convert-hg-sink
Matt Mackall <mpm@selenic.com>
parents: 8693
diff changeset
    56
  sorting...
81bf25ddd76a tests: unify test-convert-hg-sink
Matt Mackall <mpm@selenic.com>
parents: 8693
diff changeset
    57
  converting...
38769
7e023ce26c7f convert: don't drop missing or corrupt tag entries
Matt Harbison <matt_harbison@yahoo.com>
parents: 32066
diff changeset
    58
  4 add foo and bar
7e023ce26c7f convert: don't drop missing or corrupt tag entries
Matt Harbison <matt_harbison@yahoo.com>
parents: 32066
diff changeset
    59
  3 remove foo
7e023ce26c7f convert: don't drop missing or corrupt tag entries
Matt Harbison <matt_harbison@yahoo.com>
parents: 32066
diff changeset
    60
  2 add foo/file
7e023ce26c7f convert: don't drop missing or corrupt tag entries
Matt Harbison <matt_harbison@yahoo.com>
parents: 32066
diff changeset
    61
  1 Added tag some-tag for changeset ad681a868e44
7e023ce26c7f convert: don't drop missing or corrupt tag entries
Matt Harbison <matt_harbison@yahoo.com>
parents: 32066
diff changeset
    62
  0 add a missing tag
7e023ce26c7f convert: don't drop missing or corrupt tag entries
Matt Harbison <matt_harbison@yahoo.com>
parents: 32066
diff changeset
    63
  missing tag entry: "1234567890123456789012345678901234567890 missing_tag"
12525
81bf25ddd76a tests: unify test-convert-hg-sink
Matt Mackall <mpm@selenic.com>
parents: 8693
diff changeset
    64
  $ cd new
25571
1abfe639a70c convert: apply the appropriate phases to the destination (issue4165)
Matt Harbison <matt_harbison@yahoo.com>
parents: 22300
diff changeset
    65
  $ hg log -G --template '{rev} {node|short} ({phase}) "{desc}"\n'
38769
7e023ce26c7f convert: don't drop missing or corrupt tag entries
Matt Harbison <matt_harbison@yahoo.com>
parents: 32066
diff changeset
    66
  o  4 3fb95ee23a66 (public) "add a missing tag"
7e023ce26c7f convert: don't drop missing or corrupt tag entries
Matt Harbison <matt_harbison@yahoo.com>
parents: 32066
diff changeset
    67
  |
25571
1abfe639a70c convert: apply the appropriate phases to the destination (issue4165)
Matt Harbison <matt_harbison@yahoo.com>
parents: 22300
diff changeset
    68
  o  3 593cbf6fb2b4 (public) "Added tag some-tag for changeset ad681a868e44"
1abfe639a70c convert: apply the appropriate phases to the destination (issue4165)
Matt Harbison <matt_harbison@yahoo.com>
parents: 22300
diff changeset
    69
  |
1abfe639a70c convert: apply the appropriate phases to the destination (issue4165)
Matt Harbison <matt_harbison@yahoo.com>
parents: 22300
diff changeset
    70
  o  2 ad681a868e44 (public) "add foo/file"
1abfe639a70c convert: apply the appropriate phases to the destination (issue4165)
Matt Harbison <matt_harbison@yahoo.com>
parents: 22300
diff changeset
    71
  |
1abfe639a70c convert: apply the appropriate phases to the destination (issue4165)
Matt Harbison <matt_harbison@yahoo.com>
parents: 22300
diff changeset
    72
  o  1 cbba8ecc03b7 (public) "remove foo"
1abfe639a70c convert: apply the appropriate phases to the destination (issue4165)
Matt Harbison <matt_harbison@yahoo.com>
parents: 22300
diff changeset
    73
  |
1abfe639a70c convert: apply the appropriate phases to the destination (issue4165)
Matt Harbison <matt_harbison@yahoo.com>
parents: 22300
diff changeset
    74
  o  0 327daa9251fa (public) "add foo and bar"
1abfe639a70c convert: apply the appropriate phases to the destination (issue4165)
Matt Harbison <matt_harbison@yahoo.com>
parents: 22300
diff changeset
    75
  
1abfe639a70c convert: apply the appropriate phases to the destination (issue4165)
Matt Harbison <matt_harbison@yahoo.com>
parents: 22300
diff changeset
    76
12525
81bf25ddd76a tests: unify test-convert-hg-sink
Matt Mackall <mpm@selenic.com>
parents: 8693
diff changeset
    77
  $ hg out ../orig
81bf25ddd76a tests: unify test-convert-hg-sink
Matt Mackall <mpm@selenic.com>
parents: 8693
diff changeset
    78
  comparing with ../orig
81bf25ddd76a tests: unify test-convert-hg-sink
Matt Mackall <mpm@selenic.com>
parents: 8693
diff changeset
    79
  searching for changes
81bf25ddd76a tests: unify test-convert-hg-sink
Matt Mackall <mpm@selenic.com>
parents: 8693
diff changeset
    80
  no changes found
81bf25ddd76a tests: unify test-convert-hg-sink
Matt Mackall <mpm@selenic.com>
parents: 8693
diff changeset
    81
  [1]
5278
70e9a527cc61 convert: avoid dirstate checks; add a test
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents:
diff changeset
    82
12525
81bf25ddd76a tests: unify test-convert-hg-sink
Matt Mackall <mpm@selenic.com>
parents: 8693
diff changeset
    83
dirstate should be empty:
5279
2dbd750b3ddd convert: clear the dirstate before a conversion, invalidate it afterwards
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 5278
diff changeset
    84
12525
81bf25ddd76a tests: unify test-convert-hg-sink
Matt Mackall <mpm@selenic.com>
parents: 8693
diff changeset
    85
  $ hg debugstate
81bf25ddd76a tests: unify test-convert-hg-sink
Matt Mackall <mpm@selenic.com>
parents: 8693
diff changeset
    86
  $ hg parents -q
81bf25ddd76a tests: unify test-convert-hg-sink
Matt Mackall <mpm@selenic.com>
parents: 8693
diff changeset
    87
  $ hg up -C
81bf25ddd76a tests: unify test-convert-hg-sink
Matt Mackall <mpm@selenic.com>
parents: 8693
diff changeset
    88
  3 files updated, 0 files merged, 0 files removed, 0 files unresolved
81bf25ddd76a tests: unify test-convert-hg-sink
Matt Mackall <mpm@selenic.com>
parents: 8693
diff changeset
    89
  $ hg copy bar baz
81bf25ddd76a tests: unify test-convert-hg-sink
Matt Mackall <mpm@selenic.com>
parents: 8693
diff changeset
    90
81bf25ddd76a tests: unify test-convert-hg-sink
Matt Mackall <mpm@selenic.com>
parents: 8693
diff changeset
    91
put something in the dirstate:
81bf25ddd76a tests: unify test-convert-hg-sink
Matt Mackall <mpm@selenic.com>
parents: 8693
diff changeset
    92
81bf25ddd76a tests: unify test-convert-hg-sink
Matt Mackall <mpm@selenic.com>
parents: 8693
diff changeset
    93
  $ hg debugstate > debugstate
81bf25ddd76a tests: unify test-convert-hg-sink
Matt Mackall <mpm@selenic.com>
parents: 8693
diff changeset
    94
  $ grep baz debugstate
81bf25ddd76a tests: unify test-convert-hg-sink
Matt Mackall <mpm@selenic.com>
parents: 8693
diff changeset
    95
  a   0         -1 unset               baz
81bf25ddd76a tests: unify test-convert-hg-sink
Matt Mackall <mpm@selenic.com>
parents: 8693
diff changeset
    96
  copy: bar -> baz
81bf25ddd76a tests: unify test-convert-hg-sink
Matt Mackall <mpm@selenic.com>
parents: 8693
diff changeset
    97
81bf25ddd76a tests: unify test-convert-hg-sink
Matt Mackall <mpm@selenic.com>
parents: 8693
diff changeset
    98
add a new revision in the original repo
5279
2dbd750b3ddd convert: clear the dirstate before a conversion, invalidate it afterwards
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 5278
diff changeset
    99
12525
81bf25ddd76a tests: unify test-convert-hg-sink
Matt Mackall <mpm@selenic.com>
parents: 8693
diff changeset
   100
  $ cd ../orig
81bf25ddd76a tests: unify test-convert-hg-sink
Matt Mackall <mpm@selenic.com>
parents: 8693
diff changeset
   101
  $ echo baz > baz
81bf25ddd76a tests: unify test-convert-hg-sink
Matt Mackall <mpm@selenic.com>
parents: 8693
diff changeset
   102
  $ hg ci -qAm 'add baz'
81bf25ddd76a tests: unify test-convert-hg-sink
Matt Mackall <mpm@selenic.com>
parents: 8693
diff changeset
   103
  $ cd ..
81bf25ddd76a tests: unify test-convert-hg-sink
Matt Mackall <mpm@selenic.com>
parents: 8693
diff changeset
   104
  $ hg convert orig new 2>&1 | grep -v 'subversion python bindings could not be loaded'
81bf25ddd76a tests: unify test-convert-hg-sink
Matt Mackall <mpm@selenic.com>
parents: 8693
diff changeset
   105
  scanning source...
81bf25ddd76a tests: unify test-convert-hg-sink
Matt Mackall <mpm@selenic.com>
parents: 8693
diff changeset
   106
  sorting...
81bf25ddd76a tests: unify test-convert-hg-sink
Matt Mackall <mpm@selenic.com>
parents: 8693
diff changeset
   107
  converting...
81bf25ddd76a tests: unify test-convert-hg-sink
Matt Mackall <mpm@selenic.com>
parents: 8693
diff changeset
   108
  0 add baz
81bf25ddd76a tests: unify test-convert-hg-sink
Matt Mackall <mpm@selenic.com>
parents: 8693
diff changeset
   109
  $ cd new
81bf25ddd76a tests: unify test-convert-hg-sink
Matt Mackall <mpm@selenic.com>
parents: 8693
diff changeset
   110
  $ hg out ../orig
81bf25ddd76a tests: unify test-convert-hg-sink
Matt Mackall <mpm@selenic.com>
parents: 8693
diff changeset
   111
  comparing with ../orig
81bf25ddd76a tests: unify test-convert-hg-sink
Matt Mackall <mpm@selenic.com>
parents: 8693
diff changeset
   112
  searching for changes
81bf25ddd76a tests: unify test-convert-hg-sink
Matt Mackall <mpm@selenic.com>
parents: 8693
diff changeset
   113
  no changes found
81bf25ddd76a tests: unify test-convert-hg-sink
Matt Mackall <mpm@selenic.com>
parents: 8693
diff changeset
   114
  [1]
5279
2dbd750b3ddd convert: clear the dirstate before a conversion, invalidate it afterwards
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 5278
diff changeset
   115
12525
81bf25ddd76a tests: unify test-convert-hg-sink
Matt Mackall <mpm@selenic.com>
parents: 8693
diff changeset
   116
dirstate should be the same (no output below):
81bf25ddd76a tests: unify test-convert-hg-sink
Matt Mackall <mpm@selenic.com>
parents: 8693
diff changeset
   117
81bf25ddd76a tests: unify test-convert-hg-sink
Matt Mackall <mpm@selenic.com>
parents: 8693
diff changeset
   118
  $ hg debugstate > new-debugstate
81bf25ddd76a tests: unify test-convert-hg-sink
Matt Mackall <mpm@selenic.com>
parents: 8693
diff changeset
   119
  $ diff debugstate new-debugstate
81bf25ddd76a tests: unify test-convert-hg-sink
Matt Mackall <mpm@selenic.com>
parents: 8693
diff changeset
   120
81bf25ddd76a tests: unify test-convert-hg-sink
Matt Mackall <mpm@selenic.com>
parents: 8693
diff changeset
   121
no copies
81bf25ddd76a tests: unify test-convert-hg-sink
Matt Mackall <mpm@selenic.com>
parents: 8693
diff changeset
   122
81bf25ddd76a tests: unify test-convert-hg-sink
Matt Mackall <mpm@selenic.com>
parents: 8693
diff changeset
   123
  $ hg up -C
81bf25ddd76a tests: unify test-convert-hg-sink
Matt Mackall <mpm@selenic.com>
parents: 8693
diff changeset
   124
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
81bf25ddd76a tests: unify test-convert-hg-sink
Matt Mackall <mpm@selenic.com>
parents: 8693
diff changeset
   125
  $ hg debugrename baz
81bf25ddd76a tests: unify test-convert-hg-sink
Matt Mackall <mpm@selenic.com>
parents: 8693
diff changeset
   126
  baz not renamed
81bf25ddd76a tests: unify test-convert-hg-sink
Matt Mackall <mpm@selenic.com>
parents: 8693
diff changeset
   127
  $ cd ..
81bf25ddd76a tests: unify test-convert-hg-sink
Matt Mackall <mpm@selenic.com>
parents: 8693
diff changeset
   128
81bf25ddd76a tests: unify test-convert-hg-sink
Matt Mackall <mpm@selenic.com>
parents: 8693
diff changeset
   129
test tag rewriting
5279
2dbd750b3ddd convert: clear the dirstate before a conversion, invalidate it afterwards
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 5278
diff changeset
   130
12525
81bf25ddd76a tests: unify test-convert-hg-sink
Matt Mackall <mpm@selenic.com>
parents: 8693
diff changeset
   131
  $ cat > filemap <<EOF
81bf25ddd76a tests: unify test-convert-hg-sink
Matt Mackall <mpm@selenic.com>
parents: 8693
diff changeset
   132
  > exclude foo
81bf25ddd76a tests: unify test-convert-hg-sink
Matt Mackall <mpm@selenic.com>
parents: 8693
diff changeset
   133
  > EOF
81bf25ddd76a tests: unify test-convert-hg-sink
Matt Mackall <mpm@selenic.com>
parents: 8693
diff changeset
   134
  $ hg convert --filemap filemap orig new-filemap 2>&1 | grep -v 'subversion python bindings could not be loaded'
81bf25ddd76a tests: unify test-convert-hg-sink
Matt Mackall <mpm@selenic.com>
parents: 8693
diff changeset
   135
  initializing destination new-filemap repository
81bf25ddd76a tests: unify test-convert-hg-sink
Matt Mackall <mpm@selenic.com>
parents: 8693
diff changeset
   136
  scanning source...
81bf25ddd76a tests: unify test-convert-hg-sink
Matt Mackall <mpm@selenic.com>
parents: 8693
diff changeset
   137
  sorting...
81bf25ddd76a tests: unify test-convert-hg-sink
Matt Mackall <mpm@selenic.com>
parents: 8693
diff changeset
   138
  converting...
38769
7e023ce26c7f convert: don't drop missing or corrupt tag entries
Matt Harbison <matt_harbison@yahoo.com>
parents: 32066
diff changeset
   139
  5 add foo and bar
7e023ce26c7f convert: don't drop missing or corrupt tag entries
Matt Harbison <matt_harbison@yahoo.com>
parents: 32066
diff changeset
   140
  4 remove foo
7e023ce26c7f convert: don't drop missing or corrupt tag entries
Matt Harbison <matt_harbison@yahoo.com>
parents: 32066
diff changeset
   141
  3 add foo/file
7e023ce26c7f convert: don't drop missing or corrupt tag entries
Matt Harbison <matt_harbison@yahoo.com>
parents: 32066
diff changeset
   142
  2 Added tag some-tag for changeset ad681a868e44
7e023ce26c7f convert: don't drop missing or corrupt tag entries
Matt Harbison <matt_harbison@yahoo.com>
parents: 32066
diff changeset
   143
  1 add a missing tag
7e023ce26c7f convert: don't drop missing or corrupt tag entries
Matt Harbison <matt_harbison@yahoo.com>
parents: 32066
diff changeset
   144
  missing tag entry: "1234567890123456789012345678901234567890 missing_tag"
12525
81bf25ddd76a tests: unify test-convert-hg-sink
Matt Mackall <mpm@selenic.com>
parents: 8693
diff changeset
   145
  0 add baz
81bf25ddd76a tests: unify test-convert-hg-sink
Matt Mackall <mpm@selenic.com>
parents: 8693
diff changeset
   146
  $ cd new-filemap
81bf25ddd76a tests: unify test-convert-hg-sink
Matt Mackall <mpm@selenic.com>
parents: 8693
diff changeset
   147
  $ hg tags
38769
7e023ce26c7f convert: don't drop missing or corrupt tag entries
Matt Harbison <matt_harbison@yahoo.com>
parents: 32066
diff changeset
   148
  tip                                3:7bb553f2c68a
12525
81bf25ddd76a tests: unify test-convert-hg-sink
Matt Mackall <mpm@selenic.com>
parents: 8693
diff changeset
   149
  some-tag                           0:ba8636729451
81bf25ddd76a tests: unify test-convert-hg-sink
Matt Mackall <mpm@selenic.com>
parents: 8693
diff changeset
   150
  $ cd ..
19892
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   151
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   152
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   153
Test cases for hg-hg roundtrip
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   154
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   155
Helper
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   156
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   157
  $ glog()
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   158
  > {
25571
1abfe639a70c convert: apply the appropriate phases to the destination (issue4165)
Matt Harbison <matt_harbison@yahoo.com>
parents: 22300
diff changeset
   159
  >     hg log -G --template '{rev} {node|short} ({phase}) "{desc}" files: {files}\n' $*
19892
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   160
  > }
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   161
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   162
Create a tricky source repo
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   163
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   164
  $ hg init source
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   165
  $ cd source
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   166
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   167
  $ echo 0 > 0
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   168
  $ hg ci -Aqm '0: add 0'
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   169
  $ echo a > a
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   170
  $ mkdir dir
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   171
  $ echo b > dir/b
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   172
  $ hg ci -qAm '1: add a and dir/b'
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   173
  $ echo c > dir/c
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   174
  $ hg ci -qAm '2: add dir/c'
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   175
  $ hg copy a e
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   176
  $ echo b >> b
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   177
  $ hg ci -qAm '3: copy a to e, change b'
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   178
  $ hg up -qr -3
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   179
  $ echo a >> a
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   180
  $ hg ci -qAm '4: change a'
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   181
  $ hg merge
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   182
  merging a and e to e
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   183
  2 files updated, 1 files merged, 0 files removed, 0 files unresolved
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   184
  (branch merge, don't forget to commit)
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   185
  $ hg copy b dir/d
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   186
  $ hg ci -qAm '5: merge 2 and 3, copy b to dir/d'
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   187
  $ echo a >> a
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   188
  $ hg ci -qAm '6: change a'
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   189
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   190
  $ hg mani
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   191
  0
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   192
  a
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   193
  b
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   194
  dir/b
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   195
  dir/c
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   196
  dir/d
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   197
  e
25571
1abfe639a70c convert: apply the appropriate phases to the destination (issue4165)
Matt Harbison <matt_harbison@yahoo.com>
parents: 22300
diff changeset
   198
  $ hg phase --public -r tip
19892
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   199
  $ glog
25571
1abfe639a70c convert: apply the appropriate phases to the destination (issue4165)
Matt Harbison <matt_harbison@yahoo.com>
parents: 22300
diff changeset
   200
  @  6 0613c8e59a3d (public) "6: change a" files: a
19892
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   201
  |
25571
1abfe639a70c convert: apply the appropriate phases to the destination (issue4165)
Matt Harbison <matt_harbison@yahoo.com>
parents: 22300
diff changeset
   202
  o    5 717e9b37cdb7 (public) "5: merge 2 and 3, copy b to dir/d" files: dir/d e
19892
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   203
  |\
25571
1abfe639a70c convert: apply the appropriate phases to the destination (issue4165)
Matt Harbison <matt_harbison@yahoo.com>
parents: 22300
diff changeset
   204
  | o  4 86a55cb968d5 (public) "4: change a" files: a
19892
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   205
  | |
25571
1abfe639a70c convert: apply the appropriate phases to the destination (issue4165)
Matt Harbison <matt_harbison@yahoo.com>
parents: 22300
diff changeset
   206
  o |  3 0e6e235919dd (public) "3: copy a to e, change b" files: b e
19892
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   207
  | |
25571
1abfe639a70c convert: apply the appropriate phases to the destination (issue4165)
Matt Harbison <matt_harbison@yahoo.com>
parents: 22300
diff changeset
   208
  o |  2 0394b0d5e4f7 (public) "2: add dir/c" files: dir/c
19892
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   209
  |/
25571
1abfe639a70c convert: apply the appropriate phases to the destination (issue4165)
Matt Harbison <matt_harbison@yahoo.com>
parents: 22300
diff changeset
   210
  o  1 333546584845 (public) "1: add a and dir/b" files: a dir/b
19892
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   211
  |
25571
1abfe639a70c convert: apply the appropriate phases to the destination (issue4165)
Matt Harbison <matt_harbison@yahoo.com>
parents: 22300
diff changeset
   212
  o  0 d1a24e2ebd23 (public) "0: add 0" files: 0
19892
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   213
  
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   214
  $ cd ..
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   215
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   216
Convert excluding rev 0 and dir/ (and thus rev2):
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   217
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   218
  $ cat << EOF > filemap
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   219
  > exclude dir
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   220
  > EOF
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   221
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   222
  $ hg convert --filemap filemap source dest --config convert.hg.revs=1::
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   223
  initializing destination dest repository
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   224
  scanning source...
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   225
  sorting...
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   226
  converting...
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   227
  5 1: add a and dir/b
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   228
  4 2: add dir/c
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   229
  3 3: copy a to e, change b
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   230
  2 4: change a
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   231
  1 5: merge 2 and 3, copy b to dir/d
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   232
  0 6: change a
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   233
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   234
Verify that conversion skipped rev 2:
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   235
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   236
  $ glog -R dest
25571
1abfe639a70c convert: apply the appropriate phases to the destination (issue4165)
Matt Harbison <matt_harbison@yahoo.com>
parents: 22300
diff changeset
   237
  o  4 78814e84a217 (draft) "6: change a" files: a
19892
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   238
  |
25571
1abfe639a70c convert: apply the appropriate phases to the destination (issue4165)
Matt Harbison <matt_harbison@yahoo.com>
parents: 22300
diff changeset
   239
  o    3 f7cff662c5e5 (draft) "5: merge 2 and 3, copy b to dir/d" files: e
19892
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   240
  |\
25571
1abfe639a70c convert: apply the appropriate phases to the destination (issue4165)
Matt Harbison <matt_harbison@yahoo.com>
parents: 22300
diff changeset
   241
  | o  2 ab40a95b0072 (draft) "4: change a" files: a
19892
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   242
  | |
25571
1abfe639a70c convert: apply the appropriate phases to the destination (issue4165)
Matt Harbison <matt_harbison@yahoo.com>
parents: 22300
diff changeset
   243
  o |  1 bd51f17597bf (draft) "3: copy a to e, change b" files: b e
19892
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   244
  |/
25571
1abfe639a70c convert: apply the appropriate phases to the destination (issue4165)
Matt Harbison <matt_harbison@yahoo.com>
parents: 22300
diff changeset
   245
  o  0 a4a1dae0fe35 (draft) "1: add a and dir/b" files: 0 a
19892
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   246
  
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   247
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   248
Verify mapping correct in both directions:
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   249
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   250
  $ cat source/.hg/shamap
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   251
  a4a1dae0fe3514cefd9b8541b7abbc8f44f946d5 333546584845f70c4cfecb992341aaef0e708166
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   252
  bd51f17597bf32268e68a560b206898c3960cda2 0e6e235919dd8e9285ba8eb5adf703af9ad99378
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   253
  ab40a95b00725307e79c2fd271000aa8af9759f4 86a55cb968d51770cba2a1630d6cc637b574580a
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   254
  f7cff662c5e581e6f3f1a85ffdd2bcb35825f6ba 717e9b37cdb7eb9917ca8e30aa3f986e6d5b177d
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   255
  78814e84a217894517c2de392b903ed05e6871a4 0613c8e59a3ddb9789072ef52f1ed13496489bb4
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   256
  $ cat dest/.hg/shamap
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   257
  333546584845f70c4cfecb992341aaef0e708166 a4a1dae0fe3514cefd9b8541b7abbc8f44f946d5
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   258
  0394b0d5e4f761ced559fd0bbdc6afc16cb3f7d1 a4a1dae0fe3514cefd9b8541b7abbc8f44f946d5
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   259
  0e6e235919dd8e9285ba8eb5adf703af9ad99378 bd51f17597bf32268e68a560b206898c3960cda2
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   260
  86a55cb968d51770cba2a1630d6cc637b574580a ab40a95b00725307e79c2fd271000aa8af9759f4
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   261
  717e9b37cdb7eb9917ca8e30aa3f986e6d5b177d f7cff662c5e581e6f3f1a85ffdd2bcb35825f6ba
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   262
  0613c8e59a3ddb9789072ef52f1ed13496489bb4 78814e84a217894517c2de392b903ed05e6871a4
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   263
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   264
Verify meta data converted correctly:
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   265
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   266
  $ hg -R dest log -r 1 --debug -p --git
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   267
  changeset:   1:bd51f17597bf32268e68a560b206898c3960cda2
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   268
  phase:       draft
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   269
  parent:      0:a4a1dae0fe3514cefd9b8541b7abbc8f44f946d5
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   270
  parent:      -1:0000000000000000000000000000000000000000
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   271
  manifest:    1:040c72ed9b101773c24ac314776bfc846943781f
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   272
  user:        test
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   273
  date:        Thu Jan 01 00:00:00 1970 +0000
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   274
  files+:      b e
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   275
  extra:       branch=default
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   276
  description:
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   277
  3: copy a to e, change b
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   278
  
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   279
  
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   280
  diff --git a/b b/b
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   281
  new file mode 100644
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   282
  --- /dev/null
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   283
  +++ b/b
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   284
  @@ -0,0 +1,1 @@
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   285
  +b
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   286
  diff --git a/a b/e
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   287
  copy from a
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   288
  copy to e
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   289
  
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   290
Verify files included and excluded correctly:
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   291
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   292
  $ hg -R dest manifest -r tip
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   293
  0
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   294
  a
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   295
  b
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   296
  e
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   297
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   298
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   299
Make changes in dest and convert back:
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   300
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   301
  $ hg -R dest up -q
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   302
  $ echo dest > dest/dest
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   303
  $ hg -R dest ci -Aqm 'change in dest'
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   304
  $ hg -R dest tip
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   305
  changeset:   5:a2e0e3cc6d1d
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   306
  tag:         tip
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   307
  user:        test
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   308
  date:        Thu Jan 01 00:00:00 1970 +0000
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   309
  summary:     change in dest
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   310
  
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   311
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   312
(converting merges back after using a filemap will probably cause chaos so we
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   313
exclude merges.)
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   314
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   315
  $ hg convert dest source --config convert.hg.revs='!merge()'
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   316
  scanning source...
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   317
  sorting...
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   318
  converting...
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   319
  0 change in dest
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   320
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   321
Verify the conversion back:
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   322
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   323
  $ hg -R source log --debug -r tip
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   324
  changeset:   7:e6d364a69ff1248b2099e603b0c145504cade6f0
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   325
  tag:         tip
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   326
  phase:       draft
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   327
  parent:      6:0613c8e59a3ddb9789072ef52f1ed13496489bb4
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   328
  parent:      -1:0000000000000000000000000000000000000000
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   329
  manifest:    7:aa3e9542f3b76d4f1f1b2e9c7ce9dbb48b6a95ec
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   330
  user:        test
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   331
  date:        Thu Jan 01 00:00:00 1970 +0000
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   332
  files+:      dest
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   333
  extra:       branch=default
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   334
  description:
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   335
  change in dest
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   336
  
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   337
  
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   338
Files that had been excluded are still present:
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   339
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   340
  $ hg -R source manifest -r tip
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   341
  0
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   342
  a
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   343
  b
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   344
  dest
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   345
  dir/b
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   346
  dir/c
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   347
  dir/d
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   348
  e
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   349
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   350
More source changes
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   351
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   352
  $ cd source
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   353
  $ echo 1 >> a
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   354
  $ hg ci -m '8: source first branch'
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   355
  created new head
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   356
  $ hg up -qr -2
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   357
  $ echo 2 >> a
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   358
  $ hg ci -m '9: source second branch'
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   359
  $ hg merge -q --tool internal:local
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   360
  $ hg ci -m '10: source merge'
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   361
  $ echo >> a
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   362
  $ hg ci -m '11: source change'
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   363
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   364
  $ hg mani
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   365
  0
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   366
  a
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   367
  b
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   368
  dest
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   369
  dir/b
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   370
  dir/c
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   371
  dir/d
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   372
  e
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   373
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   374
  $ glog -r 6:
25571
1abfe639a70c convert: apply the appropriate phases to the destination (issue4165)
Matt Harbison <matt_harbison@yahoo.com>
parents: 22300
diff changeset
   375
  @  11 0c8927d1f7f4 (draft) "11: source change" files: a
19892
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   376
  |
25571
1abfe639a70c convert: apply the appropriate phases to the destination (issue4165)
Matt Harbison <matt_harbison@yahoo.com>
parents: 22300
diff changeset
   377
  o    10 9ccb7ee8d261 (draft) "10: source merge" files: a
19892
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   378
  |\
25571
1abfe639a70c convert: apply the appropriate phases to the destination (issue4165)
Matt Harbison <matt_harbison@yahoo.com>
parents: 22300
diff changeset
   379
  | o  9 f131b1518dba (draft) "9: source second branch" files: a
19892
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   380
  | |
25571
1abfe639a70c convert: apply the appropriate phases to the destination (issue4165)
Matt Harbison <matt_harbison@yahoo.com>
parents: 22300
diff changeset
   381
  o |  8 669cf0e74b50 (draft) "8: source first branch" files: a
19892
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   382
  | |
25571
1abfe639a70c convert: apply the appropriate phases to the destination (issue4165)
Matt Harbison <matt_harbison@yahoo.com>
parents: 22300
diff changeset
   383
  | o  7 e6d364a69ff1 (draft) "change in dest" files: dest
19892
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   384
  |/
25571
1abfe639a70c convert: apply the appropriate phases to the destination (issue4165)
Matt Harbison <matt_harbison@yahoo.com>
parents: 22300
diff changeset
   385
  o  6 0613c8e59a3d (public) "6: change a" files: a
19892
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   386
  |
28627
d7af9b4ae7dd graphmod: set default edge styles for ascii graphs (BC)
Martijn Pieters <mjpieters@fb.com>
parents: 25571
diff changeset
   387
  ~
19892
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   388
  $ cd ..
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   389
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   390
  $ hg convert --filemap filemap source dest --config convert.hg.revs=3:
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   391
  scanning source...
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   392
  sorting...
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   393
  converting...
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   394
  3 8: source first branch
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   395
  2 9: source second branch
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   396
  1 10: source merge
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   397
  0 11: source change
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   398
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   399
  $ glog -R dest
25571
1abfe639a70c convert: apply the appropriate phases to the destination (issue4165)
Matt Harbison <matt_harbison@yahoo.com>
parents: 22300
diff changeset
   400
  o  9 8432d597b263 (draft) "11: source change" files: a
19892
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   401
  |
25571
1abfe639a70c convert: apply the appropriate phases to the destination (issue4165)
Matt Harbison <matt_harbison@yahoo.com>
parents: 22300
diff changeset
   402
  o    8 632ffacdcd6f (draft) "10: source merge" files: a
19892
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   403
  |\
25571
1abfe639a70c convert: apply the appropriate phases to the destination (issue4165)
Matt Harbison <matt_harbison@yahoo.com>
parents: 22300
diff changeset
   404
  | o  7 049cfee90ee6 (draft) "9: source second branch" files: a
19892
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   405
  | |
25571
1abfe639a70c convert: apply the appropriate phases to the destination (issue4165)
Matt Harbison <matt_harbison@yahoo.com>
parents: 22300
diff changeset
   406
  o |  6 9b6845e036e5 (draft) "8: source first branch" files: a
19892
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   407
  | |
25571
1abfe639a70c convert: apply the appropriate phases to the destination (issue4165)
Matt Harbison <matt_harbison@yahoo.com>
parents: 22300
diff changeset
   408
  | @  5 a2e0e3cc6d1d (draft) "change in dest" files: dest
19892
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   409
  |/
25571
1abfe639a70c convert: apply the appropriate phases to the destination (issue4165)
Matt Harbison <matt_harbison@yahoo.com>
parents: 22300
diff changeset
   410
  o  4 78814e84a217 (draft) "6: change a" files: a
19892
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   411
  |
25571
1abfe639a70c convert: apply the appropriate phases to the destination (issue4165)
Matt Harbison <matt_harbison@yahoo.com>
parents: 22300
diff changeset
   412
  o    3 f7cff662c5e5 (draft) "5: merge 2 and 3, copy b to dir/d" files: e
19892
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   413
  |\
25571
1abfe639a70c convert: apply the appropriate phases to the destination (issue4165)
Matt Harbison <matt_harbison@yahoo.com>
parents: 22300
diff changeset
   414
  | o  2 ab40a95b0072 (draft) "4: change a" files: a
19892
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   415
  | |
25571
1abfe639a70c convert: apply the appropriate phases to the destination (issue4165)
Matt Harbison <matt_harbison@yahoo.com>
parents: 22300
diff changeset
   416
  o |  1 bd51f17597bf (draft) "3: copy a to e, change b" files: b e
19892
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   417
  |/
25571
1abfe639a70c convert: apply the appropriate phases to the destination (issue4165)
Matt Harbison <matt_harbison@yahoo.com>
parents: 22300
diff changeset
   418
  o  0 a4a1dae0fe35 (draft) "1: add a and dir/b" files: 0 a
19892
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   419
  
77872b002e73 convert: update source shamap when using filemap, just as when not using filemap
Mads Kiilerich <madski@unity3d.com>
parents: 12525
diff changeset
   420
  $ cd ..
21633
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   421
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   422
Two way tests
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   423
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   424
  $ hg init 0
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   425
  $ echo f > 0/f
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   426
  $ echo a > 0/a-only
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   427
  $ echo b > 0/b-only
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   428
  $ hg -R 0 ci -Aqm0
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   429
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   430
  $ cat << EOF > filemap-a
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   431
  > exclude b-only
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   432
  > EOF
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   433
  $ cat << EOF > filemap-b
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   434
  > exclude a-only
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   435
  > EOF
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   436
  $ hg convert --filemap filemap-a 0 a
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   437
  initializing destination a repository
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   438
  scanning source...
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   439
  sorting...
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   440
  converting...
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   441
  0 0
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   442
  $ hg -R a up -q
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   443
  $ echo a > a/f
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   444
  $ hg -R a ci -ma
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   445
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   446
  $ hg convert --filemap filemap-b 0 b
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   447
  initializing destination b repository
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   448
  scanning source...
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   449
  sorting...
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   450
  converting...
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   451
  0 0
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   452
  $ hg -R b up -q
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   453
  $ echo b > b/f
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   454
  $ hg -R b ci -mb
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   455
32066
40cf693fc07d tests: pass only one file at a time to tail(1)
Augie Fackler <augie@google.com>
parents: 28627
diff changeset
   456
  $ tail 0/.hg/shamap
21633
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   457
  86f3f774ffb682bffb5dc3c1d3b3da637cb9a0d6 8a028c7c77f6c7bd6d63bc3f02ca9f779eabf16a
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   458
  dd9f218eb91fb857f2a62fe023e1d64a4e7812fe 8a028c7c77f6c7bd6d63bc3f02ca9f779eabf16a
32066
40cf693fc07d tests: pass only one file at a time to tail(1)
Augie Fackler <augie@google.com>
parents: 28627
diff changeset
   459
  $ tail a/.hg/shamap
21633
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   460
  8a028c7c77f6c7bd6d63bc3f02ca9f779eabf16a 86f3f774ffb682bffb5dc3c1d3b3da637cb9a0d6
32066
40cf693fc07d tests: pass only one file at a time to tail(1)
Augie Fackler <augie@google.com>
parents: 28627
diff changeset
   461
  $ tail b/.hg/shamap
21633
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   462
  8a028c7c77f6c7bd6d63bc3f02ca9f779eabf16a dd9f218eb91fb857f2a62fe023e1d64a4e7812fe
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   463
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   464
  $ hg convert a 0
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   465
  scanning source...
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   466
  sorting...
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   467
  converting...
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   468
  0 a
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   469
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   470
  $ hg convert b 0
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   471
  scanning source...
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   472
  sorting...
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   473
  converting...
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   474
  0 b
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   475
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   476
  $ hg -R 0 log -G
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   477
  o  changeset:   2:637fbbbe96b6
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   478
  |  tag:         tip
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   479
  |  parent:      0:8a028c7c77f6
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   480
  |  user:        test
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   481
  |  date:        Thu Jan 01 00:00:00 1970 +0000
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   482
  |  summary:     b
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   483
  |
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   484
  | o  changeset:   1:ec7b9c96e692
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   485
  |/   user:        test
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   486
  |    date:        Thu Jan 01 00:00:00 1970 +0000
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   487
  |    summary:     a
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   488
  |
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   489
  @  changeset:   0:8a028c7c77f6
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   490
     user:        test
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   491
     date:        Thu Jan 01 00:00:00 1970 +0000
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   492
     summary:     0
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   493
  
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   494
  $ hg convert --filemap filemap-b 0 a --config convert.hg.revs=1::
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   495
  scanning source...
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   496
  sorting...
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   497
  converting...
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   498
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   499
  $ hg -R 0 up -r1
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   500
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   501
  $ echo f >> 0/f
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   502
  $ hg -R 0 ci -mx
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   503
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   504
  $ hg convert --filemap filemap-b 0 a --config convert.hg.revs=1::
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   505
  scanning source...
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   506
  sorting...
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   507
  converting...
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   508
  0 x
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   509
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   510
  $ hg -R a log -G -T '{rev} {desc|firstline} ({files})\n'
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   511
  o  2 x (f)
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   512
  |
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   513
  @  1 a (f)
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   514
  |
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   515
  o  0 0 (a-only f)
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   516
  
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   517
  $ hg -R a mani -r tip
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   518
  a-only
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   519
  f
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   520
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   521
An additional round, demonstrating that unchanged files don't get converted
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   522
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   523
  $ echo f >> 0/f
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   524
  $ echo f >> 0/a-only
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   525
  $ hg -R 0 ci -m "extra f+a-only change"
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   526
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   527
  $ hg convert --filemap filemap-b 0 a --config convert.hg.revs=1::
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   528
  scanning source...
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   529
  sorting...
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   530
  converting...
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   531
  0 extra f+a-only change
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   532
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   533
  $ hg -R a log -G -T '{rev} {desc|firstline} ({files})\n'
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   534
  o  3 extra f+a-only change (f)
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   535
  |
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   536
  o  2 x (f)
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   537
  |
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   538
  @  1 a (f)
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   539
  |
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   540
  o  0 0 (a-only f)
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   541
  
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   542
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   543
Conversion after rollback
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   544
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   545
  $ hg -R a rollback -f
25571
1abfe639a70c convert: apply the appropriate phases to the destination (issue4165)
Matt Harbison <matt_harbison@yahoo.com>
parents: 22300
diff changeset
   546
  repository tip rolled back to revision 2 (undo convert)
21633
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   547
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   548
  $ hg convert --filemap filemap-b 0 a --config convert.hg.revs=1::
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   549
  scanning source...
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   550
  sorting...
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   551
  converting...
21636
3de9f2c4900c convert: only consider shamap revisions converted if they still exists
Mads Kiilerich <madski@unity3d.com>
parents: 21633
diff changeset
   552
  0 extra f+a-only change
21633
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   553
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   554
  $ hg -R a log -G -T '{rev} {desc|firstline} ({files})\n'
21636
3de9f2c4900c convert: only consider shamap revisions converted if they still exists
Mads Kiilerich <madski@unity3d.com>
parents: 21633
diff changeset
   555
  o  3 extra f+a-only change (f)
3de9f2c4900c convert: only consider shamap revisions converted if they still exists
Mads Kiilerich <madski@unity3d.com>
parents: 21633
diff changeset
   556
  |
21633
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   557
  o  2 x (f)
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   558
  |
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   559
  @  1 a (f)
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   560
  |
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   561
  o  0 0 (a-only f)
0ae44984b8d9 tests: better tests for two-way convert
Mads Kiilerich <madski@unity3d.com>
parents: 21498
diff changeset
   562
  
22300
35ab037de989 convert: introduce --full for converting all files
Mads Kiilerich <madski@unity3d.com>
parents: 21636
diff changeset
   563
Convert with --full adds and removes files that didn't change
35ab037de989 convert: introduce --full for converting all files
Mads Kiilerich <madski@unity3d.com>
parents: 21636
diff changeset
   564
35ab037de989 convert: introduce --full for converting all files
Mads Kiilerich <madski@unity3d.com>
parents: 21636
diff changeset
   565
  $ echo f >> 0/f
35ab037de989 convert: introduce --full for converting all files
Mads Kiilerich <madski@unity3d.com>
parents: 21636
diff changeset
   566
  $ hg -R 0 ci -m "f"
35ab037de989 convert: introduce --full for converting all files
Mads Kiilerich <madski@unity3d.com>
parents: 21636
diff changeset
   567
  $ hg convert --filemap filemap-b --full 0 a --config convert.hg.revs=1::
35ab037de989 convert: introduce --full for converting all files
Mads Kiilerich <madski@unity3d.com>
parents: 21636
diff changeset
   568
  scanning source...
35ab037de989 convert: introduce --full for converting all files
Mads Kiilerich <madski@unity3d.com>
parents: 21636
diff changeset
   569
  sorting...
35ab037de989 convert: introduce --full for converting all files
Mads Kiilerich <madski@unity3d.com>
parents: 21636
diff changeset
   570
  converting...
35ab037de989 convert: introduce --full for converting all files
Mads Kiilerich <madski@unity3d.com>
parents: 21636
diff changeset
   571
  0 f
35ab037de989 convert: introduce --full for converting all files
Mads Kiilerich <madski@unity3d.com>
parents: 21636
diff changeset
   572
  $ hg -R a status --change tip
35ab037de989 convert: introduce --full for converting all files
Mads Kiilerich <madski@unity3d.com>
parents: 21636
diff changeset
   573
  M f
35ab037de989 convert: introduce --full for converting all files
Mads Kiilerich <madski@unity3d.com>
parents: 21636
diff changeset
   574
  A b-only
35ab037de989 convert: introduce --full for converting all files
Mads Kiilerich <madski@unity3d.com>
parents: 21636
diff changeset
   575
  R a-only
42360
78530404d00b convert: demonstrate broken {files} list in merge commits with file flags
Martin von Zweigbergk <martinvonz@google.com>
parents: 38769
diff changeset
   576
78530404d00b convert: demonstrate broken {files} list in merge commits with file flags
Martin von Zweigbergk <martinvonz@google.com>
parents: 38769
diff changeset
   577
Recorded {files} list does not get confused about flags on merge commits
78530404d00b convert: demonstrate broken {files} list in merge commits with file flags
Martin von Zweigbergk <martinvonz@google.com>
parents: 38769
diff changeset
   578
78530404d00b convert: demonstrate broken {files} list in merge commits with file flags
Martin von Zweigbergk <martinvonz@google.com>
parents: 38769
diff changeset
   579
#if execbit
78530404d00b convert: demonstrate broken {files} list in merge commits with file flags
Martin von Zweigbergk <martinvonz@google.com>
parents: 38769
diff changeset
   580
  $ cd ..
78530404d00b convert: demonstrate broken {files} list in merge commits with file flags
Martin von Zweigbergk <martinvonz@google.com>
parents: 38769
diff changeset
   581
  $ hg init merge-flags-orig
78530404d00b convert: demonstrate broken {files} list in merge commits with file flags
Martin von Zweigbergk <martinvonz@google.com>
parents: 38769
diff changeset
   582
  $ cd merge-flags-orig
78530404d00b convert: demonstrate broken {files} list in merge commits with file flags
Martin von Zweigbergk <martinvonz@google.com>
parents: 38769
diff changeset
   583
  $ echo 0 > 0
78530404d00b convert: demonstrate broken {files} list in merge commits with file flags
Martin von Zweigbergk <martinvonz@google.com>
parents: 38769
diff changeset
   584
  $ hg ci -Aqm 'add 0'
78530404d00b convert: demonstrate broken {files} list in merge commits with file flags
Martin von Zweigbergk <martinvonz@google.com>
parents: 38769
diff changeset
   585
  $ echo a > a
78530404d00b convert: demonstrate broken {files} list in merge commits with file flags
Martin von Zweigbergk <martinvonz@google.com>
parents: 38769
diff changeset
   586
  $ chmod +x a
78530404d00b convert: demonstrate broken {files} list in merge commits with file flags
Martin von Zweigbergk <martinvonz@google.com>
parents: 38769
diff changeset
   587
  $ hg ci -qAm 'add executable file'
78530404d00b convert: demonstrate broken {files} list in merge commits with file flags
Martin von Zweigbergk <martinvonz@google.com>
parents: 38769
diff changeset
   588
  $ hg co -q 0
78530404d00b convert: demonstrate broken {files} list in merge commits with file flags
Martin von Zweigbergk <martinvonz@google.com>
parents: 38769
diff changeset
   589
  $ echo b > b
78530404d00b convert: demonstrate broken {files} list in merge commits with file flags
Martin von Zweigbergk <martinvonz@google.com>
parents: 38769
diff changeset
   590
  $ hg ci -qAm 'add file'
78530404d00b convert: demonstrate broken {files} list in merge commits with file flags
Martin von Zweigbergk <martinvonz@google.com>
parents: 38769
diff changeset
   591
  $ hg merge -q
78530404d00b convert: demonstrate broken {files} list in merge commits with file flags
Martin von Zweigbergk <martinvonz@google.com>
parents: 38769
diff changeset
   592
  $ hg ci -m 'merge'
78530404d00b convert: demonstrate broken {files} list in merge commits with file flags
Martin von Zweigbergk <martinvonz@google.com>
parents: 38769
diff changeset
   593
  $ hg log -G -T '{rev} {desc}\n'
78530404d00b convert: demonstrate broken {files} list in merge commits with file flags
Martin von Zweigbergk <martinvonz@google.com>
parents: 38769
diff changeset
   594
  @    3 merge
78530404d00b convert: demonstrate broken {files} list in merge commits with file flags
Martin von Zweigbergk <martinvonz@google.com>
parents: 38769
diff changeset
   595
  |\
78530404d00b convert: demonstrate broken {files} list in merge commits with file flags
Martin von Zweigbergk <martinvonz@google.com>
parents: 38769
diff changeset
   596
  | o  2 add file
78530404d00b convert: demonstrate broken {files} list in merge commits with file flags
Martin von Zweigbergk <martinvonz@google.com>
parents: 38769
diff changeset
   597
  | |
78530404d00b convert: demonstrate broken {files} list in merge commits with file flags
Martin von Zweigbergk <martinvonz@google.com>
parents: 38769
diff changeset
   598
  o |  1 add executable file
78530404d00b convert: demonstrate broken {files} list in merge commits with file flags
Martin von Zweigbergk <martinvonz@google.com>
parents: 38769
diff changeset
   599
  |/
78530404d00b convert: demonstrate broken {files} list in merge commits with file flags
Martin von Zweigbergk <martinvonz@google.com>
parents: 38769
diff changeset
   600
  o  0 add 0
78530404d00b convert: demonstrate broken {files} list in merge commits with file flags
Martin von Zweigbergk <martinvonz@google.com>
parents: 38769
diff changeset
   601
  
78530404d00b convert: demonstrate broken {files} list in merge commits with file flags
Martin von Zweigbergk <martinvonz@google.com>
parents: 38769
diff changeset
   602
78530404d00b convert: demonstrate broken {files} list in merge commits with file flags
Martin von Zweigbergk <martinvonz@google.com>
parents: 38769
diff changeset
   603
# No files changed
78530404d00b convert: demonstrate broken {files} list in merge commits with file flags
Martin von Zweigbergk <martinvonz@google.com>
parents: 38769
diff changeset
   604
  $ hg log -r 3 -T '{files}\n'
78530404d00b convert: demonstrate broken {files} list in merge commits with file flags
Martin von Zweigbergk <martinvonz@google.com>
parents: 38769
diff changeset
   605
  
78530404d00b convert: demonstrate broken {files} list in merge commits with file flags
Martin von Zweigbergk <martinvonz@google.com>
parents: 38769
diff changeset
   606
78530404d00b convert: demonstrate broken {files} list in merge commits with file flags
Martin von Zweigbergk <martinvonz@google.com>
parents: 38769
diff changeset
   607
  $ cd ..
78530404d00b convert: demonstrate broken {files} list in merge commits with file flags
Martin von Zweigbergk <martinvonz@google.com>
parents: 38769
diff changeset
   608
  $ hg convert merge-flags-orig merge-flags-new -q
78530404d00b convert: demonstrate broken {files} list in merge commits with file flags
Martin von Zweigbergk <martinvonz@google.com>
parents: 38769
diff changeset
   609
  $ cd merge-flags-new
78530404d00b convert: demonstrate broken {files} list in merge commits with file flags
Martin von Zweigbergk <martinvonz@google.com>
parents: 38769
diff changeset
   610
  $ hg log -G -T '{rev} {desc}\n'
78530404d00b convert: demonstrate broken {files} list in merge commits with file flags
Martin von Zweigbergk <martinvonz@google.com>
parents: 38769
diff changeset
   611
  o    3 merge
78530404d00b convert: demonstrate broken {files} list in merge commits with file flags
Martin von Zweigbergk <martinvonz@google.com>
parents: 38769
diff changeset
   612
  |\
78530404d00b convert: demonstrate broken {files} list in merge commits with file flags
Martin von Zweigbergk <martinvonz@google.com>
parents: 38769
diff changeset
   613
  | o  2 add file
78530404d00b convert: demonstrate broken {files} list in merge commits with file flags
Martin von Zweigbergk <martinvonz@google.com>
parents: 38769
diff changeset
   614
  | |
78530404d00b convert: demonstrate broken {files} list in merge commits with file flags
Martin von Zweigbergk <martinvonz@google.com>
parents: 38769
diff changeset
   615
  o |  1 add executable file
78530404d00b convert: demonstrate broken {files} list in merge commits with file flags
Martin von Zweigbergk <martinvonz@google.com>
parents: 38769
diff changeset
   616
  |/
78530404d00b convert: demonstrate broken {files} list in merge commits with file flags
Martin von Zweigbergk <martinvonz@google.com>
parents: 38769
diff changeset
   617
  o  0 add 0
78530404d00b convert: demonstrate broken {files} list in merge commits with file flags
Martin von Zweigbergk <martinvonz@google.com>
parents: 38769
diff changeset
   618
  
42361
c0e1ea0c4cee convert: don't include file in "files" list if it's added in p2
Martin von Zweigbergk <martinvonz@google.com>
parents: 42360
diff changeset
   619
c0e1ea0c4cee convert: don't include file in "files" list if it's added in p2
Martin von Zweigbergk <martinvonz@google.com>
parents: 42360
diff changeset
   620
# Still no files
42360
78530404d00b convert: demonstrate broken {files} list in merge commits with file flags
Martin von Zweigbergk <martinvonz@google.com>
parents: 38769
diff changeset
   621
  $ hg log -r 3 -T '{files}\n'
42361
c0e1ea0c4cee convert: don't include file in "files" list if it's added in p2
Martin von Zweigbergk <martinvonz@google.com>
parents: 42360
diff changeset
   622
  
42360
78530404d00b convert: demonstrate broken {files} list in merge commits with file flags
Martin von Zweigbergk <martinvonz@google.com>
parents: 38769
diff changeset
   623
78530404d00b convert: demonstrate broken {files} list in merge commits with file flags
Martin von Zweigbergk <martinvonz@google.com>
parents: 38769
diff changeset
   624
#endif