Mercurial > public > mercurial-scm > hg-stable
diff tests/test-mq @ 6554:3182602fa1fb
mq: don't commit local changes on pushing empty patch (issue1087)
author | Dirkjan Ochtman <dirkjan@ochtman.nl> |
---|---|
date | Wed, 16 Apr 2008 16:04:07 +0200 |
parents | 9db24a36d182 |
children | 550c53d66949 0ada66dcc259 |
line wrap: on
line diff
--- a/tests/test-mq Wed Apr 16 12:09:16 2008 +0200 +++ b/tests/test-mq Wed Apr 16 16:04:07 2008 +0200 @@ -497,3 +497,35 @@ hg qpop hg qpush cd .. + +echo % test qpush with --force, issue1087 +hg init forcepush +cd forcepush +echo hello > hello.txt +echo bye > bye.txt +hg ci -Ama +hg qnew -d '0 0' empty +hg qpop +echo world >> hello.txt + +echo % qpush should fail, local changes +hg qpush + +echo % apply force, should not discard changes with empty patch +hg qpush -f +hg diff --config diff.nodates=True +hg qdiff --config diff.nodates=True +hg log -l1 -p +hg qref -d '0 0' +hg qpop +echo universe >> hello.txt +echo universe >> bye.txt + +echo % qpush should fail, local changes +hg qpush + +echo % apply force, should discard changes in hello, but not bye +hg qpush -f +hg st +hg diff --config diff.nodates=True +hg qdiff --config diff.nodates=True