tests/test-newbranch.out
author Henrik Stuart <henrik.stuart@edlund.dk>
Sat, 23 May 2009 17:02:49 +0200
changeset 8562 e3495c399006
parent 7654 816b708f23af
child 8959 970506870efb
permissions -rw-r--r--
named branches: server branchmap wire protocol support (issue736) The repository command, 'branchmap', returns a dictionary, branchname -> [branchheads], and will be implemented for localrepo, httprepo and sshrepo. The following wire format is used for returning data: branchname1 branch1head2 branch1head2 ... branchname2 ... ... Branch names are URL encoded to escape white space, and branch heads are sent as hex encoded node ids. All branches and all their heads are sent. The background and motivation for this command is the desire for a richer named branch semantics when pushing changesets. The details are explained in the original proposal which is included below. 1. BACKGROUND The algorithm currently implemented in Mercurial only considers the graph theoretical heads when determining whether new heads are created, rather than using the branch heads as a count (the algorithm considers a branch head effectively closed when it is merged into another branch or a new named branch is started from that point onward). Our particular problem with the algorithm is that we'd like to see the following case working without forcing a push: Upsteam has: (0:dev) ---- (1:dev) \ `--- (2:stable) Someone merges stable into dev: (0:dev) ---- (1:dev) ------(3:dev) \ / `--- (2:stable) --------´ This can be pushed without --force (as it should). Now someone else does some coding on stable (a bug fix, say): (0:dev) ---- (1:dev) ------(3:dev) \ / `--- (2:stable) ---------´---------(4:stable) This time we need --force to push. We allow this to be pushed without using --force by getting all the remote branch heads (by extending the wire protocol with a new function). We would, furthermore, also prefer if it is impossible to push a new branch without --force (or a later --newbranch option so --force isn't shoe-horned into too many disparate functions, if need be), except of course in the case where the remote repository is empty. This is what our patches accomplish. 2. ALTERNATIVES We have, of course, considered some alternatives to reconstructing enough information to decide whether we are creating new remote branch heads, before we added the new wire protocol command. 2.1. LOOKUP ON REMOTE The main alternative is to use the information from remote.heads() and remote.lookup() to try to reconstruct enough graph information to decide whether we are creating new heads. This is not adequate as illustrated below. Remember that each lookup is typically a request-response pair over SSH or HTTP(S). If we have a simple repository at the remote end like this: (0:dev) ---- (1:dev) ---- (3:stable) \ `--- (2:dev) then remote.heads() will yield [2, 3]. Assume we have nodes [0, 1, 2] locally and want to create a new node, 4:dev, as a descendant from (1:dev), which should be OK as 1:dev is a branch head. If we do remote.lookup('dev') we will get [2]. Thus, we can get information about whether a branch exists on the remote server or not, but this does not solve our problem of figuring out whether we are creating new heads or not. Pushing 4:dev ought to be OK, since after the push, we still only have two heads on branch a. Using remote.lookup() and remote.heads() is thus not adequate to consistently decide whether we are creating new remote heads (e.g. in this situation the latter would never return 1:dev). 2.2. USING INCOMING TO RECONSTRUCT THE GRAPH An alternative would be to use information equivalent to hg incoming to get the full remote graph in addition to the local graph. To do this, we would have to get a changegroup(subset) bundle representing the remote end (which may be a substantial amount of data), getting the branch heads from an instantiated bundlerepository, deleting the bundle, and finally, we can compute the prepush logic. While this is backwards compatible, it will cause a possibly substantial slowdown of the push command as it first needs to pull in all changes. 3. FURTHER ARGUMENTS IN FAVOUR OF THE BRANCHMAP WIRE-PROTOCOL EXTENSION Currently, the commands incoming and pull, work based on the tip of a given branch if used with "-r branchname", making it hard to get all revisions of a certain branch only (if it has multiple heads). This can be solved by requesting the remote's branchheads and letting the revisions to be used with the command be these heads. This can be done by extending the commands with a new option, e.g.: hg pull -b branchname which will be turned into the equivalent of: hg pull -r branchhead1 -r branchhead2 -r branchhead3 We have a simple follow-up patch that can do this ready as well (although not submitted yet as it is pending the acceptance of the branch patch). 4. WRAP-UP We generally find that the branchmap wire protocol extension can provide better named branch support to Mercurial. Currently, some things, like the initial push scenario in this mail, are fairly counter-intuitive, and the more often you have to force push, the more it is likely you will get a lot of spurious and unnecessary merge nodes. Also, restricting incoming and pull to all changes on a branch rather than changes on the tip-most head would be a sensible extension to making named branches a first class citizen in Mercurial. Currently, named branches sometimes feel like a late-coming unwanted step-child. We have run it in a production environment for a while, with fewer multiple heads occurring in our repositories and fewer confused users as a result. Also, it fixes the long-standing issue 736. Co-contributor: Sune Foldager <cryo@cyanite.org>
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
4602
d9d177ef748a Fix up tests for new branch message
Brendan Cully <brendan@kublai.com>
parents: 4410
diff changeset
     1
marked working directory as branch foo
3502
8dc14d630b29 add branch and branches commands
Matt Mackall <mpm@selenic.com>
parents: 3451
diff changeset
     2
foo
4602
d9d177ef748a Fix up tests for new branch message
Brendan Cully <brendan@kublai.com>
parents: 4410
diff changeset
     3
marked working directory as branch bar
4203
aee3d312c32e Add test for branch shadowing
Brendan Cully <brendan@kublai.com>
parents: 4175
diff changeset
     4
% branch shadowing
aee3d312c32e Add test for branch shadowing
Brendan Cully <brendan@kublai.com>
parents: 4175
diff changeset
     5
abort: a branch of the same name already exists (use --force to override)
4602
d9d177ef748a Fix up tests for new branch message
Brendan Cully <brendan@kublai.com>
parents: 4410
diff changeset
     6
marked working directory as branch default
3420
2576b6731524 Add some basic branch name tests
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
     7
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
2576b6731524 Add some basic branch name tests
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
     8
foo
6336
4b0c9c674707 warn about new heads on commit (issue842)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 6056
diff changeset
     9
created new head
3420
2576b6731524 Add some basic branch name tests
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    10
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
2576b6731524 Add some basic branch name tests
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    11
(branch merge, don't forget to commit)
2576b6731524 Add some basic branch name tests
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    12
foo
3760
aeafd80c1e78 small fixes for test-newbranch
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3502
diff changeset
    13
changeset:   5:5f8fb06e083e
3420
2576b6731524 Add some basic branch name tests
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    14
branch:      foo
2576b6731524 Add some basic branch name tests
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    15
tag:         tip
3760
aeafd80c1e78 small fixes for test-newbranch
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3502
diff changeset
    16
parent:      4:4909a3732169
aeafd80c1e78 small fixes for test-newbranch
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3502
diff changeset
    17
parent:      3:bf1bc2f45e83
3420
2576b6731524 Add some basic branch name tests
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    18
user:        test
3760
aeafd80c1e78 small fixes for test-newbranch
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3502
diff changeset
    19
date:        Mon Jan 12 13:46:40 1970 +0000
3420
2576b6731524 Add some basic branch name tests
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    20
summary:     merge
2576b6731524 Add some basic branch name tests
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    21
3760
aeafd80c1e78 small fixes for test-newbranch
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3502
diff changeset
    22
changeset:   4:4909a3732169
3420
2576b6731524 Add some basic branch name tests
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    23
branch:      foo
3760
aeafd80c1e78 small fixes for test-newbranch
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3502
diff changeset
    24
parent:      1:b699b1cec9c2
3420
2576b6731524 Add some basic branch name tests
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    25
user:        test
3760
aeafd80c1e78 small fixes for test-newbranch
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3502
diff changeset
    26
date:        Mon Jan 12 13:46:40 1970 +0000
3420
2576b6731524 Add some basic branch name tests
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    27
summary:     modify a branch
2576b6731524 Add some basic branch name tests
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    28
3760
aeafd80c1e78 small fixes for test-newbranch
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3502
diff changeset
    29
changeset:   3:bf1bc2f45e83
3420
2576b6731524 Add some basic branch name tests
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    30
user:        test
3760
aeafd80c1e78 small fixes for test-newbranch
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3502
diff changeset
    31
date:        Mon Jan 12 13:46:40 1970 +0000
3420
2576b6731524 Add some basic branch name tests
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    32
summary:     clear branch name
2576b6731524 Add some basic branch name tests
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    33
3760
aeafd80c1e78 small fixes for test-newbranch
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3502
diff changeset
    34
changeset:   2:67ec16bde7f1
3420
2576b6731524 Add some basic branch name tests
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    35
branch:      bar
2576b6731524 Add some basic branch name tests
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    36
user:        test
3760
aeafd80c1e78 small fixes for test-newbranch
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3502
diff changeset
    37
date:        Mon Jan 12 13:46:40 1970 +0000
3420
2576b6731524 Add some basic branch name tests
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    38
summary:     change branch name
2576b6731524 Add some basic branch name tests
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    39
3760
aeafd80c1e78 small fixes for test-newbranch
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3502
diff changeset
    40
changeset:   1:b699b1cec9c2
3420
2576b6731524 Add some basic branch name tests
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    41
branch:      foo
2576b6731524 Add some basic branch name tests
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    42
user:        test
3760
aeafd80c1e78 small fixes for test-newbranch
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3502
diff changeset
    43
date:        Mon Jan 12 13:46:40 1970 +0000
3420
2576b6731524 Add some basic branch name tests
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    44
summary:     add branch name
2576b6731524 Add some basic branch name tests
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    45
3760
aeafd80c1e78 small fixes for test-newbranch
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3502
diff changeset
    46
changeset:   0:be8523e69bf8
3420
2576b6731524 Add some basic branch name tests
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    47
user:        test
3760
aeafd80c1e78 small fixes for test-newbranch
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3502
diff changeset
    48
date:        Mon Jan 12 13:46:40 1970 +0000
3420
2576b6731524 Add some basic branch name tests
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    49
summary:     initial
2576b6731524 Add some basic branch name tests
Matt Mackall <mpm@selenic.com>
parents:
diff changeset
    50
3760
aeafd80c1e78 small fixes for test-newbranch
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3502
diff changeset
    51
foo                            5:5f8fb06e083e
4675
6858a7477a5e Change branches to sort 'active' branches first, and add an option to show only active branches.
Eric Hopper <hopper@omnifarious.org>
parents: 4623
diff changeset
    52
default                        3:bf1bc2f45e83 (inactive)
6858a7477a5e Change branches to sort 'active' branches first, and add an option to show only active branches.
Eric Hopper <hopper@omnifarious.org>
parents: 4623
diff changeset
    53
bar                            2:67ec16bde7f1 (inactive)
3502
8dc14d630b29 add branch and branches commands
Matt Mackall <mpm@selenic.com>
parents: 3451
diff changeset
    54
foo
4176
f9bbcebcacea "default" is the default branch name
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4175
diff changeset
    55
default
3502
8dc14d630b29 add branch and branches commands
Matt Mackall <mpm@selenic.com>
parents: 3451
diff changeset
    56
bar
3451
196baf20232b Add test for invalid branch cache (fixed by 27ebe4efe98e)
Thomas Arendsen Hein <thomas@intevation.de>
parents: 3420
diff changeset
    57
% test for invalid branch cache
196baf20232b Add test for invalid branch cache (fixed by 27ebe4efe98e)
Thomas Arendsen Hein <thomas@intevation.de>
parents: 3420
diff changeset
    58
rolling back last transaction
3760
aeafd80c1e78 small fixes for test-newbranch
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3502
diff changeset
    59
changeset:   4:4909a3732169
3451
196baf20232b Add test for invalid branch cache (fixed by 27ebe4efe98e)
Thomas Arendsen Hein <thomas@intevation.de>
parents: 3420
diff changeset
    60
branch:      foo
196baf20232b Add test for invalid branch cache (fixed by 27ebe4efe98e)
Thomas Arendsen Hein <thomas@intevation.de>
parents: 3420
diff changeset
    61
tag:         tip
3760
aeafd80c1e78 small fixes for test-newbranch
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3502
diff changeset
    62
parent:      1:b699b1cec9c2
3451
196baf20232b Add test for invalid branch cache (fixed by 27ebe4efe98e)
Thomas Arendsen Hein <thomas@intevation.de>
parents: 3420
diff changeset
    63
user:        test
3760
aeafd80c1e78 small fixes for test-newbranch
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3502
diff changeset
    64
date:        Mon Jan 12 13:46:40 1970 +0000
3451
196baf20232b Add test for invalid branch cache (fixed by 27ebe4efe98e)
Thomas Arendsen Hein <thomas@intevation.de>
parents: 3420
diff changeset
    65
summary:     modify a branch
196baf20232b Add test for invalid branch cache (fixed by 27ebe4efe98e)
Thomas Arendsen Hein <thomas@intevation.de>
parents: 3420
diff changeset
    66
6056
0ad2ffbf6b38 Print less scary warning when invalidating the branch cache.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 5988
diff changeset
    67
invalidating branch cache (tip differs)
3761
9433bdcaa9ae Ignore all errors while parsing the branch cache.
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3760
diff changeset
    68
changeset:   4:4909a3732169c0c20011c4f4b8fdff4e3d89b23f
9433bdcaa9ae Ignore all errors while parsing the branch cache.
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3760
diff changeset
    69
branch:      foo
9433bdcaa9ae Ignore all errors while parsing the branch cache.
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3760
diff changeset
    70
tag:         tip
9433bdcaa9ae Ignore all errors while parsing the branch cache.
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3760
diff changeset
    71
parent:      1:b699b1cec9c2966b3700de4fef0dc123cd754c31
9433bdcaa9ae Ignore all errors while parsing the branch cache.
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3760
diff changeset
    72
parent:      -1:0000000000000000000000000000000000000000
9433bdcaa9ae Ignore all errors while parsing the branch cache.
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3760
diff changeset
    73
manifest:    4:d01b250baaa05909152f7ae07d7a649deea0df9a
9433bdcaa9ae Ignore all errors while parsing the branch cache.
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3760
diff changeset
    74
user:        test
9433bdcaa9ae Ignore all errors while parsing the branch cache.
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3760
diff changeset
    75
date:        Mon Jan 12 13:46:40 1970 +0000
9433bdcaa9ae Ignore all errors while parsing the branch cache.
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3760
diff changeset
    76
files:       a
9433bdcaa9ae Ignore all errors while parsing the branch cache.
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3760
diff changeset
    77
extra:       branch=foo
9433bdcaa9ae Ignore all errors while parsing the branch cache.
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3760
diff changeset
    78
description:
9433bdcaa9ae Ignore all errors while parsing the branch cache.
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3760
diff changeset
    79
modify a branch
9433bdcaa9ae Ignore all errors while parsing the branch cache.
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3760
diff changeset
    80
9433bdcaa9ae Ignore all errors while parsing the branch cache.
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3760
diff changeset
    81
9433bdcaa9ae Ignore all errors while parsing the branch cache.
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3760
diff changeset
    82
4:4909a3732169
9433bdcaa9ae Ignore all errors while parsing the branch cache.
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3760
diff changeset
    83
4909a3732169c0c20011c4f4b8fdff4e3d89b23f 4
7654
816b708f23af store all heads of a branch in the branch cache
John Mulligan <phlogistonjohn@asynchrono.us>
parents: 6723
diff changeset
    84
be8523e69bf892e25817fc97187516b3c0804ae4 default
4176
f9bbcebcacea "default" is the default branch name
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4175
diff changeset
    85
bf1bc2f45e834c75404d0ddab57d53beab56e2f8 default
3761
9433bdcaa9ae Ignore all errors while parsing the branch cache.
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3760
diff changeset
    86
4909a3732169c0c20011c4f4b8fdff4e3d89b23f foo
9433bdcaa9ae Ignore all errors while parsing the branch cache.
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 3760
diff changeset
    87
67ec16bde7f1575d523313b9bca000f6a6f12dca bar
5988
ee317dbfb9d0 update the branch cache at the end of addchangegroup
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4675
diff changeset
    88
% push should update the branch cache
ee317dbfb9d0 update the branch cache at the end of addchangegroup
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4675
diff changeset
    89
% pushing just rev 0
ee317dbfb9d0 update the branch cache at the end of addchangegroup
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4675
diff changeset
    90
be8523e69bf892e25817fc97187516b3c0804ae4 0
ee317dbfb9d0 update the branch cache at the end of addchangegroup
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4675
diff changeset
    91
be8523e69bf892e25817fc97187516b3c0804ae4 default
ee317dbfb9d0 update the branch cache at the end of addchangegroup
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4675
diff changeset
    92
% pushing everything
ee317dbfb9d0 update the branch cache at the end of addchangegroup
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4675
diff changeset
    93
4909a3732169c0c20011c4f4b8fdff4e3d89b23f 4
7654
816b708f23af store all heads of a branch in the branch cache
John Mulligan <phlogistonjohn@asynchrono.us>
parents: 6723
diff changeset
    94
be8523e69bf892e25817fc97187516b3c0804ae4 default
5988
ee317dbfb9d0 update the branch cache at the end of addchangegroup
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4675
diff changeset
    95
bf1bc2f45e834c75404d0ddab57d53beab56e2f8 default
ee317dbfb9d0 update the branch cache at the end of addchangegroup
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4675
diff changeset
    96
4909a3732169c0c20011c4f4b8fdff4e3d89b23f foo
ee317dbfb9d0 update the branch cache at the end of addchangegroup
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4675
diff changeset
    97
67ec16bde7f1575d523313b9bca000f6a6f12dca bar
4175
fc12ac3755d5 Test update to branch tip
Brendan Cully <brendan@kublai.com>
parents: 4169
diff changeset
    98
% update with no arguments: tipmost revision of the current branch
fc12ac3755d5 Test update to branch tip
Brendan Cully <brendan@kublai.com>
parents: 4169
diff changeset
    99
bf1bc2f45e83
fc12ac3755d5 Test update to branch tip
Brendan Cully <brendan@kublai.com>
parents: 4169
diff changeset
   100
4909a3732169 (foo) tip
4602
d9d177ef748a Fix up tests for new branch message
Brendan Cully <brendan@kublai.com>
parents: 4410
diff changeset
   101
marked working directory as branch foobar
4231
83153299aab5 avoid a traceback with hg branch newbranch; hg up
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4177
diff changeset
   102
abort: branch foobar not found
4410
bbc97d419b16 Add fast-forward branch merging
Brendan Cully <brendan@kublai.com>
parents: 4232
diff changeset
   103
% fastforward merge
4602
d9d177ef748a Fix up tests for new branch message
Brendan Cully <brendan@kublai.com>
parents: 4410
diff changeset
   104
marked working directory as branch ff
4410
bbc97d419b16 Add fast-forward branch merging
Brendan Cully <brendan@kublai.com>
parents: 4232
diff changeset
   105
adding ff
bbc97d419b16 Add fast-forward branch merging
Brendan Cully <brendan@kublai.com>
parents: 4232
diff changeset
   106
0 files updated, 0 files merged, 1 files removed, 0 files unresolved
bbc97d419b16 Add fast-forward branch merging
Brendan Cully <brendan@kublai.com>
parents: 4232
diff changeset
   107
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
bbc97d419b16 Add fast-forward branch merging
Brendan Cully <brendan@kublai.com>
parents: 4232
diff changeset
   108
(branch merge, don't forget to commit)
bbc97d419b16 Add fast-forward branch merging
Brendan Cully <brendan@kublai.com>
parents: 4232
diff changeset
   109
foo
4623
66ed92ed115a Make fast-forward merges full merges
Brendan Cully <brendan@kublai.com>
parents: 4602
diff changeset
   110
changeset:   6:f0c74f92a385
4410
bbc97d419b16 Add fast-forward branch merging
Brendan Cully <brendan@kublai.com>
parents: 4232
diff changeset
   111
branch:      foo
bbc97d419b16 Add fast-forward branch merging
Brendan Cully <brendan@kublai.com>
parents: 4232
diff changeset
   112
tag:         tip
4623
66ed92ed115a Make fast-forward merges full merges
Brendan Cully <brendan@kublai.com>
parents: 4602
diff changeset
   113
parent:      4:4909a3732169
66ed92ed115a Make fast-forward merges full merges
Brendan Cully <brendan@kublai.com>
parents: 4602
diff changeset
   114
parent:      5:c420d2121b71
4410
bbc97d419b16 Add fast-forward branch merging
Brendan Cully <brendan@kublai.com>
parents: 4232
diff changeset
   115
user:        test
bbc97d419b16 Add fast-forward branch merging
Brendan Cully <brendan@kublai.com>
parents: 4232
diff changeset
   116
date:        Mon Jan 12 13:46:40 1970 +0000
bbc97d419b16 Add fast-forward branch merging
Brendan Cully <brendan@kublai.com>
parents: 4232
diff changeset
   117
summary:     Merge ff into foo
bbc97d419b16 Add fast-forward branch merging
Brendan Cully <brendan@kublai.com>
parents: 4232
diff changeset
   118
bbc97d419b16 Add fast-forward branch merging
Brendan Cully <brendan@kublai.com>
parents: 4232
diff changeset
   119
a
bbc97d419b16 Add fast-forward branch merging
Brendan Cully <brendan@kublai.com>
parents: 4232
diff changeset
   120
ff
6723
1fe6f365df2e merge: only in-branch merges can be implicit
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 6336
diff changeset
   121
% test merging, add 3 default heads and one test head
1fe6f365df2e merge: only in-branch merges can be implicit
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 6336
diff changeset
   122
adding a
1fe6f365df2e merge: only in-branch merges can be implicit
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 6336
diff changeset
   123
adding b
1fe6f365df2e merge: only in-branch merges can be implicit
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 6336
diff changeset
   124
0 files updated, 0 files merged, 1 files removed, 0 files unresolved
1fe6f365df2e merge: only in-branch merges can be implicit
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 6336
diff changeset
   125
adding c
1fe6f365df2e merge: only in-branch merges can be implicit
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 6336
diff changeset
   126
created new head
1fe6f365df2e merge: only in-branch merges can be implicit
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 6336
diff changeset
   127
0 files updated, 0 files merged, 1 files removed, 0 files unresolved
1fe6f365df2e merge: only in-branch merges can be implicit
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 6336
diff changeset
   128
adding d
1fe6f365df2e merge: only in-branch merges can be implicit
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 6336
diff changeset
   129
created new head
1fe6f365df2e merge: only in-branch merges can be implicit
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 6336
diff changeset
   130
0 files updated, 0 files merged, 1 files removed, 0 files unresolved
1fe6f365df2e merge: only in-branch merges can be implicit
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 6336
diff changeset
   131
marked working directory as branch test
1fe6f365df2e merge: only in-branch merges can be implicit
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 6336
diff changeset
   132
adding e
1fe6f365df2e merge: only in-branch merges can be implicit
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 6336
diff changeset
   133
created new head
1fe6f365df2e merge: only in-branch merges can be implicit
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 6336
diff changeset
   134
changeset:   4:3a1e01ed1df4
1fe6f365df2e merge: only in-branch merges can be implicit
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 6336
diff changeset
   135
branch:      test
1fe6f365df2e merge: only in-branch merges can be implicit
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 6336
diff changeset
   136
tag:         tip
1fe6f365df2e merge: only in-branch merges can be implicit
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 6336
diff changeset
   137
parent:      0:cb9a9f314b8b
1fe6f365df2e merge: only in-branch merges can be implicit
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 6336
diff changeset
   138
user:        test
1fe6f365df2e merge: only in-branch merges can be implicit
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 6336
diff changeset
   139
date:        Thu Jan 01 00:00:00 1970 +0000
1fe6f365df2e merge: only in-branch merges can be implicit
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 6336
diff changeset
   140
summary:     e
1fe6f365df2e merge: only in-branch merges can be implicit
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 6336
diff changeset
   141
1fe6f365df2e merge: only in-branch merges can be implicit
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 6336
diff changeset
   142
changeset:   3:980f7dc84c29
1fe6f365df2e merge: only in-branch merges can be implicit
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 6336
diff changeset
   143
parent:      0:cb9a9f314b8b
1fe6f365df2e merge: only in-branch merges can be implicit
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 6336
diff changeset
   144
user:        test
1fe6f365df2e merge: only in-branch merges can be implicit
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 6336
diff changeset
   145
date:        Thu Jan 01 00:00:00 1970 +0000
1fe6f365df2e merge: only in-branch merges can be implicit
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 6336
diff changeset
   146
summary:     d
1fe6f365df2e merge: only in-branch merges can be implicit
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 6336
diff changeset
   147
1fe6f365df2e merge: only in-branch merges can be implicit
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 6336
diff changeset
   148
changeset:   2:d36c0562f908
1fe6f365df2e merge: only in-branch merges can be implicit
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 6336
diff changeset
   149
parent:      0:cb9a9f314b8b
1fe6f365df2e merge: only in-branch merges can be implicit
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 6336
diff changeset
   150
user:        test
1fe6f365df2e merge: only in-branch merges can be implicit
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 6336
diff changeset
   151
date:        Thu Jan 01 00:00:00 1970 +0000
1fe6f365df2e merge: only in-branch merges can be implicit
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 6336
diff changeset
   152
summary:     c
1fe6f365df2e merge: only in-branch merges can be implicit
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 6336
diff changeset
   153
1fe6f365df2e merge: only in-branch merges can be implicit
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 6336
diff changeset
   154
changeset:   1:d2ae7f538514
1fe6f365df2e merge: only in-branch merges can be implicit
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 6336
diff changeset
   155
user:        test
1fe6f365df2e merge: only in-branch merges can be implicit
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 6336
diff changeset
   156
date:        Thu Jan 01 00:00:00 1970 +0000
1fe6f365df2e merge: only in-branch merges can be implicit
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 6336
diff changeset
   157
summary:     b
1fe6f365df2e merge: only in-branch merges can be implicit
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 6336
diff changeset
   158
1fe6f365df2e merge: only in-branch merges can be implicit
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 6336
diff changeset
   159
changeset:   0:cb9a9f314b8b
1fe6f365df2e merge: only in-branch merges can be implicit
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 6336
diff changeset
   160
user:        test
1fe6f365df2e merge: only in-branch merges can be implicit
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 6336
diff changeset
   161
date:        Thu Jan 01 00:00:00 1970 +0000
1fe6f365df2e merge: only in-branch merges can be implicit
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 6336
diff changeset
   162
summary:     a
1fe6f365df2e merge: only in-branch merges can be implicit
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 6336
diff changeset
   163
1fe6f365df2e merge: only in-branch merges can be implicit
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 6336
diff changeset
   164
% implicit merge with test branch as parent
1fe6f365df2e merge: only in-branch merges can be implicit
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 6336
diff changeset
   165
abort: branch 'test' has one head - please merge with an explicit rev
1fe6f365df2e merge: only in-branch merges can be implicit
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 6336
diff changeset
   166
1 files updated, 0 files merged, 1 files removed, 0 files unresolved
1fe6f365df2e merge: only in-branch merges can be implicit
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 6336
diff changeset
   167
% implicit merge with default branch as parent
1fe6f365df2e merge: only in-branch merges can be implicit
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 6336
diff changeset
   168
abort: branch 'default' has 3 heads - please merge with an explicit rev
1fe6f365df2e merge: only in-branch merges can be implicit
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 6336
diff changeset
   169
% 3 branch heads, explicit merge required
1fe6f365df2e merge: only in-branch merges can be implicit
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 6336
diff changeset
   170
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1fe6f365df2e merge: only in-branch merges can be implicit
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 6336
diff changeset
   171
(branch merge, don't forget to commit)
1fe6f365df2e merge: only in-branch merges can be implicit
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 6336
diff changeset
   172
% 2 branch heads, implicit merge works
1fe6f365df2e merge: only in-branch merges can be implicit
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 6336
diff changeset
   173
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
1fe6f365df2e merge: only in-branch merges can be implicit
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 6336
diff changeset
   174
(branch merge, don't forget to commit)