tests/test-merge-default.t
author Matt Harbison <matt_harbison@yahoo.com>
Sat, 24 Jun 2017 23:09:21 -0400
changeset 33063 15a79ac823e8
parent 32718 1b5c61d38a52
child 33066 a49ab7f5e7e7
permissions -rw-r--r--
identify: add template support This is based on a patch proposed last year by Mathias De Maré[1], with a few changes. - Tags and bookmarks are now formatted lists, for more flexible queries. - The templater is populated whether or not [-nibtB] is specified. (Plain output is unchanged.) This seems more consistent with other templated commands. - The 'id' property is a string, instead of a list. - The parents of 'wdir()' have their own list of attributes. I left 'id' as a string because it seems very useful for generating version info. It's also a bit strange because the value and meaning changes depending on whether or not --debug is passed (short vs full hash), whether the revision is a merge or not (one hash or two, separated by a '+'), the working directory or not (node vs p1node), and local or not (remote defaults to tip, and never has '+'). The equivalent string built with {rev} seems much less useful, and I couldn't think of a reasonable name, so I left it out. The discussion seemed to be pointing towards having a list of nodes, with more than one entry for a merge. It seems simpler to give the nodes a name, and use {node} for the actual commit probed, especially now that there is a virtual node for 'wdir()'. Yuya mentioned using fm.nested() in that thread, so I did for the parent nodes. I'm not sure if the plan is to fill in all of the context attributes in these items, or if these nested items should simply be made {p1node} and {p1rev}. I used ':' as the tag separator for consistency with {tags} in the log templater. Likewise, bookmarks are separated by a space for consistency with the corresponding log template. [1] https://www.mercurial-scm.org/pipermail/mercurial-devel/2016-August/087039.html
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
12255
9b3c02c36d92 tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents: 10658
diff changeset
     1
  $ hg init
9b3c02c36d92 tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents: 10658
diff changeset
     2
  $ echo a > a
9b3c02c36d92 tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents: 10658
diff changeset
     3
  $ hg commit -A -ma
9b3c02c36d92 tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents: 10658
diff changeset
     4
  adding a
2915
013921c753bd merge with other head by default, not tip.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
     5
12255
9b3c02c36d92 tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents: 10658
diff changeset
     6
  $ echo b >> a
9b3c02c36d92 tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents: 10658
diff changeset
     7
  $ hg commit -mb
9b3c02c36d92 tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents: 10658
diff changeset
     8
9b3c02c36d92 tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents: 10658
diff changeset
     9
  $ echo c >> a
9b3c02c36d92 tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents: 10658
diff changeset
    10
  $ hg commit -mc
2915
013921c753bd merge with other head by default, not tip.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
    11
12255
9b3c02c36d92 tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents: 10658
diff changeset
    12
  $ hg up 1
9b3c02c36d92 tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents: 10658
diff changeset
    13
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
9b3c02c36d92 tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents: 10658
diff changeset
    14
  $ echo d >> a
9b3c02c36d92 tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents: 10658
diff changeset
    15
  $ hg commit -md
9b3c02c36d92 tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents: 10658
diff changeset
    16
  created new head
2915
013921c753bd merge with other head by default, not tip.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
    17
12255
9b3c02c36d92 tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents: 10658
diff changeset
    18
  $ hg up 1
9b3c02c36d92 tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents: 10658
diff changeset
    19
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
9b3c02c36d92 tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents: 10658
diff changeset
    20
  $ echo e >> a
9b3c02c36d92 tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents: 10658
diff changeset
    21
  $ hg commit -me
9b3c02c36d92 tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents: 10658
diff changeset
    22
  created new head
2915
013921c753bd merge with other head by default, not tip.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
    23
12255
9b3c02c36d92 tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents: 10658
diff changeset
    24
  $ hg up 1
9b3c02c36d92 tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents: 10658
diff changeset
    25
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
9b3c02c36d92 tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents: 10658
diff changeset
    26
9b3c02c36d92 tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents: 10658
diff changeset
    27
Should fail because not at a head:
2915
013921c753bd merge with other head by default, not tip.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
    28
12255
9b3c02c36d92 tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents: 10658
diff changeset
    29
  $ hg merge
28103
7d852bb47b0a merge: give priority to "not at head" failures for bare 'hg merge'
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 28029
diff changeset
    30
  abort: working directory not at a head revision
7d852bb47b0a merge: give priority to "not at head" failures for bare 'hg merge'
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 28029
diff changeset
    31
  (use 'hg update' or merge with an explicit revision)
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12255
diff changeset
    32
  [255]
12255
9b3c02c36d92 tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents: 10658
diff changeset
    33
9b3c02c36d92 tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents: 10658
diff changeset
    34
  $ hg up
9b3c02c36d92 tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents: 10658
diff changeset
    35
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
32718
1b5c61d38a52 update: show the commit to which we updated in case of multiple heads (BC)
Pulkit Goyal <7895pulkit@gmail.com>
parents: 28139
diff changeset
    36
  updated to "f25cbe84d8b3: e"
28029
72072cfc7e91 update: warn about other topological heads on bare update
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 26716
diff changeset
    37
  2 other heads for branch "default"
12255
9b3c02c36d92 tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents: 10658
diff changeset
    38
9b3c02c36d92 tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents: 10658
diff changeset
    39
Should fail because > 2 heads:
2915
013921c753bd merge with other head by default, not tip.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
    40
12255
9b3c02c36d92 tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents: 10658
diff changeset
    41
  $ HGMERGE=internal:other; export HGMERGE
9b3c02c36d92 tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents: 10658
diff changeset
    42
  $ hg merge
9b3c02c36d92 tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents: 10658
diff changeset
    43
  abort: branch 'default' has 3 heads - please merge with an explicit rev
9b3c02c36d92 tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents: 10658
diff changeset
    44
  (run 'hg heads .' to see heads)
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12255
diff changeset
    45
  [255]
12255
9b3c02c36d92 tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents: 10658
diff changeset
    46
9b3c02c36d92 tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents: 10658
diff changeset
    47
Should succeed:
2915
013921c753bd merge with other head by default, not tip.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
    48
12255
9b3c02c36d92 tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents: 10658
diff changeset
    49
  $ hg merge 2
9b3c02c36d92 tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents: 10658
diff changeset
    50
  0 files updated, 1 files merged, 0 files removed, 0 files unresolved
9b3c02c36d92 tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents: 10658
diff changeset
    51
  (branch merge, don't forget to commit)
33063
15a79ac823e8 identify: add template support
Matt Harbison <matt_harbison@yahoo.com>
parents: 32718
diff changeset
    52
  $ hg id -Tjson
15a79ac823e8 identify: add template support
Matt Harbison <matt_harbison@yahoo.com>
parents: 32718
diff changeset
    53
  [
15a79ac823e8 identify: add template support
Matt Harbison <matt_harbison@yahoo.com>
parents: 32718
diff changeset
    54
   {
15a79ac823e8 identify: add template support
Matt Harbison <matt_harbison@yahoo.com>
parents: 32718
diff changeset
    55
    "bookmarks": [],
15a79ac823e8 identify: add template support
Matt Harbison <matt_harbison@yahoo.com>
parents: 32718
diff changeset
    56
    "branch": "default",
15a79ac823e8 identify: add template support
Matt Harbison <matt_harbison@yahoo.com>
parents: 32718
diff changeset
    57
    "changed": "+",
15a79ac823e8 identify: add template support
Matt Harbison <matt_harbison@yahoo.com>
parents: 32718
diff changeset
    58
    "id": "f25cbe84d8b3+2d95304fed5d+",
15a79ac823e8 identify: add template support
Matt Harbison <matt_harbison@yahoo.com>
parents: 32718
diff changeset
    59
    "node": "ffffffffffffffffffffffffffffffffffffffff",
15a79ac823e8 identify: add template support
Matt Harbison <matt_harbison@yahoo.com>
parents: 32718
diff changeset
    60
    "p1": [{"node": "f25cbe84d8b320e298e7703f18a25a3959518c23", "rev": 4}],
15a79ac823e8 identify: add template support
Matt Harbison <matt_harbison@yahoo.com>
parents: 32718
diff changeset
    61
    "p2": [{"node": "2d95304fed5d89bc9d70b2a0d02f0d567469c3ab", "rev": 2}],
15a79ac823e8 identify: add template support
Matt Harbison <matt_harbison@yahoo.com>
parents: 32718
diff changeset
    62
    "tags": ["tip"]
15a79ac823e8 identify: add template support
Matt Harbison <matt_harbison@yahoo.com>
parents: 32718
diff changeset
    63
   }
15a79ac823e8 identify: add template support
Matt Harbison <matt_harbison@yahoo.com>
parents: 32718
diff changeset
    64
  ]
12255
9b3c02c36d92 tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents: 10658
diff changeset
    65
  $ hg commit -mm1
9b3c02c36d92 tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents: 10658
diff changeset
    66
9b3c02c36d92 tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents: 10658
diff changeset
    67
Should succeed - 2 heads:
2915
013921c753bd merge with other head by default, not tip.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
    68
12255
9b3c02c36d92 tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents: 10658
diff changeset
    69
  $ hg merge -P
9b3c02c36d92 tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents: 10658
diff changeset
    70
  changeset:   3:ea9ff125ff88
9b3c02c36d92 tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents: 10658
diff changeset
    71
  parent:      1:1846eede8b68
9b3c02c36d92 tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents: 10658
diff changeset
    72
  user:        test
9b3c02c36d92 tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents: 10658
diff changeset
    73
  date:        Thu Jan 01 00:00:00 1970 +0000
9b3c02c36d92 tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents: 10658
diff changeset
    74
  summary:     d
9b3c02c36d92 tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents: 10658
diff changeset
    75
  
9b3c02c36d92 tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents: 10658
diff changeset
    76
  $ hg merge
9b3c02c36d92 tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents: 10658
diff changeset
    77
  0 files updated, 1 files merged, 0 files removed, 0 files unresolved
9b3c02c36d92 tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents: 10658
diff changeset
    78
  (branch merge, don't forget to commit)
9b3c02c36d92 tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents: 10658
diff changeset
    79
  $ hg commit -mm2
2915
013921c753bd merge with other head by default, not tip.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
    80
33063
15a79ac823e8 identify: add template support
Matt Harbison <matt_harbison@yahoo.com>
parents: 32718
diff changeset
    81
  $ hg id -r 1 -Tjson
15a79ac823e8 identify: add template support
Matt Harbison <matt_harbison@yahoo.com>
parents: 32718
diff changeset
    82
  [
15a79ac823e8 identify: add template support
Matt Harbison <matt_harbison@yahoo.com>
parents: 32718
diff changeset
    83
   {
15a79ac823e8 identify: add template support
Matt Harbison <matt_harbison@yahoo.com>
parents: 32718
diff changeset
    84
    "bookmarks": [],
15a79ac823e8 identify: add template support
Matt Harbison <matt_harbison@yahoo.com>
parents: 32718
diff changeset
    85
    "branch": "default",
15a79ac823e8 identify: add template support
Matt Harbison <matt_harbison@yahoo.com>
parents: 32718
diff changeset
    86
    "id": "1846eede8b68",
15a79ac823e8 identify: add template support
Matt Harbison <matt_harbison@yahoo.com>
parents: 32718
diff changeset
    87
    "node": "1846eede8b6886d8cc8a88c96a687b7fe8f3b9d1",
15a79ac823e8 identify: add template support
Matt Harbison <matt_harbison@yahoo.com>
parents: 32718
diff changeset
    88
    "tags": []
15a79ac823e8 identify: add template support
Matt Harbison <matt_harbison@yahoo.com>
parents: 32718
diff changeset
    89
   }
15a79ac823e8 identify: add template support
Matt Harbison <matt_harbison@yahoo.com>
parents: 32718
diff changeset
    90
  ]
15a79ac823e8 identify: add template support
Matt Harbison <matt_harbison@yahoo.com>
parents: 32718
diff changeset
    91
12255
9b3c02c36d92 tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents: 10658
diff changeset
    92
Should fail because at tip:
9b3c02c36d92 tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents: 10658
diff changeset
    93
9b3c02c36d92 tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents: 10658
diff changeset
    94
  $ hg merge
15619
6c8573dd1b6b merge: make 'nothing to merge' aborts consistent
Kevin Bullock <kbullock@ringworld.org>
parents: 12316
diff changeset
    95
  abort: nothing to merge
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12255
diff changeset
    96
  [255]
2915
013921c753bd merge with other head by default, not tip.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
    97
12255
9b3c02c36d92 tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents: 10658
diff changeset
    98
  $ hg up 0
9b3c02c36d92 tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents: 10658
diff changeset
    99
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
5242
9cd6578750b9 improve error message for 'hg merge' when repo already at branchtip
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 2915
diff changeset
   100
12255
9b3c02c36d92 tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents: 10658
diff changeset
   101
Should fail because there is only one head:
9b3c02c36d92 tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents: 10658
diff changeset
   102
9b3c02c36d92 tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents: 10658
diff changeset
   103
  $ hg merge
15619
6c8573dd1b6b merge: make 'nothing to merge' aborts consistent
Kevin Bullock <kbullock@ringworld.org>
parents: 12316
diff changeset
   104
  abort: nothing to merge
6c8573dd1b6b merge: make 'nothing to merge' aborts consistent
Kevin Bullock <kbullock@ringworld.org>
parents: 12316
diff changeset
   105
  (use 'hg update' instead)
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12255
diff changeset
   106
  [255]
2915
013921c753bd merge with other head by default, not tip.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
   107
12255
9b3c02c36d92 tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents: 10658
diff changeset
   108
  $ hg up 3
9b3c02c36d92 tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents: 10658
diff changeset
   109
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
9b3c02c36d92 tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents: 10658
diff changeset
   110
9b3c02c36d92 tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents: 10658
diff changeset
   111
  $ echo f >> a
9b3c02c36d92 tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents: 10658
diff changeset
   112
  $ hg branch foobranch
9b3c02c36d92 tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents: 10658
diff changeset
   113
  marked working directory as branch foobranch
15615
41885892796e branch: warn on branching
Matt Mackall <mpm@selenic.com>
parents: 12316
diff changeset
   114
  (branches are permanent and global, did you want a bookmark?)
12255
9b3c02c36d92 tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents: 10658
diff changeset
   115
  $ hg commit -mf
9b3c02c36d92 tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents: 10658
diff changeset
   116
9b3c02c36d92 tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents: 10658
diff changeset
   117
Should fail because merge with other branch:
9b3c02c36d92 tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents: 10658
diff changeset
   118
9b3c02c36d92 tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents: 10658
diff changeset
   119
  $ hg merge
9b3c02c36d92 tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents: 10658
diff changeset
   120
  abort: branch 'foobranch' has one head - please merge with an explicit rev
9b3c02c36d92 tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents: 10658
diff changeset
   121
  (run 'hg heads' to see all heads)
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12255
diff changeset
   122
  [255]
10355
a5576908b589 merge: add hints about the use of 'hg heads' to find the rev to merge
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents: 8834
diff changeset
   123
12255
9b3c02c36d92 tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents: 10658
diff changeset
   124
9b3c02c36d92 tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents: 10658
diff changeset
   125
Test for issue2043: ensure that 'merge -P' shows ancestors of 6 that
22389
94f77624dbb5 comments: describe ancestor consistently - avoid 'least common ancestor'
Mads Kiilerich <madski@unity3d.com>
parents: 15623
diff changeset
   126
are not ancestors of 7, regardless of where their common ancestors are.
12255
9b3c02c36d92 tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents: 10658
diff changeset
   127
9b3c02c36d92 tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents: 10658
diff changeset
   128
Merge preview not affected by common ancestor:
10505
b3311e26f94f merge: fix --preview to show all nodes that will be merged (issue2043).
Greg Ward <greg-hg@gerg.ca>
parents: 10504
diff changeset
   129
12255
9b3c02c36d92 tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents: 10658
diff changeset
   130
  $ hg up -q 7
9b3c02c36d92 tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents: 10658
diff changeset
   131
  $ hg merge -q -P 6
9b3c02c36d92 tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents: 10658
diff changeset
   132
  2:2d95304fed5d
9b3c02c36d92 tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents: 10658
diff changeset
   133
  4:f25cbe84d8b3
9b3c02c36d92 tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents: 10658
diff changeset
   134
  5:a431fabd6039
9b3c02c36d92 tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents: 10658
diff changeset
   135
  6:e88e33f3bf62
9b3c02c36d92 tests: unify test-merge-default
Adrian Buehlmann <adrian@cadifra.com>
parents: 10658
diff changeset
   136
26716
c027641f8a83 revset: rename and test '_destmerge'
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22389
diff changeset
   137
Test experimental destination revset
c027641f8a83 revset: rename and test '_destmerge'
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22389
diff changeset
   138
c027641f8a83 revset: rename and test '_destmerge'
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22389
diff changeset
   139
  $ hg log -r '_destmerge()'
c027641f8a83 revset: rename and test '_destmerge'
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22389
diff changeset
   140
  abort: branch 'foobranch' has one head - please merge with an explicit rev
c027641f8a83 revset: rename and test '_destmerge'
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22389
diff changeset
   141
  (run 'hg heads' to see all heads)
c027641f8a83 revset: rename and test '_destmerge'
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22389
diff changeset
   142
  [255]
c027641f8a83 revset: rename and test '_destmerge'
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 22389
diff changeset
   143
28139
5476a7a039c0 destutil: allow to specify an explicit source for the merge
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 28103
diff changeset
   144
(on a branch with a two heads)
5476a7a039c0 destutil: allow to specify an explicit source for the merge
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 28103
diff changeset
   145
5476a7a039c0 destutil: allow to specify an explicit source for the merge
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 28103
diff changeset
   146
  $ hg up 5
5476a7a039c0 destutil: allow to specify an explicit source for the merge
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 28103
diff changeset
   147
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
5476a7a039c0 destutil: allow to specify an explicit source for the merge
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 28103
diff changeset
   148
  $ echo f >> a
5476a7a039c0 destutil: allow to specify an explicit source for the merge
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 28103
diff changeset
   149
  $ hg commit -mf
5476a7a039c0 destutil: allow to specify an explicit source for the merge
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 28103
diff changeset
   150
  created new head
5476a7a039c0 destutil: allow to specify an explicit source for the merge
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 28103
diff changeset
   151
  $ hg log -r '_destmerge()'
5476a7a039c0 destutil: allow to specify an explicit source for the merge
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 28103
diff changeset
   152
  changeset:   6:e88e33f3bf62
5476a7a039c0 destutil: allow to specify an explicit source for the merge
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 28103
diff changeset
   153
  parent:      5:a431fabd6039
5476a7a039c0 destutil: allow to specify an explicit source for the merge
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 28103
diff changeset
   154
  parent:      3:ea9ff125ff88
5476a7a039c0 destutil: allow to specify an explicit source for the merge
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 28103
diff changeset
   155
  user:        test
5476a7a039c0 destutil: allow to specify an explicit source for the merge
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 28103
diff changeset
   156
  date:        Thu Jan 01 00:00:00 1970 +0000
5476a7a039c0 destutil: allow to specify an explicit source for the merge
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 28103
diff changeset
   157
  summary:     m2
5476a7a039c0 destutil: allow to specify an explicit source for the merge
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 28103
diff changeset
   158
  
5476a7a039c0 destutil: allow to specify an explicit source for the merge
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 28103
diff changeset
   159
5476a7a039c0 destutil: allow to specify an explicit source for the merge
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 28103
diff changeset
   160
(from the other head)
5476a7a039c0 destutil: allow to specify an explicit source for the merge
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 28103
diff changeset
   161
5476a7a039c0 destutil: allow to specify an explicit source for the merge
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 28103
diff changeset
   162
  $ hg log -r '_destmerge(e88e33f3bf62)'
5476a7a039c0 destutil: allow to specify an explicit source for the merge
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 28103
diff changeset
   163
  changeset:   8:b613918999e2
5476a7a039c0 destutil: allow to specify an explicit source for the merge
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 28103
diff changeset
   164
  tag:         tip
5476a7a039c0 destutil: allow to specify an explicit source for the merge
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 28103
diff changeset
   165
  parent:      5:a431fabd6039
5476a7a039c0 destutil: allow to specify an explicit source for the merge
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 28103
diff changeset
   166
  user:        test
5476a7a039c0 destutil: allow to specify an explicit source for the merge
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 28103
diff changeset
   167
  date:        Thu Jan 01 00:00:00 1970 +0000
5476a7a039c0 destutil: allow to specify an explicit source for the merge
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 28103
diff changeset
   168
  summary:     f
5476a7a039c0 destutil: allow to specify an explicit source for the merge
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 28103
diff changeset
   169
  
5476a7a039c0 destutil: allow to specify an explicit source for the merge
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 28103
diff changeset
   170
5476a7a039c0 destutil: allow to specify an explicit source for the merge
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 28103
diff changeset
   171
(from unrelated branch)
5476a7a039c0 destutil: allow to specify an explicit source for the merge
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 28103
diff changeset
   172
5476a7a039c0 destutil: allow to specify an explicit source for the merge
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 28103
diff changeset
   173
  $ hg log -r '_destmerge(foobranch)'
5476a7a039c0 destutil: allow to specify an explicit source for the merge
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 28103
diff changeset
   174
  abort: branch 'foobranch' has one head - please merge with an explicit rev
5476a7a039c0 destutil: allow to specify an explicit source for the merge
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 28103
diff changeset
   175
  (run 'hg heads' to see all heads)
5476a7a039c0 destutil: allow to specify an explicit source for the merge
Pierre-Yves David <pierre-yves.david@fb.com>
parents: 28103
diff changeset
   176
  [255]