Mercurial > public > mercurial-scm > hg
comparison mercurial/merge.py @ 4748:8808ea7da86b
merge: make test for fast-forward merge stricter (issue619)
don't allow merging with an ancestor
fix != on contexts
add a test
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Thu, 05 Jul 2007 13:34:18 -0500 |
parents | dc5920ea12f8 |
children | 9797124581c9 |
comparison
equal
deleted
inserted
replaced
4747:452d171a1b39 | 4748:8808ea7da86b |
---|---|
521 ### check phase | 521 ### check phase |
522 if not overwrite and len(pl) > 1: | 522 if not overwrite and len(pl) > 1: |
523 raise util.Abort(_("outstanding uncommitted merges")) | 523 raise util.Abort(_("outstanding uncommitted merges")) |
524 if pa == p1 or pa == p2: # is there a linear path from p1 to p2? | 524 if pa == p1 or pa == p2: # is there a linear path from p1 to p2? |
525 if branchmerge: | 525 if branchmerge: |
526 if p1.branch() != p2.branch(): | 526 if p1.branch() != p2.branch() and pa != p2: |
527 fastforward = True | 527 fastforward = True |
528 else: | 528 else: |
529 raise util.Abort(_("there is nothing to merge, just use " | 529 raise util.Abort(_("there is nothing to merge, just use " |
530 "'hg update' or look at 'hg heads'")) | 530 "'hg update' or look at 'hg heads'")) |
531 elif not (overwrite or branchmerge): | 531 elif not (overwrite or branchmerge): |