Mercurial > hg-stable
changeset 14118:7fd8e597f99c
tests: introduce a rebase bundle to use with rebase tests
Allows saving a few seconds in test runs by not constructing
over and over the same repository.
author | Nicolas Dumazet <nicdumz.commits@gmail.com> |
---|---|
date | Sat, 30 Apr 2011 17:38:06 +0200 |
parents | 07708f4171f1 |
children | 624e5ce615ec |
files | tests/bundles/rebase.hg tests/bundles/rebase.sh tests/test-rebase-named-branches.t tests/test-rebase-scenario-global.t |
diffstat | 4 files changed, 40 insertions(+), 73 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/bundles/rebase.sh Sat Apr 30 17:38:06 2011 +0200 @@ -0,0 +1,24 @@ +#!/bin/bash +hg init rebase +cd rebase + +echo A > A +hg ci -Am A +echo B > B +hg ci -Am B +hg up -q -C 0 +echo C > C +hg ci -Am C +hg up -q -C 0 +echo D > D +hg ci -Am D +hg merge -r 2 +hg ci -m E +hg up -q -C 3 +echo F > F +hg ci -Am F + +hg bundle -a ../rebase.hg + +cd .. +rm -Rf rebase
--- a/tests/test-rebase-named-branches.t Sat Apr 30 17:38:06 2011 +0200 +++ b/tests/test-rebase-named-branches.t Sat Apr 30 17:38:06 2011 +0200 @@ -7,45 +7,16 @@ > tglog = log -G --template "{rev}: '{desc}' {branches}\n" > EOF - $ hg init a $ cd a - - $ echo A > A - $ hg ci -Am A - adding A - - $ echo B > B - $ hg ci -Am B - adding B - - $ hg up -q -C 0 - - $ echo C > C - $ hg ci -Am C - adding C - created new head - - $ hg up -q -C 0 - - $ echo D > D - $ hg ci -Am D - adding D - created new head - - $ hg merge -r 2 - 1 files updated, 0 files merged, 0 files removed, 0 files unresolved - (branch merge, don't forget to commit) - - $ hg ci -m E - - $ hg up -q -C 3 - - $ echo F > F - $ hg ci -Am F - adding F - created new head - + $ hg unbundle $TESTDIR/bundles/rebase.hg + adding changesets + adding manifests + adding file changes + added 6 changesets with 5 changes to 5 files (+2 heads) + (run 'hg heads' to see heads, 'hg merge' to merge) + $ hg up tip + 3 files updated, 0 files merged, 0 files removed, 0 files unresolved $ cd ..
--- a/tests/test-rebase-scenario-global.t Sat Apr 30 17:38:06 2011 +0200 +++ b/tests/test-rebase-scenario-global.t Sat Apr 30 17:38:06 2011 +0200 @@ -10,42 +10,14 @@ $ hg init a $ cd a - - $ echo A > A - $ hg ci -Am A - adding A - - $ echo B > B - $ hg ci -Am B - adding B - - $ hg up -q -C 0 - - $ echo C > C - $ hg ci -Am C - adding C - created new head - - $ hg up -q -C 0 - - $ echo D > D - $ hg ci -Am D - adding D - created new head - - $ hg merge -r 2 - 1 files updated, 0 files merged, 0 files removed, 0 files unresolved - (branch merge, don't forget to commit) - - $ hg ci -m E - - $ hg up -q -C 3 - - $ echo F > F - $ hg ci -Am F - adding F - created new head - + $ hg unbundle $TESTDIR/bundles/rebase.hg + adding changesets + adding manifests + adding file changes + added 6 changesets with 5 changes to 5 files (+2 heads) + (run 'hg heads' to see heads, 'hg merge' to merge) + $ hg up tip + 3 files updated, 0 files merged, 0 files removed, 0 files unresolved $ cd ..