tests/test-merge-criss-cross.t
author Matt Mackall <mpm@selenic.com>
Tue, 18 Mar 2014 17:54:42 -0500
changeset 20780 403f1f73d30f
parent 20636 12580e04cc43
child 21125 e94e90a4526e
permissions -rw-r--r--
revset: try to handle hyphenated symbols if lookup callback is available Formerly an expression like "2.4-rc::" was tokenized as 2.4|-|rc|::. This allows dashes in symbols iff the whole symbol-like string can be looked up. Otherwise, it's tokenized as a series of symbols and operators. No attempt is made to accept dashed symbols inside larger symbol-like string, for instance foo-bar or bar-baz inside foo-bar-baz.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
20636
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
     1
Criss cross merging
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
     2
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
     3
  $ hg init criss-cross
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
     4
  $ cd criss-cross
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
     5
  $ echo '0 base' > f1
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
     6
  $ echo '0 base' > f2
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
     7
  $ hg ci -Aqm '0 base'
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
     8
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
     9
  $ echo '1 first change' > f1
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    10
  $ hg ci -m '1 first change f1'
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    11
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    12
  $ hg up -qr0
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    13
  $ echo '2 first change' > f2
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    14
  $ hg ci -qm '2 first change f2'
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    15
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    16
  $ hg merge -qr 1
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    17
  $ hg ci -m '3 merge'
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    18
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    19
  $ hg up -qr2
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    20
  $ hg merge -qr1
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    21
  $ hg ci -qm '4 merge'
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    22
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    23
  $ echo '5 second change' > f1
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    24
  $ hg ci -m '5 second change f1'
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    25
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    26
  $ hg up -qr3
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    27
  $ echo '6 second change' > f2
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    28
  $ hg ci -m '6 second change f2'
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    29
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    30
  $ hg log -G
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    31
  @  changeset:   6:3b08d01b0ab5
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    32
  |  tag:         tip
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    33
  |  parent:      3:cf89f02107e5
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    34
  |  user:        test
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    35
  |  date:        Thu Jan 01 00:00:00 1970 +0000
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    36
  |  summary:     6 second change f2
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    37
  |
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    38
  | o  changeset:   5:adfe50279922
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    39
  | |  user:        test
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    40
  | |  date:        Thu Jan 01 00:00:00 1970 +0000
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    41
  | |  summary:     5 second change f1
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    42
  | |
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    43
  | o    changeset:   4:7d3e55501ae6
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    44
  | |\   parent:      2:40663881a6dd
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    45
  | | |  parent:      1:0f6b37dbe527
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    46
  | | |  user:        test
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    47
  | | |  date:        Thu Jan 01 00:00:00 1970 +0000
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    48
  | | |  summary:     4 merge
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    49
  | | |
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    50
  o---+  changeset:   3:cf89f02107e5
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    51
  | | |  parent:      2:40663881a6dd
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    52
  |/ /   parent:      1:0f6b37dbe527
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    53
  | |    user:        test
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    54
  | |    date:        Thu Jan 01 00:00:00 1970 +0000
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    55
  | |    summary:     3 merge
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    56
  | |
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    57
  | o  changeset:   2:40663881a6dd
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    58
  | |  parent:      0:40494bf2444c
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    59
  | |  user:        test
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    60
  | |  date:        Thu Jan 01 00:00:00 1970 +0000
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    61
  | |  summary:     2 first change f2
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    62
  | |
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    63
  o |  changeset:   1:0f6b37dbe527
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    64
  |/   user:        test
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    65
  |    date:        Thu Jan 01 00:00:00 1970 +0000
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    66
  |    summary:     1 first change f1
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    67
  |
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    68
  o  changeset:   0:40494bf2444c
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    69
     user:        test
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    70
     date:        Thu Jan 01 00:00:00 1970 +0000
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    71
     summary:     0 base
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    72
  
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    73
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    74
  $ hg merge -v --debug --tool internal:dump 5
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    75
    searching for copies back to rev 3
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    76
  resolving manifests
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    77
   branchmerge: True, force: False, partial: False
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    78
   ancestor: 0f6b37dbe527, local: 3b08d01b0ab5+, remote: adfe50279922
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    79
   f1: remote is newer -> g
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    80
   f2: versions differ -> m
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    81
    preserving f2 for resolve of f2
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    82
  getting f1
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    83
  updating: f1 1/2 files (50.00%)
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    84
  updating: f2 2/2 files (100.00%)
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    85
  picked tool 'internal:dump' for f2 (binary False symlink False)
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    86
  merging f2
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    87
  my f2@3b08d01b0ab5+ other f2@adfe50279922 ancestor f2@40494bf2444c
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    88
  1 files updated, 0 files merged, 0 files removed, 1 files unresolved
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    89
  use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    90
  [1]
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    91
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    92
  $ head *
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    93
  ==> f1 <==
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    94
  5 second change
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    95
  
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    96
  ==> f2 <==
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    97
  6 second change
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    98
  
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
    99
  ==> f2.base <==
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
   100
  0 base
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
   101
  
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
   102
  ==> f2.local <==
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
   103
  6 second change
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
   104
  
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
   105
  ==> f2.orig <==
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
   106
  6 second change
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
   107
  
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
   108
  ==> f2.other <==
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
   109
  2 first change
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
   110
12580e04cc43 tests: add test case for criss cross merge
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
   111
  $ cd ..