mirror of
https://github.com/facebook/sapling.git
synced 2024-10-12 09:48:05 +03:00
81bd0b7967
This backs out changeset: 13158:17d1b96c0f12 user: Mads Kiilerich <mads@kiilerich.com> date: Tue Dec 07 03:29:21 2010 +0100 summary: merge: fast-forward merge with descendant Before named branches, the invariants were: a) "merges" always have two parents b) p1 is not linearly related to p2 Adding named branches made (b) problematic, so the above patch was introduced, which fixed (b) but broke (a). After discussion, we decided that the invariants should be: a) "merges" always have two parents b) p1 is not linearly related to p2 OR p1 and p2 are on different branches
30 lines
565 B
Perl
30 lines
565 B
Perl
http://mercurial.selenic.com/bts/issue619
|
|
|
|
$ hg init
|
|
$ echo a > a
|
|
$ hg ci -Ama
|
|
adding a
|
|
|
|
$ echo b > b
|
|
$ hg branch b
|
|
marked working directory as branch b
|
|
$ hg ci -Amb
|
|
adding b
|
|
|
|
$ hg co -C 0
|
|
0 files updated, 0 files merged, 1 files removed, 0 files unresolved
|
|
|
|
Fast-forward:
|
|
|
|
$ hg merge b
|
|
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
|
(branch merge, don't forget to commit)
|
|
$ hg ci -Ammerge
|
|
|
|
Bogus fast-forward should fail:
|
|
|
|
$ hg merge b
|
|
abort: merging with a working directory ancestor has no effect
|
|
[255]
|
|
|