tests/test-bheads.t
author Thomas Arendsen Hein <thomas@intevation.de>
Thu, 04 Oct 2012 16:30:40 +0200
branchstable
changeset 17705 6929b9c70be9
parent 16913 f2719b387380
child 25295 701df761aa94
permissions -rw-r--r--
subrepo: setting LC_MESSAGES only works if LC_ALL is empty or unset For example LC_ALL=de_DE.utf-8 would cause the version check to fail, because "svn, Version 1.6.12 (r955767)" with a capital "V" will be printed. Using "svn --version --quiet" would only print the version number, but then matching other messages, e.g. "Committed revision" would fail.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
12072
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
     1
  $ heads()
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
     2
  > {
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
     3
  >    hg heads --template '{rev}: {desc|firstline|strip} ({branches})\n' "$@"
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
     4
  > }
4648
8e503fa54d2d Add option to heads to show only heads for current branch.
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
     5
12072
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
     6
  $ hg init a
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
     7
  $ cd a
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
     8
  $ echo 'root' >root
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
     9
  $ hg add root
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
    10
  $ hg commit -m "Adding root node"
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
    11
  $ heads
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
    12
  0: Adding root node ()
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
    13
-------
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
    14
  $ heads .
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
    15
  0: Adding root node ()
6127
25c372e8f261 Simplify the output of test-bheads
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4648
diff changeset
    16
12072
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
    17
=======
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
    18
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
    19
  $ echo 'a' >a
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
    20
  $ hg add a
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
    21
  $ hg branch a
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
    22
  marked working directory as branch a
15615
41885892796e branch: warn on branching
Matt Mackall <mpm@selenic.com>
parents: 12365
diff changeset
    23
  (branches are permanent and global, did you want a bookmark?)
12072
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
    24
  $ hg commit -m "Adding a branch"
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
    25
  $ heads
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
    26
  1: Adding a branch (a)
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
    27
  0: Adding root node ()
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
    28
-------
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
    29
  $ heads .
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
    30
  1: Adding a branch (a)
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
    31
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
    32
=======
4648
8e503fa54d2d Add option to heads to show only heads for current branch.
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
    33
12072
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
    34
  $ hg update -C 0
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
    35
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
    36
  $ echo 'b' >b
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
    37
  $ hg add b
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
    38
  $ hg branch b
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
    39
  marked working directory as branch b
15615
41885892796e branch: warn on branching
Matt Mackall <mpm@selenic.com>
parents: 12365
diff changeset
    40
  (branches are permanent and global, did you want a bookmark?)
12072
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
    41
  $ hg commit -m "Adding b branch"
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
    42
  $ heads
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
    43
  2: Adding b branch (b)
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
    44
  1: Adding a branch (a)
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
    45
  0: Adding root node ()
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
    46
-------
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
    47
  $ heads .
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
    48
  2: Adding b branch (b)
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
    49
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
    50
=======
4648
8e503fa54d2d Add option to heads to show only heads for current branch.
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
    51
12072
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
    52
  $ echo 'bh1' >bh1
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
    53
  $ hg add bh1
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
    54
  $ hg commit -m "Adding b branch head 1"
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
    55
  $ heads
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
    56
  3: Adding b branch head 1 (b)
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
    57
  1: Adding a branch (a)
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
    58
  0: Adding root node ()
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
    59
-------
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
    60
  $ heads .
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
    61
  3: Adding b branch head 1 (b)
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
    62
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
    63
=======
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
    64
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
    65
  $ hg update -C 2
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
    66
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
    67
  $ echo 'bh2' >bh2
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
    68
  $ hg add bh2
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
    69
  $ hg commit -m "Adding b branch head 2"
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
    70
  created new head
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
    71
  $ heads
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
    72
  4: Adding b branch head 2 (b)
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
    73
  3: Adding b branch head 1 (b)
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
    74
  1: Adding a branch (a)
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
    75
  0: Adding root node ()
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
    76
  $ heads .
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
    77
  4: Adding b branch head 2 (b)
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
    78
  3: Adding b branch head 1 (b)
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
    79
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
    80
=======
4648
8e503fa54d2d Add option to heads to show only heads for current branch.
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
    81
12072
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
    82
  $ hg update -C 2
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
    83
  0 files updated, 0 files merged, 1 files removed, 0 files unresolved
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
    84
  $ echo 'bh3' >bh3
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
    85
  $ hg add bh3
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
    86
  $ hg commit -m "Adding b branch head 3"
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
    87
  created new head
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
    88
  $ heads
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
    89
  5: Adding b branch head 3 (b)
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
    90
  4: Adding b branch head 2 (b)
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
    91
  3: Adding b branch head 1 (b)
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
    92
  1: Adding a branch (a)
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
    93
  0: Adding root node ()
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
    94
-------
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
    95
  $ heads .
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
    96
  5: Adding b branch head 3 (b)
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
    97
  4: Adding b branch head 2 (b)
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
    98
  3: Adding b branch head 1 (b)
4648
8e503fa54d2d Add option to heads to show only heads for current branch.
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
    99
12072
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   100
=======
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   101
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   102
  $ hg merge 4
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   103
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   104
  (branch merge, don't forget to commit)
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   105
  $ hg commit -m "Merging b branch head 2 and b branch head 3"
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   106
  $ heads
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   107
  6: Merging b branch head 2 and b branch head 3 (b)
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   108
  3: Adding b branch head 1 (b)
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   109
  1: Adding a branch (a)
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   110
  0: Adding root node ()
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   111
-------
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   112
  $ heads .
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   113
  6: Merging b branch head 2 and b branch head 3 (b)
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   114
  3: Adding b branch head 1 (b)
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   115
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   116
=======
4648
8e503fa54d2d Add option to heads to show only heads for current branch.
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
   117
12072
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   118
  $ echo 'c' >c
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   119
  $ hg add c
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   120
  $ hg branch c
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   121
  marked working directory as branch c
15615
41885892796e branch: warn on branching
Matt Mackall <mpm@selenic.com>
parents: 12365
diff changeset
   122
  (branches are permanent and global, did you want a bookmark?)
12072
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   123
  $ hg commit -m "Adding c branch"
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   124
  $ heads
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   125
  7: Adding c branch (c)
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   126
  6: Merging b branch head 2 and b branch head 3 (b)
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   127
  3: Adding b branch head 1 (b)
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   128
  1: Adding a branch (a)
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   129
  0: Adding root node ()
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   130
-------
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   131
  $ heads .
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   132
  7: Adding c branch (c)
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   133
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   134
=======
4648
8e503fa54d2d Add option to heads to show only heads for current branch.
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
   135
12072
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   136
  $ heads -r 3 .
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   137
  no open branch heads found on branches c (started at 3)
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12072
diff changeset
   138
  [1]
12072
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   139
  $ heads -r 2 .
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   140
  7: Adding c branch (c)
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   141
-------
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   142
  $ hg update -C 4
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   143
  0 files updated, 0 files merged, 2 files removed, 0 files unresolved
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   144
-------
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   145
  $ heads -r 3 .
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   146
  3: Adding b branch head 1 (b)
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   147
-------
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   148
  $ heads -r 2 .
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   149
  6: Merging b branch head 2 and b branch head 3 (b)
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   150
  3: Adding b branch head 1 (b)
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   151
-------
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   152
  $ heads -r 7 .
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   153
  no open branch heads found on branches b (started at 7)
12316
4134686b83e1 tests: add exit codes to unified tests
Matt Mackall <mpm@selenic.com>
parents: 12072
diff changeset
   154
  [1]
4648
8e503fa54d2d Add option to heads to show only heads for current branch.
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
   155
12072
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   156
=======
4648
8e503fa54d2d Add option to heads to show only heads for current branch.
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
   157
12072
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   158
  $ for i in 0 1 2 3 4 5 6 7; do
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   159
  >     hg update -C "$i"
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   160
  >     heads
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   161
  >     echo '-------'
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   162
  >     heads .
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   163
  >     echo '-------'
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   164
  > done
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   165
  0 files updated, 0 files merged, 2 files removed, 0 files unresolved
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   166
  7: Adding c branch (c)
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   167
  6: Merging b branch head 2 and b branch head 3 (b)
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   168
  3: Adding b branch head 1 (b)
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   169
  1: Adding a branch (a)
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   170
  0: Adding root node ()
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   171
  -------
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   172
  0: Adding root node ()
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   173
  -------
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   174
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   175
  7: Adding c branch (c)
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   176
  6: Merging b branch head 2 and b branch head 3 (b)
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   177
  3: Adding b branch head 1 (b)
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   178
  1: Adding a branch (a)
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   179
  0: Adding root node ()
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   180
  -------
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   181
  1: Adding a branch (a)
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   182
  -------
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   183
  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   184
  7: Adding c branch (c)
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   185
  6: Merging b branch head 2 and b branch head 3 (b)
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   186
  3: Adding b branch head 1 (b)
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   187
  1: Adding a branch (a)
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   188
  0: Adding root node ()
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   189
  -------
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   190
  6: Merging b branch head 2 and b branch head 3 (b)
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   191
  3: Adding b branch head 1 (b)
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   192
  -------
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   193
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   194
  7: Adding c branch (c)
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   195
  6: Merging b branch head 2 and b branch head 3 (b)
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   196
  3: Adding b branch head 1 (b)
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   197
  1: Adding a branch (a)
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   198
  0: Adding root node ()
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   199
  -------
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   200
  6: Merging b branch head 2 and b branch head 3 (b)
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   201
  3: Adding b branch head 1 (b)
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   202
  -------
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   203
  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   204
  7: Adding c branch (c)
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   205
  6: Merging b branch head 2 and b branch head 3 (b)
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   206
  3: Adding b branch head 1 (b)
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   207
  1: Adding a branch (a)
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   208
  0: Adding root node ()
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   209
  -------
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   210
  6: Merging b branch head 2 and b branch head 3 (b)
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   211
  3: Adding b branch head 1 (b)
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   212
  -------
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   213
  1 files updated, 0 files merged, 1 files removed, 0 files unresolved
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   214
  7: Adding c branch (c)
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   215
  6: Merging b branch head 2 and b branch head 3 (b)
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   216
  3: Adding b branch head 1 (b)
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   217
  1: Adding a branch (a)
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   218
  0: Adding root node ()
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   219
  -------
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   220
  6: Merging b branch head 2 and b branch head 3 (b)
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   221
  3: Adding b branch head 1 (b)
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   222
  -------
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   223
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   224
  7: Adding c branch (c)
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   225
  6: Merging b branch head 2 and b branch head 3 (b)
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   226
  3: Adding b branch head 1 (b)
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   227
  1: Adding a branch (a)
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   228
  0: Adding root node ()
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   229
  -------
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   230
  6: Merging b branch head 2 and b branch head 3 (b)
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   231
  3: Adding b branch head 1 (b)
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   232
  -------
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   233
  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   234
  7: Adding c branch (c)
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   235
  6: Merging b branch head 2 and b branch head 3 (b)
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   236
  3: Adding b branch head 1 (b)
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   237
  1: Adding a branch (a)
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   238
  0: Adding root node ()
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   239
  -------
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   240
  7: Adding c branch (c)
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   241
  -------
4648
8e503fa54d2d Add option to heads to show only heads for current branch.
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
   242
12072
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   243
=======
4648
8e503fa54d2d Add option to heads to show only heads for current branch.
Eric Hopper <hopper@omnifarious.org>
parents:
diff changeset
   244
12072
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   245
  $ for i in a b c z; do
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   246
  >     heads "$i"
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   247
  >     echo '-------'
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   248
  > done
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   249
  1: Adding a branch (a)
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   250
  -------
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   251
  6: Merging b branch head 2 and b branch head 3 (b)
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   252
  3: Adding b branch head 1 (b)
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   253
  -------
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   254
  7: Adding c branch (c)
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   255
  -------
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   256
  abort: unknown revision 'z'!
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   257
  -------
11318
7d780c04f074 commit: add tests for the 'created new head' message
Gilles Moris <gilles.moris@free.fr>
parents: 10350
diff changeset
   258
12072
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   259
=======
11318
7d780c04f074 commit: add tests for the 'created new head' message
Gilles Moris <gilles.moris@free.fr>
parents: 10350
diff changeset
   260
12072
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   261
  $ heads 0 1 2 3 4 5 6 7
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   262
  7: Adding c branch (c)
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   263
  6: Merging b branch head 2 and b branch head 3 (b)
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   264
  3: Adding b branch head 1 (b)
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   265
  1: Adding a branch (a)
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   266
  0: Adding root node ()
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   267
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   268
Topological heads:
11318
7d780c04f074 commit: add tests for the 'created new head' message
Gilles Moris <gilles.moris@free.fr>
parents: 10350
diff changeset
   269
12072
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   270
  $ heads -t
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   271
  7: Adding c branch (c)
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   272
  3: Adding b branch head 1 (b)
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   273
  1: Adding a branch (a)
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   274
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   275
  $ cd ..
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   276
______________
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   277
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   278
"created new head" message tests
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   279
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   280
  $ hg init newheadmsg
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   281
  $ cd newheadmsg
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   282
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   283
Init: no msg
11318
7d780c04f074 commit: add tests for the 'created new head' message
Gilles Moris <gilles.moris@free.fr>
parents: 10350
diff changeset
   284
12072
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   285
  $ echo 1 > a
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   286
  $ hg ci -Am "a0: Initial root"
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   287
  adding a
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   288
  $ echo 2 >> a
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   289
  $ hg ci -m "a1 (HN)"
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   290
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   291
  $ hg branch b
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   292
  marked working directory as branch b
15615
41885892796e branch: warn on branching
Matt Mackall <mpm@selenic.com>
parents: 12365
diff changeset
   293
  (branches are permanent and global, did you want a bookmark?)
12072
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   294
  $ echo 1 > b
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   295
  $ hg ci -Am "b2: Initial root for branch b"
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   296
  adding b
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   297
  $ echo 2 >> b
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   298
  $ hg ci -m "b3 (HN)"
11318
7d780c04f074 commit: add tests for the 'created new head' message
Gilles Moris <gilles.moris@free.fr>
parents: 10350
diff changeset
   299
12072
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   300
Case NN: msg
11318
7d780c04f074 commit: add tests for the 'created new head' message
Gilles Moris <gilles.moris@free.fr>
parents: 10350
diff changeset
   301
12072
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   302
  $ hg up -q null
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   303
  $ hg branch -f b
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   304
  marked working directory as branch b
15615
41885892796e branch: warn on branching
Matt Mackall <mpm@selenic.com>
parents: 12365
diff changeset
   305
  (branches are permanent and global, did you want a bookmark?)
12072
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   306
  $ echo 1 > bb
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   307
  $ hg ci -Am "b4 (NN): new topo root for branch b"
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   308
  adding bb
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   309
  created new head
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   310
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   311
Case HN: no msg
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   312
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   313
  $ echo 2 >> bb
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   314
  $ hg ci -m "b5 (HN)"
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   315
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   316
Case BN: msg
11318
7d780c04f074 commit: add tests for the 'created new head' message
Gilles Moris <gilles.moris@free.fr>
parents: 10350
diff changeset
   317
12072
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   318
  $ hg branch -f default
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   319
  marked working directory as branch default
15615
41885892796e branch: warn on branching
Matt Mackall <mpm@selenic.com>
parents: 12365
diff changeset
   320
  (branches are permanent and global, did you want a bookmark?)
12072
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   321
  $ echo 1 > aa
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   322
  $ hg ci -Am "a6 (BN): new branch root"
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   323
  adding aa
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   324
  created new head
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   325
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   326
Case CN: msg
11318
7d780c04f074 commit: add tests for the 'created new head' message
Gilles Moris <gilles.moris@free.fr>
parents: 10350
diff changeset
   327
12072
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   328
  $ hg up -q 4
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   329
  $ echo 3 >> bbb
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   330
  $ hg ci -Am "b7 (CN): regular new head"
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   331
  adding bbb
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   332
  created new head
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   333
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   334
Case BB: msg
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   335
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   336
  $ hg up -q 4
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   337
  $ hg merge -q 3
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   338
  $ hg branch -f default
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   339
  marked working directory as branch default
15615
41885892796e branch: warn on branching
Matt Mackall <mpm@selenic.com>
parents: 12365
diff changeset
   340
  (branches are permanent and global, did you want a bookmark?)
12072
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   341
  $ hg ci -m "a8 (BB): weird new branch root"
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   342
  created new head
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   343
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   344
Case CB: msg
11318
7d780c04f074 commit: add tests for the 'created new head' message
Gilles Moris <gilles.moris@free.fr>
parents: 10350
diff changeset
   345
12072
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   346
  $ hg up -q 4
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   347
  $ hg merge -q 1
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   348
  $ hg ci -m "b9 (CB): new head from branch merge"
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   349
  created new head
11318
7d780c04f074 commit: add tests for the 'created new head' message
Gilles Moris <gilles.moris@free.fr>
parents: 10350
diff changeset
   350
12072
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   351
Case HB: no msg
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   352
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   353
  $ hg up -q 7
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   354
  $ hg merge -q 6
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   355
  $ hg ci -m "b10 (HB): continuing head from branch merge"
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   356
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   357
Case CC: msg
11318
7d780c04f074 commit: add tests for the 'created new head' message
Gilles Moris <gilles.moris@free.fr>
parents: 10350
diff changeset
   358
12072
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   359
  $ hg up -q 4
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   360
  $ hg merge -q 2
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   361
  $ hg ci -m "b11 (CC): new head from merge"
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   362
  created new head
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   363
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   364
Case CH: no msg
11318
7d780c04f074 commit: add tests for the 'created new head' message
Gilles Moris <gilles.moris@free.fr>
parents: 10350
diff changeset
   365
12072
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   366
  $ hg up -q 2
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   367
  $ hg merge -q 10
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   368
  $ hg ci -m "b12 (CH): continuing head from merge"
11318
7d780c04f074 commit: add tests for the 'created new head' message
Gilles Moris <gilles.moris@free.fr>
parents: 10350
diff changeset
   369
12072
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   370
Case HH: no msg
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   371
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   372
  $ hg merge -q 3
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   373
  $ hg ci -m "b12 (HH): merging two heads"
010025717202 tests: unify test-bheads
Adrian Buehlmann <adrian@cadifra.com>
parents: 11543
diff changeset
   374
16913
f2719b387380 tests: add missing trailing 'cd ..'
Mads Kiilerich <mads@kiilerich.com>
parents: 15615
diff changeset
   375
  $ cd ..