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
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..12007c0e2e6a4429a3f527d61dca3020a99db448
GIT binary patch
literal 1311
zc$@(r1>pKfM=>x$T4*^jL0KkKSq+o%eE<MNfB*mS|F?Jh|NVc}fB(PtumA0S{j0vf
zdwZ+=m$~Y0`uk7=zBJ$>5CRPu115knG-;p%OeRAR(?)|p02(x4MwtLK41-Mo$Ql|0
zLnc55jQ|0r1xjdnL7)Tm36Y_o8Udha00u#j27m@kKmn6L(V?Kw0B8UJXa<c901Zrl
z0yLVW^a3`gqydSOOc9gNfB+1ElS2^1+7W>O0iXZ?02qK|2AXIHG-M2#0Lam%fDJI2
z3`0#C4FCXW(SaId0MIfGGy@=LXblXR02(v^2AByc1y9l@o+d<XNcA-I^po<F(W$nl
zq$5vFCiO%0CzST64K&S9N2+?8M99!R6ZKD1(WKKr)AcmedTKQF42IF7c})!-rkhPo
znw~0DqMlYY@6EiKDfc1ThtHf`R{8C=#$a!xT(;w`gYdnp1QHPb6p{oOEyH6cG^-`;
z{Hur+!e;r2rF<1FA=lSWsx=jf0E(>>ji*K-<|GvB_WXANa2Skb7-@`S7{rN84;C^m
z00t2RzIYKmAPRsW0&y%t5QKq2QIH(OFvBs5DCP!AB9l|L7>!6m033VFAkR5TYV6^2
zV<J48FxQ1rTlJ$AS}JEw!t;@9x`{pD;zU2jA`eDje4_fvD4BN5T$-K2VKsyh>$H^c
zw`m!(d;z}ed_ObG=5{!or+JJ)Sg6mXIAdn_w8)7{N;G{iQV_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/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
+++ b/tests/test-rebase-named-branches.t
@@ -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
+++ b/tests/test-rebase-scenario-global.t
@@ -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 ..