Mercurial > hg-stable
changeset 14126:fbbe9239574a
tests: export patches only once in test-impexp-branch
author | Nicolas Dumazet <nicdumz.commits@gmail.com> |
---|---|
date | Sun, 01 May 2011 10:51:10 +0200 |
parents | 2852843947da |
children | f45c8db21749 |
files | tests/test-impexp-branch.t |
diffstat | 1 files changed, 20 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- a/tests/test-impexp-branch.t Sat Apr 30 18:31:28 2011 +0200 +++ b/tests/test-impexp-branch.t Sun May 01 10:51:10 2011 +0200 @@ -11,6 +11,7 @@ > sys.exit(0) > sys.exit(1) > EOF + $ hg init a $ cd a $ echo "Rev 1" >rev @@ -20,11 +21,17 @@ marked working directory as branch abranch $ echo "Rev 2" >rev $ hg commit -m "With branch." - $ if hg export 0 | python ../findbranch.py; then + + $ hg export 0 > ../r0.patch + $ hg export 1 > ../r1.patch + $ cd .. + + $ if python findbranch.py < r0.patch; then > echo "Export of default branch revision has Branch header" 1>&2 > exit 1 > fi - $ if hg export 1 | python ../findbranch.py; then + + $ if python findbranch.py < r1.patch; then > : # Do nothing > else > echo "Export of branch revision is missing Branch header" 1>&2 @@ -33,18 +40,17 @@ Make sure import still works with branch information in patches. - $ cd .. $ hg init b $ cd b - $ hg -R ../a export 0 | hg import - - applying patch from stdin - $ hg -R ../a export 1 | hg import - - applying patch from stdin + $ hg import ../r0.patch + applying ../r0.patch + $ hg import ../r1.patch + applying ../r1.patch $ cd .. - $ rm -rf b - $ hg init b - $ cd b - $ hg -R ../a export 0 | hg import --exact - - applying patch from stdin - $ hg -R ../a export 1 | hg import --exact - - applying patch from stdin + + $ hg init c + $ cd c + $ hg import --exact ../r0.patch + applying ../r0.patch + $ hg import --exact ../r1.patch + applying ../r1.patch