# HG changeset patch # User Pierre-Yves David # Date 1478145934 -3600 # Node ID 24ea470371868e6e7d543b0fa05320541fcd21c2 # Parent e9fca89c6d584a9285890269515377bc8f6e9a45 tests: simplify command script in 'test-push-r.t' I came across this code by chance. The script of this test is a bit messy with a lot of unnecessary intermediate commands. We simplify the script and unify repository access through '-R'. In the process the update after the unbundle is dropped as it does not add anything to the tests. diff -r e9fca89c6d58 -r 24ea47037186 tests/test-push-r.t --- a/tests/test-push-r.t Thu Nov 03 03:12:57 2016 +0530 +++ b/tests/test-push-r.t Thu Nov 03 05:05:34 2016 +0100 @@ -1,23 +1,16 @@ $ hg init test - $ cd test - $ hg unbundle "$TESTDIR/bundles/remote.hg" + $ hg -R test unbundle "$TESTDIR/bundles/remote.hg" adding changesets adding manifests adding file changes added 9 changesets with 7 changes to 4 files (+1 heads) (run 'hg heads' to see heads, 'hg merge' to merge) - $ hg up tip - 1 files updated, 0 files merged, 0 files removed, 0 files unresolved - $ cd .. $ for i in 0 1 2 3 4 5 6 7 8; do > echo - > mkdir test-"$i" - > hg --cwd test-"$i" init + > hg init test-"$i" > hg -R test push -r "$i" test-"$i" - > cd test-"$i" - > hg verify - > cd .. + > hg -R test-"$i" verify > done pushing to test-0