Mercurial > hg-stable
changeset 6256:69c75d063c7a
merge: require --force when there are deleted files
author | Alexis S. L. Carvalho <alexis@cecm.usp.br> |
---|---|
date | Fri, 14 Mar 2008 09:56:58 -0300 |
parents | ae83d927c629 |
children | bfd49ce0db64 |
files | mercurial/merge.py tests/test-merge-force tests/test-merge-force.out |
diffstat | 3 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/merge.py Fri Mar 14 09:56:58 2008 -0300 +++ b/mercurial/merge.py Fri Mar 14 09:56:58 2008 -0300 @@ -609,7 +609,7 @@ raise util.Abort(_("update spans branches, use 'hg merge' " "or 'hg update -C' to lose changes")) if branchmerge and not forcemerge: - if wc.files(): + if wc.files() or wc.deleted(): raise util.Abort(_("outstanding uncommitted changes")) ### calculate phase
--- a/tests/test-merge-force Fri Mar 14 09:56:58 2008 -0300 +++ b/tests/test-merge-force Fri Mar 14 09:56:58 2008 -0300 @@ -17,7 +17,8 @@ rm a echo '% local deleted a file, remote removed' -hg -v merge +hg merge # should fail, since there are deleted files +hg -v merge --force echo % should show a as removed hg st
--- a/tests/test-merge-force.out Fri Mar 14 09:56:58 2008 -0300 +++ b/tests/test-merge-force.out Fri Mar 14 09:56:58 2008 -0300 @@ -1,4 +1,5 @@ % local deleted a file, remote removed +abort: outstanding uncommitted changes resolving manifests removing a 0 files updated, 0 files merged, 1 files removed, 0 files unresolved