diff --git a/tests/test-impexp-branch.t b/tests/test-impexp-branch.t --- a/tests/test-impexp-branch.t +++ b/tests/test-impexp-branch.t @@ -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