Mercurial > hg
comparison tests/test-merge-default.t @ 28103:7d852bb47b0a
merge: give priority to "not at head" failures for bare 'hg merge'
We refuse to pick a destination for a bare 'hg merge' if the working copy is not
at head. This is meant to prevent strange merge from user who forget to update.
(Moreover, such merge does not reduce actually the number of heads)
However, we were doing that as the last possible failure type. So user were
recommended to merge with an explicit head (from this bad location) if the
branch had too many heads.
We now make "not on branch heads" class of failure the first things to check
and fail on. The one test that change was actually trying to check for these
failure (and did not). The new test output is correct.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Mon, 08 Feb 2016 14:55:58 +0100 |
parents | 72072cfc7e91 |
children | 5476a7a039c0 |
comparison
equal
deleted
inserted
replaced
28102:bd74b5e0d2c0 | 28103:7d852bb47b0a |
---|---|
25 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | 25 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
26 | 26 |
27 Should fail because not at a head: | 27 Should fail because not at a head: |
28 | 28 |
29 $ hg merge | 29 $ hg merge |
30 abort: branch 'default' has 3 heads - please merge with an explicit rev | 30 abort: working directory not at a head revision |
31 (run 'hg heads .' to see heads) | 31 (use 'hg update' or merge with an explicit revision) |
32 [255] | 32 [255] |
33 | 33 |
34 $ hg up | 34 $ hg up |
35 1 files updated, 0 files merged, 0 files removed, 0 files unresolved | 35 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
36 2 other heads for branch "default" | 36 2 other heads for branch "default" |