changeset 14127:f45c8db21749

merge with nicdumz
author Matt Mackall <mpm@selenic.com>
date Sun, 01 May 2011 06:04:08 -0500
parents a36e8c99d51c (current diff) fbbe9239574a (diff)
children 0386b51dd749
files tests/darcs1.hg tests/legacy-encoding.hg tests/tampered.hg tests/test-bundle-r.t tests/test-issue322.t tests/test-issue433.t tests/test-issue436.t tests/test-keyword.hg tests/test-manifest.hg tests/test-merge-symlinks.hg tests/test-no-symlinks.hg tests/test-rebase-keep-branch.t
diffstat 43 files changed, 632 insertions(+), 998 deletions(-) [+]
line wrap: on
line diff
Binary file tests/bundles/darcs1.hg has changed
Binary file tests/bundles/legacy-encoding.hg has changed
Binary file tests/bundles/rebase.hg has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/bundles/rebase.sh	Sun May 01 06:04:08 2011 -0500
@@ -0,0 +1,44 @@
+#!/bin/bash
+hg init rebase
+cd rebase
+
+#  @  7: 'H'
+#  |
+#  | o  6: 'G'
+#  |/|
+#  o |  5: 'F'
+#  | |
+#  | o  4: 'E'
+#  |/
+#  | o  3: 'D'
+#  | |
+#  | o  2: 'C'
+#  | |
+#  | o  1: 'B'
+#  |/
+#  o  0: 'A'
+
+echo A > A
+hg ci -Am A
+echo B > B
+hg ci -Am B
+echo C > C
+hg ci -Am C
+echo D > D
+hg ci -Am D
+hg up -q -C 0
+echo E > E
+hg ci -Am E
+hg up -q -C 0
+echo F > F
+hg ci -Am F
+hg merge -r 4
+hg ci -m G
+hg up -q -C 5
+echo H > H
+hg ci -Am H
+
+hg bundle -a ../rebase.hg
+
+cd ..
+rm -Rf rebase
Binary file tests/bundles/remote.hg has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/bundles/remote.sh	Sun May 01 06:04:08 2011 -0500
@@ -0,0 +1,32 @@
+#!/bin/bash
+hg init remote
+cd remote
+
+echo "0" >> afile
+hg add afile
+hg commit -m "0.0"
+echo "1" >> afile
+hg commit -m "0.1"
+echo "2" >> afile
+hg commit -m "0.2"
+echo "3" >> afile
+hg commit -m "0.3"
+hg update -C 0
+echo "1" >> afile
+hg commit -m "1.1"
+echo "2" >> afile
+hg commit -m "1.2"
+echo "a line" > fred
+echo "3" >> afile
+hg add fred
+hg commit -m "1.3"
+hg mv afile adifferentfile
+hg commit -m "1.3m"
+hg update -C 3
+hg mv afile anotherfile
+hg commit -m "0.3m"
+
+hg bundle -a ../remote.hg
+
+cd ..
+rm -Rf remote
Binary file tests/bundles/tampered.hg has changed
Binary file tests/bundles/test-keyword.hg has changed
Binary file tests/bundles/test-manifest.hg has changed
Binary file tests/bundles/test-merge-symlinks.hg has changed
Binary file tests/bundles/test-no-symlinks.hg has changed
Binary file tests/darcs1.hg has changed
Binary file tests/legacy-encoding.hg has changed
Binary file tests/tampered.hg has changed
--- a/tests/test-audit-path.t	Sun May 01 12:14:22 2011 +0200
+++ b/tests/test-audit-path.t	Sun May 01 06:04:08 2011 -0500
@@ -33,7 +33,7 @@
 
   $ hg init target
   $ cd target
-  $ hg unbundle $TESTDIR/tampered.hg
+  $ hg unbundle $TESTDIR/bundles/tampered.hg
   adding changesets
   adding manifests
   adding file changes
--- a/tests/test-bundle-r.t	Sun May 01 12:14:22 2011 +0200
+++ b/tests/test-bundle-r.t	Sun May 01 06:04:08 2011 -0500
@@ -1,62 +1,15 @@
   $ hg init test
   $ cd test
-  $ echo "0" >> afile
-  $ hg add afile
-  $ hg commit -m "0.0"
-  $ echo "1" >> afile
-  $ hg commit -m "0.1"
-  $ echo "2" >> afile
-  $ hg commit -m "0.2"
-  $ echo "3" >> afile
-  $ hg commit -m "0.3"
-  $ hg update -C 0
+  $ hg 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
-  $ echo "1" >> afile
-  $ hg commit -m "1.1"
-  created new head
-  $ echo "2" >> afile
-  $ hg commit -m "1.2"
-  $ echo "a line" > fred
-  $ echo "3" >> afile
-  $ hg add fred
-  $ hg commit -m "1.3"
-  $ hg mv afile adifferentfile
-  $ hg commit -m "1.3m"
-  $ hg update -C 3
-  1 files updated, 0 files merged, 2 files removed, 0 files unresolved
-  $ hg mv afile anotherfile
-  $ hg commit -m "0.3m"
-  $ hg debugindex .hg/store/data/afile.i
-     rev    offset  length   base linkrev nodeid       p1           p2
-       0         0       3      0       0 362fef284ce2 000000000000 000000000000
-       1         3       5      1       1 125144f7e028 362fef284ce2 000000000000
-       2         8       7      2       2 4c982badb186 125144f7e028 000000000000
-       3        15       9      3       3 19b1fc555737 4c982badb186 000000000000
-  $ hg debugindex .hg/store/data/adifferentfile.i
-     rev    offset  length   base linkrev nodeid       p1           p2
-       0         0      75      0       7 2565f3199a74 000000000000 000000000000
-  $ hg debugindex .hg/store/data/anotherfile.i
-     rev    offset  length   base linkrev nodeid       p1           p2
-       0         0      75      0       8 2565f3199a74 000000000000 000000000000
-  $ hg debugindex .hg/store/data/fred.i
-     rev    offset  length   base linkrev nodeid       p1           p2
-       0         0       8      0       6 12ab3bcc5ea4 000000000000 000000000000
-  $ hg debugindex .hg/store/00manifest.i
-     rev    offset  length   base linkrev nodeid       p1           p2
-       0         0      48      0       0 43eadb1d2d06 000000000000 000000000000
-       1        48      48      1       1 8b89697eba2c 43eadb1d2d06 000000000000
-       2        96      48      2       2 626a32663c2f 8b89697eba2c 000000000000
-       3       144      48      3       3 f54c32f13478 626a32663c2f 000000000000
-       4       192      58      3       6 de68e904d169 626a32663c2f 000000000000
-       5       250      68      3       7 09bb521d218d de68e904d169 000000000000
-       6       318      54      6       8 1fde233dfb0f f54c32f13478 000000000000
-  $ hg verify
-  checking changesets
-  checking manifests
-  crosschecking files in changesets and manifests
-  checking files
-  4 files, 9 changesets, 7 total revisions
   $ cd ..
+
   $ for i in 0 1 2 3 4 5 6 7 8; do
   >    mkdir test-"$i"
   >    hg --cwd test-"$i" init
@@ -79,7 +32,7 @@
   crosschecking files in changesets and manifests
   checking files
   1 files, 1 changesets, 1 total revisions
-  0:f9ee2f85a263
+  0:bfaf4b5cbf01
   searching for changes
   2 changesets found
   adding changesets
@@ -92,7 +45,7 @@
   crosschecking files in changesets and manifests
   checking files
   1 files, 2 changesets, 2 total revisions
-  1:34c2bf6b0626
+  1:21f32785131f
   searching for changes
   3 changesets found
   adding changesets
@@ -105,7 +58,7 @@
   crosschecking files in changesets and manifests
   checking files
   1 files, 3 changesets, 3 total revisions
-  2:e38ba6f5b7e0
+  2:4ce51a113780
   searching for changes
   4 changesets found
   adding changesets
@@ -118,7 +71,7 @@
   crosschecking files in changesets and manifests
   checking files
   1 files, 4 changesets, 4 total revisions
-  3:eebf5a27f8ca
+  3:93ee6ab32777
   searching for changes
   2 changesets found
   adding changesets
@@ -131,7 +84,7 @@
   crosschecking files in changesets and manifests
   checking files
   1 files, 2 changesets, 2 total revisions
-  1:095197eb4973
+  1:c70afb1ee985
   searching for changes
   3 changesets found
   adding changesets
@@ -144,7 +97,7 @@
   crosschecking files in changesets and manifests
   checking files
   1 files, 3 changesets, 3 total revisions
-  2:1bb50a9436a7
+  2:f03ae5a9b979
   searching for changes
   4 changesets found
   adding changesets
@@ -157,7 +110,7 @@
   crosschecking files in changesets and manifests
   checking files
   2 files, 4 changesets, 5 total revisions
-  3:7373c1169842
+  3:095cb14b1b4d
   searching for changes
   5 changesets found
   adding changesets
@@ -170,7 +123,7 @@
   crosschecking files in changesets and manifests
   checking files
   3 files, 5 changesets, 6 total revisions
-  4:a6a34bfa0076
+  4:faa2e4234c7a
   searching for changes
   5 changesets found
   adding changesets
@@ -183,7 +136,7 @@
   crosschecking files in changesets and manifests
   checking files
   2 files, 5 changesets, 5 total revisions
-  4:aa35859c02ea
+  4:916f1afdef90
   $ cd test-8
   $ hg pull ../test-7
   pulling from ../test-7
@@ -248,18 +201,18 @@
 revision 2
 
   $ hg tip -q
-  2:e38ba6f5b7e0
+  2:4ce51a113780
   $ hg unbundle ../test-bundle-should-fail.hg
   adding changesets
   transaction abort!
   rollback completed
-  abort: 00changelog.i@eebf5a27f8ca: unknown parent!
+  abort: 00changelog.i@93ee6ab32777: unknown parent!
   [255]
 
 revision 2
 
   $ hg tip -q
-  2:e38ba6f5b7e0
+  2:4ce51a113780
   $ hg unbundle ../test-bundle-all.hg
   adding changesets
   adding manifests
@@ -270,7 +223,7 @@
 revision 8
 
   $ hg tip -q
-  8:aa35859c02ea
+  8:916f1afdef90
   $ hg verify
   checking changesets
   checking manifests
@@ -284,7 +237,7 @@
 revision 2
 
   $ hg tip -q
-  2:e38ba6f5b7e0
+  2:4ce51a113780
   $ hg unbundle ../test-bundle-branch1.hg
   adding changesets
   adding manifests
@@ -295,7 +248,7 @@
 revision 4
 
   $ hg tip -q
-  4:aa35859c02ea
+  4:916f1afdef90
   $ hg verify
   checking changesets
   checking manifests
@@ -315,7 +268,7 @@
 revision 6
 
   $ hg tip -q
-  6:a6a34bfa0076
+  6:faa2e4234c7a
   $ hg verify
   checking changesets
   checking manifests
@@ -335,7 +288,7 @@
 revision 4
 
   $ hg tip -q
-  4:aa35859c02ea
+  4:916f1afdef90
   $ hg verify
   checking changesets
   checking manifests
@@ -368,7 +321,7 @@
 revision 9
 
   $ hg tip -q
-  9:905597b0d5d4
+  9:03fc0b0e347c
   $ hg verify
   checking changesets
   checking manifests
--- a/tests/test-convert-darcs.t	Sun May 01 12:14:22 2011 +0200
+++ b/tests/test-convert-darcs.t	Sun May 01 06:04:08 2011 -0500
@@ -16,7 +16,7 @@
 
 try converting darcs1 repository
 
-  $ hg clone -q "$TESTDIR/darcs1.hg" darcs
+  $ hg clone -q "$TESTDIR/bundles/darcs1.hg" darcs
   $ hg convert -s darcs darcs/darcs1 2>&1 | grep darcs-1.0
   darcs-1.0 repository format is unsupported, please upgrade
 
--- a/tests/test-dispatch.t	Sun May 01 12:14:22 2011 +0200
+++ b/tests/test-dispatch.t	Sun May 01 06:04:08 2011 -0500
@@ -6,6 +6,11 @@
 
   $ hg init a
   $ cd a
+
+Redundant options used to crash (issue436):
+  $ hg -v log -v
+  $ hg -v log -v x
+
   $ echo a > a
   $ hg ci -Ama
   adding a
--- a/tests/test-encoding.t	Sun May 01 12:14:22 2011 +0200
+++ b/tests/test-encoding.t	Sun May 01 06:04:08 2011 -0500
@@ -5,7 +5,7 @@
 
 we need a repo with some legacy latin-1 changesets
 
-  $ hg unbundle $TESTDIR/legacy-encoding.hg
+  $ hg unbundle $TESTDIR/bundles/legacy-encoding.hg
   adding changesets
   adding manifests
   adding file changes
--- a/tests/test-http-clone-r.t	Sun May 01 12:14:22 2011 +0200
+++ b/tests/test-http-clone-r.t	Sun May 01 06:04:08 2011 -0500
@@ -1,81 +1,15 @@
+creating 'remote
 
   $ hg init remote
   $ cd remote
-
-creating 'remote
-
-  $ cat >>afile <<EOF
-  > 0
-  > EOF
-  $ hg add afile
-  $ hg commit -m "0.0"
-  $ cat >>afile <<EOF
-  > 1
-  > EOF
-  $ hg commit -m "0.1"
-  $ cat >>afile <<EOF
-  > 2
-  > EOF
-  $ hg commit -m "0.2"
-  $ cat >>afile <<EOF
-  > 3
-  > EOF
-  $ hg commit -m "0.3"
-  $ hg update -C 0
+  $ hg 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
-  $ cat >>afile <<EOF
-  > 1
-  > EOF
-  $ hg commit -m "1.1"
-  created new head
-  $ cat >>afile <<EOF
-  > 2
-  > EOF
-  $ hg commit -m "1.2"
-  $ cat >fred <<EOF
-  > a line
-  > EOF
-  $ cat >>afile <<EOF
-  > 3
-  > EOF
-  $ hg add fred
-  $ hg commit -m "1.3"
-  $ hg mv afile adifferentfile
-  $ hg commit -m "1.3m"
-  $ hg update -C 3
-  1 files updated, 0 files merged, 2 files removed, 0 files unresolved
-  $ hg mv afile anotherfile
-  $ hg commit -m "0.3m"
-  $ hg debugindex .hg/store/data/afile.i
-     rev    offset  length   base linkrev nodeid       p1           p2
-       0         0       3      0       0 362fef284ce2 000000000000 000000000000
-       1         3       5      1       1 125144f7e028 362fef284ce2 000000000000
-       2         8       7      2       2 4c982badb186 125144f7e028 000000000000
-       3        15       9      3       3 19b1fc555737 4c982badb186 000000000000
-  $ hg debugindex .hg/store/data/adifferentfile.i
-     rev    offset  length   base linkrev nodeid       p1           p2
-       0         0      75      0       7 2565f3199a74 000000000000 000000000000
-  $ hg debugindex .hg/store/data/anotherfile.i
-     rev    offset  length   base linkrev nodeid       p1           p2
-       0         0      75      0       8 2565f3199a74 000000000000 000000000000
-  $ hg debugindex .hg/store/data/fred.i
-     rev    offset  length   base linkrev nodeid       p1           p2
-       0         0       8      0       6 12ab3bcc5ea4 000000000000 000000000000
-  $ hg debugindex .hg/store/00manifest.i
-     rev    offset  length   base linkrev nodeid       p1           p2
-       0         0      48      0       0 43eadb1d2d06 000000000000 000000000000
-       1        48      48      1       1 8b89697eba2c 43eadb1d2d06 000000000000
-       2        96      48      2       2 626a32663c2f 8b89697eba2c 000000000000
-       3       144      48      3       3 f54c32f13478 626a32663c2f 000000000000
-       4       192      58      3       6 de68e904d169 626a32663c2f 000000000000
-       5       250      68      3       7 09bb521d218d de68e904d169 000000000000
-       6       318      54      6       8 1fde233dfb0f f54c32f13478 000000000000
-  $ hg verify
-  checking changesets
-  checking manifests
-  crosschecking files in changesets and manifests
-  checking files
-  4 files, 9 changesets, 7 total revisions
 
 Starting server
 
--- a/tests/test-impexp-branch.t	Sun May 01 12:14:22 2011 +0200
+++ b/tests/test-impexp-branch.t	Sun May 01 06:04:08 2011 -0500
@@ -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
--- a/tests/test-import.t	Sun May 01 12:14:22 2011 +0200
+++ b/tests/test-import.t	Sun May 01 06:04:08 2011 -0500
@@ -11,6 +11,12 @@
   $ hg --cwd a ci -u someone -d '1 0' -m'second change'
 
 
+generate patches for the test
+
+  $ hg --cwd a export tip > exported-tip.patch
+  $ hg --cwd a diff -r0:1 > diffed-tip.patch
+
+
 import exported patch
 
   $ hg clone -r0 a b
@@ -20,19 +26,18 @@
   added 1 changesets with 2 changes to 2 files
   updating to branch default
   2 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  $ hg --cwd a export tip > tip.patch
-  $ hg --cwd b import ../tip.patch
-  applying ../tip.patch
+  $ hg --cwd b import ../exported-tip.patch
+  applying ../exported-tip.patch
 
-message should be same
+message and committer should be same
 
-  $ hg --cwd b tip | grep 'second change'
+  $ hg --cwd b tip
+  changeset:   1:1d4bd90af0e4
+  tag:         tip
+  user:        someone
+  date:        Thu Jan 01 00:00:01 1970 +0000
   summary:     second change
-
-committer should be same
-
-  $ hg --cwd b tip | grep someone
-  user:        someone
+  
   $ rm -r b
 
 
@@ -50,9 +55,8 @@
   added 1 changesets with 2 changes to 2 files
   updating to branch default
   2 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  $ hg --cwd a export tip > tip.patch
-  $ hg --config ui.patch='python ../dummypatch.py' --cwd b import ../tip.patch
-  applying ../tip.patch
+  $ hg --config ui.patch='python ../dummypatch.py' --cwd b import ../exported-tip.patch
+  applying ../exported-tip.patch
   $ cat b/a
   line2
   $ rm -r b
@@ -67,9 +71,8 @@
   added 1 changesets with 2 changes to 2 files
   updating to branch default
   2 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  $ hg --cwd a diff -r0:1 > tip.patch
-  $ hg --cwd b import ../tip.patch
-  applying ../tip.patch
+  $ hg --cwd b import ../diffed-tip.patch
+  applying ../diffed-tip.patch
   abort: empty commit message
   [255]
   $ rm -r b
@@ -84,9 +87,8 @@
   added 1 changesets with 2 changes to 2 files
   updating to branch default
   2 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  $ hg --cwd a diff -r0:1 > tip.patch
-  $ hg --cwd b import -mpatch ../tip.patch
-  applying ../tip.patch
+  $ hg --cwd b import -mpatch ../diffed-tip.patch
+  applying ../diffed-tip.patch
   $ rm -r b
 
 
@@ -99,9 +101,8 @@
   added 1 changesets with 2 changes to 2 files
   updating to branch default
   2 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  $ hg --cwd a diff -r0:1 > tip.patch
-  $ hg --cwd b import -mpatch -d '1 0' -u 'user@nowhere.net' ../tip.patch
-  applying ../tip.patch
+  $ hg --cwd b import -mpatch -d '1 0' -u 'user@nowhere.net' ../diffed-tip.patch
+  applying ../diffed-tip.patch
   $ hg -R b tip -pv
   changeset:   1:ca68f19f3a40
   tag:         tip
@@ -131,9 +132,8 @@
   added 1 changesets with 2 changes to 2 files
   updating to branch default
   2 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  $ hg --cwd a diff -r0:1 > tip.patch
-  $ hg --cwd b import --no-commit ../tip.patch
-  applying ../tip.patch
+  $ hg --cwd b import --no-commit ../diffed-tip.patch
+  applying ../diffed-tip.patch
   $ hg --cwd b diff --nodates
   diff -r 80971e65b431 a
   --- a/a
@@ -153,8 +153,7 @@
   added 1 changesets with 2 changes to 2 files
   updating to branch default
   2 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  $ hg --cwd a diff -r0:1 > tip.patch
-  $ sed 's/1,1/foo/' < tip.patch > broken.patch
+  $ sed 's/1,1/foo/' < diffed-tip.patch > broken.patch
   $ hg --cwd b import -mpatch ../broken.patch
   applying ../broken.patch
   abort: bad hunk #1
@@ -174,10 +173,9 @@
   added 1 changesets with 2 changes to 2 files
   updating to branch default
   2 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  $ hg --cwd a export tip > dir/tip.patch
   $ cd dir
-  $ hg -R b import tip.patch
-  applying tip.patch
+  $ hg -R b import ../exported-tip.patch
+  applying ../exported-tip.patch
   $ cd ..
   $ rm -r dir
 
@@ -191,7 +189,7 @@
   added 1 changesets with 2 changes to 2 files
   updating to branch default
   2 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  $ hg --cwd a export tip | hg --cwd b import -
+  $ hg --cwd b import - < exported-tip.patch
   applying patch from stdin
   $ rm -r b
 
@@ -218,7 +216,7 @@
   added 1 changesets with 2 changes to 2 files
   updating to branch default
   2 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  $ hg --cwd a export tip | hg --cwd b import -m 'override' -
+  $ hg --cwd b import -m 'override' - < exported-tip.patch
   applying patch from stdin
   $ hg --cwd b tip | grep override
   summary:     override
@@ -227,7 +225,8 @@
   $ cat > mkmsg.py <<EOF
   > import email.Message, sys
   > msg = email.Message.Message()
-  > msg.set_payload('email commit message\n' + open('tip.patch', 'rb').read())
+  > patch = open(sys.argv[1], 'rb').read()
+  > msg.set_payload('email commit message\n' + patch)
   > msg['Subject'] = 'email patch'
   > msg['From'] = 'email patcher'
   > sys.stdout.write(msg.as_string())
@@ -243,8 +242,7 @@
   added 1 changesets with 2 changes to 2 files
   updating to branch default
   2 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  $ hg --cwd a diff -r0:1 > tip.patch
-  $ python mkmsg.py > msg.patch
+  $ python mkmsg.py diffed-tip.patch > msg.patch
   $ hg --cwd b import ../msg.patch
   applying ../msg.patch
   $ hg --cwd b tip | grep email
@@ -306,8 +304,7 @@
   added 1 changesets with 2 changes to 2 files
   updating to branch default
   2 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  $ hg --cwd a export tip > tip.patch
-  $ python mkmsg.py | hg --cwd b import -
+  $ python mkmsg.py exported-tip.patch | hg --cwd b import -
   applying patch from stdin
   $ hg --cwd b tip | grep second
   summary:     second change
@@ -320,7 +317,8 @@
   $ cat > mkmsg2.py <<EOF
   > import email.Message, sys
   > msg = email.Message.Message()
-  > msg.set_payload('email patch\n\nnext line\n---\n' + open('tip.patch').read())
+  > patch = open(sys.argv[1], 'rb').read()
+  > msg.set_payload('email patch\n\nnext line\n---\n' + patch)
   > msg['Subject'] = '[PATCH] email patch'
   > msg['From'] = 'email patcher'
   > sys.stdout.write(msg.as_string())
@@ -336,8 +334,7 @@
   added 1 changesets with 2 changes to 2 files
   updating to branch default
   2 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  $ hg --cwd a diff -r0:1 > tip.patch
-  $ python mkmsg2.py | hg --cwd b import -
+  $ python mkmsg2.py diffed-tip.patch | hg --cwd b import -
   applying patch from stdin
   $ hg --cwd b tip --template '{desc}\n'
   email patch
@@ -386,22 +383,23 @@
   updating to branch default
   2 files updated, 0 files merged, 0 files removed, 0 files unresolved
   $ hg --cwd a export tip > tmp
-  $ sed -e 's/d1\/d2\///' < tmp > tip.patch
+  $ sed -e 's/d1\/d2\///' < tmp > subdir-tip.patch
   $ dir=`pwd`
   $ cd b/d1/d2 2>&1 > /dev/null
-  $ hg import  ../../../tip.patch
-  applying ../../../tip.patch
+  $ hg import  ../../../subdir-tip.patch
+  applying ../../../subdir-tip.patch
   $ cd "$dir"
 
 message should be 'subdir change'
-
-  $ hg --cwd b tip | grep 'subdir change'
-  summary:     subdir change
-
 committer should be 'someoneelse'
 
-  $ hg --cwd b tip | grep someoneelse
+  $ hg --cwd b tip
+  changeset:   1:3577f5aea227
+  tag:         tip
   user:        someoneelse
+  date:        Thu Jan 01 00:00:01 1970 +0000
+  summary:     subdir change
+  
 
 should be empty
 
@@ -422,7 +420,7 @@
   $ echo line0 >> a
   $ echo line3 >> a
   $ hg ci -m change a
-  $ hg export tip > tip.patch
+  $ hg export tip > fuzzy-tip.patch
   $ hg up -C 0
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
   $ echo line1 > a
@@ -431,8 +429,8 @@
   $ echo line0 >> a
   $ hg ci -m brancha
   created new head
-  $ hg import --no-commit -v tip.patch
-  applying tip.patch
+  $ hg import --no-commit -v fuzzy-tip.patch
+  applying fuzzy-tip.patch
   patching file a
   Hunk #1 succeeded at 1 with fuzz 2 (offset -2 lines).
   $ hg revert -a
@@ -447,8 +445,8 @@
 
 test fuzziness with eol=auto
 
-  $ hg --config patch.eol=auto import --no-commit -v tip.patch
-  applying tip.patch
+  $ hg --config patch.eol=auto import --no-commit -v fuzzy-tip.patch
+  applying fuzzy-tip.patch
   patching file a
   Hunk #1 succeeded at 1 with fuzz 2 (offset -2 lines).
   $ cd ..
--- a/tests/test-issue322.t	Sun May 01 12:14:22 2011 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,59 +0,0 @@
-http://mercurial.selenic.com/bts/issue322
-
-File replaced with directory:
-
-  $ hg init a
-  $ cd a
-  $ echo a > a
-  $ hg commit -Ama
-  adding a
-  $ rm a
-  $ mkdir a
-  $ echo a > a/a
-
-Should fail - would corrupt dirstate:
-
-  $ hg add a/a
-  abort: file 'a' in dirstate clashes with 'a/a'
-  [255]
-
-  $ cd ..
-
-Directory replaced with file:
-
-  $ hg init c
-  $ cd c
-  $ mkdir a
-  $ echo a > a/a
-  $ hg commit -Ama
-  adding a/a
-
-  $ rm -r a
-  $ echo a > a
-
-Should fail - would corrupt dirstate:
-
-  $ hg add a
-  abort: directory 'a' already in dirstate
-  [255]
-
-  $ cd ..
-
-Directory replaced with file:
-
-  $ hg init d
-  $ cd d
-  $ mkdir b
-  $ mkdir b/c
-  $ echo a > b/c/d
-  $ hg commit -Ama
-  adding b/c/d
-  $ rm -r b
-  $ echo a > b
-
-Should fail - would corrupt dirstate:
-
-  $ hg add b
-  abort: directory 'b' already in dirstate
-  [255]
-
--- a/tests/test-issue433.t	Sun May 01 12:14:22 2011 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,10 +0,0 @@
-http://mercurial.selenic.com/bts/issue433
-
-  $ hg init
-  $ echo a > a
-  $ hg commit -Ama
-  adding a
-
-  $ hg parents -r 0 doesnotexist
-  abort: 'doesnotexist' not found in manifest!
-  [255]
--- a/tests/test-issue436.t	Sun May 01 12:14:22 2011 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,6 +0,0 @@
-http://mercurial.selenic.com/bts/issue436
-
-  $ hg init
-  $ hg -v log -v
-  $ hg -v log -v x
-
--- a/tests/test-issue660.t	Sun May 01 12:14:22 2011 +0200
+++ b/tests/test-issue660.t	Sun May 01 06:04:08 2011 -0500
@@ -1,4 +1,5 @@
-http://mercurial.selenic.com/bts/issue660
+http://mercurial.selenic.com/bts/issue660 and:
+http://mercurial.selenic.com/bts/issue322
 
   $ hg init
   $ echo a > a
Binary file tests/test-keyword.hg has changed
--- a/tests/test-keyword.t	Sun May 01 12:14:22 2011 +0200
+++ b/tests/test-keyword.t	Sun May 01 06:04:08 2011 -0500
@@ -78,7 +78,7 @@
  hg ci -m addsym -u mercurial
  hg bundle --base null ../test-keyword.hg
 
-  $ hg pull -u "$TESTDIR"/test-keyword.hg
+  $ hg pull -u "$TESTDIR"/bundles/test-keyword.hg
   pulling from *test-keyword.hg (glob)
   requesting all changes
   adding changesets
Binary file tests/test-manifest.hg has changed
--- a/tests/test-manifest.t	Sun May 01 12:14:22 2011 +0200
+++ b/tests/test-manifest.t	Sun May 01 06:04:08 2011 -0500
@@ -10,7 +10,7 @@
 # hg ci -Amb -d'1 0'
 
   $ hg init
-  $ hg -q pull "$TESTDIR/test-manifest.hg"
+  $ hg -q pull "$TESTDIR/bundles/test-manifest.hg"
 
 The next call is expected to return nothing:
 
Binary file tests/test-merge-symlinks.hg has changed
--- a/tests/test-merge-symlinks.t	Sun May 01 12:14:22 2011 +0200
+++ b/tests/test-merge-symlinks.t	Sun May 01 06:04:08 2011 -0500
@@ -30,7 +30,7 @@
 
   $ hg init t
   $ cd t
-  $ hg -q pull "$TESTDIR/test-merge-symlinks.hg"
+  $ hg -q pull "$TESTDIR/bundles/test-merge-symlinks.hg"
   $ hg up -C 3
   3 files updated, 0 files merged, 0 files removed, 0 files unresolved
 
Binary file tests/test-no-symlinks.hg has changed
--- a/tests/test-no-symlinks.t	Sun May 01 12:14:22 2011 +0200
+++ b/tests/test-no-symlinks.t	Sun May 01 06:04:08 2011 -0500
@@ -16,7 +16,7 @@
 
   $ hg init t
   $ cd t
-  $ hg pull -q "$TESTDIR/test-no-symlinks.hg"
+  $ hg pull -q "$TESTDIR/bundles/test-no-symlinks.hg"
   $ hg update
   4 files updated, 0 files merged, 0 files removed, 0 files unresolved
   $ cat a.lnk && echo
--- a/tests/test-push-r.t	Sun May 01 12:14:22 2011 +0200
+++ b/tests/test-push-r.t	Sun May 01 06:04:08 2011 -0500
@@ -1,95 +1,13 @@
   $ hg init test
   $ cd test
-
-  $ cat >>afile <<EOF
-  > 0
-  > EOF
-  $ hg add afile
-  $ hg commit -m "0.0"
-
-  $ cat >>afile <<EOF
-  > 1
-  > EOF
-  $ hg commit -m "0.1"
-
-  $ cat >>afile <<EOF
-  > 2
-  > EOF
-  $ hg commit -m "0.2"
-
-  $ cat >>afile <<EOF
-  > 3
-  > EOF
-  $ hg commit -m "0.3"
-
-  $ hg update -C 0
+  $ hg 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
-
-  $ cat >>afile <<EOF
-  > 1
-  > EOF
-  $ hg commit -m "1.1"
-  created new head
-
-  $ cat >>afile <<EOF
-  > 2
-  > EOF
-  $ hg commit -m "1.2"
-
-  $ cat >fred <<EOF
-  > a line
-  > EOF
-  $ cat >>afile <<EOF
-  > 3
-  > EOF
-  $ hg add fred
-  $ hg commit -m "1.3"
-
-  $ hg mv afile adifferentfile
-  $ hg commit -m "1.3m"
-
-  $ hg update -C 3
-  1 files updated, 0 files merged, 2 files removed, 0 files unresolved
-
-  $ hg mv afile anotherfile
-  $ hg commit -m "0.3m"
-
-  $ hg debugindex .hg/store/data/afile.i
-     rev    offset  length   base linkrev nodeid       p1           p2
-       0         0       3      0       0 362fef284ce2 000000000000 000000000000
-       1         3       5      1       1 125144f7e028 362fef284ce2 000000000000
-       2         8       7      2       2 4c982badb186 125144f7e028 000000000000
-       3        15       9      3       3 19b1fc555737 4c982badb186 000000000000
-
-  $ hg debugindex .hg/store/data/adifferentfile.i
-     rev    offset  length   base linkrev nodeid       p1           p2
-       0         0      75      0       7 2565f3199a74 000000000000 000000000000
-
-  $ hg debugindex .hg/store/data/anotherfile.i
-     rev    offset  length   base linkrev nodeid       p1           p2
-       0         0      75      0       8 2565f3199a74 000000000000 000000000000
-
-  $ hg debugindex .hg/store/data/fred.i
-     rev    offset  length   base linkrev nodeid       p1           p2
-       0         0       8      0       6 12ab3bcc5ea4 000000000000 000000000000
-
-  $ hg debugindex .hg/store/00manifest.i
-     rev    offset  length   base linkrev nodeid       p1           p2
-       0         0      48      0       0 43eadb1d2d06 000000000000 000000000000
-       1        48      48      1       1 8b89697eba2c 43eadb1d2d06 000000000000
-       2        96      48      2       2 626a32663c2f 8b89697eba2c 000000000000
-       3       144      48      3       3 f54c32f13478 626a32663c2f 000000000000
-       4       192      58      3       6 de68e904d169 626a32663c2f 000000000000
-       5       250      68      3       7 09bb521d218d de68e904d169 000000000000
-       6       318      54      6       8 1fde233dfb0f f54c32f13478 000000000000
-
-  $ hg verify
-  checking changesets
-  checking manifests
-  crosschecking files in changesets and manifests
-  checking files
-  4 files, 9 changesets, 7 total revisions
-
   $ cd ..
 
   $ for i in 0 1 2 3 4 5 6 7 8; do
--- a/tests/test-rebase-collapse.t	Sun May 01 12:14:22 2011 +0200
+++ b/tests/test-rebase-collapse.t	Sun May 01 06:04:08 2011 -0500
@@ -11,45 +11,14 @@
 
   $ hg init a
   $ cd a
-
-  $ echo A > A
-  $ hg ci -Am A
-  adding A
-  $ echo B > B
-  $ hg ci -Am B
-  adding B
-  $ echo C > C
-  $ hg ci -Am C
-  adding C
-  $ echo D > D
-  $ hg ci -Am D
-  adding D
-
-  $ hg up -q -C 0
-
-  $ echo E > E
-  $ hg ci -Am E
-  adding E
-  created new head
-
-  $ hg up -q -C 0
-
-  $ echo F > F
-  $ hg ci -Am F
-  adding F
-  created new head
-
-  $ hg merge -r 4
-  1 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  (branch merge, don't forget to commit)
-  $ hg ci -m G
-
-  $ hg up -q -C 5
-
-  $ echo H > H
-  $ hg ci -Am H
-  adding H
-  created new head
+  $ hg unbundle $TESTDIR/bundles/rebase.hg
+  adding changesets
+  adding manifests
+  adding file changes
+  added 8 changesets with 7 changes to 7 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
 
   $ hg tglog
   @  7: 'H'
--- a/tests/test-rebase-detach.t	Sun May 01 12:14:22 2011 +0200
+++ b/tests/test-rebase-detach.t	Sun May 01 06:04:08 2011 -0500
@@ -10,41 +10,32 @@
 
   $ hg init a
   $ cd a
-
-  $ echo A > A
-  $ hg ci -Am A
-  adding A
-
-  $ echo B > B
-  $ hg ci -Am B
-  adding B
-
-  $ echo C > C
-  $ hg ci -Am C
-  adding C
-
-  $ echo D > D
-  $ hg ci -Am D
-  adding D
-
-  $ hg up -q -C 0
-
-  $ echo E > E
-  $ hg ci -Am E
-  adding E
-  created new head
+  $ hg unbundle $TESTDIR/bundles/rebase.hg
+  adding changesets
+  adding manifests
+  adding file changes
+  added 8 changesets with 7 changes to 7 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 ..
 
 
-Rebasing D onto E detaching from C:
+Rebasing D onto H detaching from C:
 
   $ hg clone -q -u . a a1
   $ cd a1
 
   $ hg tglog
-  @  4: 'E'
+  @  7: 'H'
   |
+  | o  6: 'G'
+  |/|
+  o |  5: 'F'
+  | |
+  | o  4: 'E'
+  |/
   | o  3: 'D'
   | |
   | o  2: 'C'
@@ -53,14 +44,20 @@
   |/
   o  0: 'A'
   
-  $ hg rebase --detach -s 3 -d 4
+  $ hg rebase --detach -s 3 -d 7
   saved backup bundle to $TESTTMP/a1/.hg/strip-backup/*-backup.hg (glob)
 
   $ hg tglog
-  @  4: 'D'
+  @  7: 'D'
+  |
+  o  6: 'H'
   |
-  o  3: 'E'
-  |
+  | o  5: 'G'
+  |/|
+  o |  4: 'F'
+  | |
+  | o  3: 'E'
+  |/
   | o  2: 'C'
   | |
   | o  1: 'B'
@@ -70,19 +67,26 @@
   $ hg manifest
   A
   D
-  E
+  F
+  H
 
   $ cd ..
 
 
-Rebasing C onto E detaching from B:
+Rebasing C onto H detaching from B:
 
   $ hg clone -q -u . a a2
   $ cd a2
 
   $ hg tglog
-  @  4: 'E'
+  @  7: 'H'
   |
+  | o  6: 'G'
+  |/|
+  o |  5: 'F'
+  | |
+  | o  4: 'E'
+  |/
   | o  3: 'D'
   | |
   | o  2: 'C'
@@ -91,16 +95,22 @@
   |/
   o  0: 'A'
   
-  $ hg rebase --detach -s 2 -d 4
+  $ hg rebase --detach -s 2 -d 7
   saved backup bundle to $TESTTMP/a2/.hg/strip-backup/*-backup.hg (glob)
 
   $ hg tglog
-  @  4: 'D'
+  @  7: 'D'
+  |
+  o  6: 'C'
+  |
+  o  5: 'H'
   |
-  o  3: 'C'
-  |
-  o  2: 'E'
-  |
+  | o  4: 'G'
+  |/|
+  o |  3: 'F'
+  | |
+  | o  2: 'E'
+  |/
   | o  1: 'B'
   |/
   o  0: 'A'
@@ -109,19 +119,26 @@
   A
   C
   D
-  E
+  F
+  H
 
   $ cd ..
 
 
-Rebasing B onto E using detach (same as not using it):
+Rebasing B onto H using detach (same as not using it):
 
   $ hg clone -q -u . a a3
   $ cd a3
 
   $ hg tglog
-  @  4: 'E'
+  @  7: 'H'
   |
+  | o  6: 'G'
+  |/|
+  o |  5: 'F'
+  | |
+  | o  4: 'E'
+  |/
   | o  3: 'D'
   | |
   | o  2: 'C'
@@ -130,18 +147,24 @@
   |/
   o  0: 'A'
   
-  $ hg rebase --detach -s 1 -d 4
+  $ hg rebase --detach -s 1 -d 7
   saved backup bundle to $TESTTMP/a3/.hg/strip-backup/*-backup.hg (glob)
 
   $ hg tglog
-  @  4: 'D'
+  @  7: 'D'
   |
-  o  3: 'C'
+  o  6: 'C'
+  |
+  o  5: 'B'
   |
-  o  2: 'B'
+  o  4: 'H'
   |
-  o  1: 'E'
-  |
+  | o  3: 'G'
+  |/|
+  o |  2: 'F'
+  | |
+  | o  1: 'E'
+  |/
   o  0: 'A'
   
   $ hg manifest
@@ -149,19 +172,26 @@
   B
   C
   D
-  E
+  F
+  H
 
   $ cd ..
 
 
-Rebasing C onto E detaching from B and collapsing:
+Rebasing C onto H detaching from B and collapsing:
 
   $ hg clone -q -u . a a4
   $ cd a4
 
   $ hg tglog
-  @  4: 'E'
+  @  7: 'H'
   |
+  | o  6: 'G'
+  |/|
+  o |  5: 'F'
+  | |
+  | o  4: 'E'
+  |/
   | o  3: 'D'
   | |
   | o  2: 'C'
@@ -170,15 +200,21 @@
   |/
   o  0: 'A'
   
-  $ hg rebase --detach --collapse -s 2 -d 4
+  $ hg rebase --detach --collapse -s 2 -d 7
   saved backup bundle to $TESTTMP/a4/.hg/strip-backup/*-backup.hg (glob)
 
   $ hg tglog
-  @  3: 'Collapsed revision
+  @  6: 'Collapsed revision
   |  * C
   |  * D'
-  o  2: 'E'
+  o  5: 'H'
   |
+  | o  4: 'G'
+  |/|
+  o |  3: 'F'
+  | |
+  | o  2: 'E'
+  |/
   | o  1: 'B'
   |/
   o  0: 'A'
@@ -187,7 +223,8 @@
   A
   C
   D
-  E
+  F
+  H
 
   $ cd ..
 
@@ -204,10 +241,16 @@
   created new head
 
   $ hg tglog
-  @  5: 'extra branch'
+  @  8: 'extra branch'
   
-  o  4: 'E'
+  o  7: 'H'
   |
+  | o  6: 'G'
+  |/|
+  o |  5: 'F'
+  | |
+  | o  4: 'E'
+  |/
   | o  3: 'D'
   | |
   | o  2: 'C'
@@ -220,15 +263,21 @@
   saved backup bundle to $TESTTMP/a5/.hg/strip-backup/*-backup.hg (glob)
 
   $ hg tglog
-  @  5: 'D'
+  @  8: 'D'
   |
-  o  4: 'C'
+  o  7: 'C'
+  |
+  o  6: 'B'
   |
-  o  3: 'B'
+  o  5: 'extra branch'
+  
+  o  4: 'H'
   |
-  o  2: 'extra branch'
-  
-  o  1: 'E'
-  |
+  | o  3: 'G'
+  |/|
+  o |  2: 'F'
+  | |
+  | o  1: 'E'
+  |/
   o  0: 'A'
   
--- a/tests/test-rebase-keep-branch.t	Sun May 01 12:14:22 2011 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,71 +0,0 @@
-  $ cat >> $HGRCPATH <<EOF
-  > [extensions]
-  > graphlog=
-  > rebase=
-  > 
-  > [alias]
-  > tglog = log -G --template "{rev}: '{desc}' {branches}\n"
-  > EOF
-
-
-  $ hg init a
-  $ cd a
-
-  $ echo c1 > c1
-  $ hg ci -Am c1
-  adding c1
-
-  $ echo c2 > c2
-  $ hg ci -Am c2
-  adding c2
-
-  $ echo l1 > l1
-  $ hg ci -Am l1
-  adding l1
-
-  $ echo l2 > l2
-  $ hg ci -Am l2
-  adding l2
-
-  $ hg up -q -C 1
-
-  $ hg branch 'notdefault'
-  marked working directory as branch notdefault
-
-  $ echo r1 > r1
-  $ hg ci -Am r1
-  adding r1
-
-  $ hg tglog
-  @  4: 'r1' notdefault
-  |
-  | o  3: 'l2'
-  | |
-  | o  2: 'l1'
-  |/
-  o  1: 'c2'
-  |
-  o  0: 'c1'
-  
-
-Rebase a branch while preserving the branch name:
-
-  $ hg up -q -C 3
-
-  $ hg rebase -b 4 -d 3 --keepbranches
-  saved backup bundle to $TESTTMP/a/.hg/strip-backup/*-backup.hg (glob)
-
-  $ hg tglog
-  @  4: 'r1' notdefault
-  |
-  o  3: 'l2'
-  |
-  o  2: 'l1'
-  |
-  o  1: 'c2'
-  |
-  o  0: 'c1'
-  
-  $ hg branch
-  notdefault
-
--- a/tests/test-rebase-named-branches.t	Sun May 01 12:14:22 2011 +0200
+++ b/tests/test-rebase-named-branches.t	Sun May 01 06:04:08 2011 -0500
@@ -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 8 changesets with 7 changes to 7 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 ..
 
 
@@ -65,107 +36,72 @@
   $ hg ci -m 'extra named branch'
 
   $ hg tglog
-  @  6: 'extra named branch' dev
+  @  8: 'extra named branch' dev
   |
-  o  5: 'F'
+  o  7: 'H'
   |
-  | o  4: 'E'
+  | o  6: 'G'
   |/|
-  o |  3: 'D'
+  o |  5: 'F'
+  | |
+  | o  4: 'E'
+  |/
+  | o  3: 'D'
   | |
   | o  2: 'C'
-  |/
+  | |
   | o  1: 'B'
   |/
   o  0: 'A'
   
-  $ hg rebase -s 6 -d 5
+
+
+  $ hg rebase -s 1 -d 8 --keepbranches
   saved backup bundle to $TESTTMP/a1/.hg/strip-backup/*-backup.hg (glob)
 
   $ hg tglog
-  @  6: 'extra named branch'
+  @  8: 'D'
+  |
+  o  7: 'C'
+  |
+  o  6: 'B'
   |
-  o  5: 'F'
+  o  5: 'extra named branch' dev
   |
-  | o  4: 'E'
+  o  4: 'H'
+  |
+  | o  3: 'G'
   |/|
-  o |  3: 'D'
+  o |  2: 'F'
   | |
-  | o  2: 'C'
+  | o  1: 'E'
   |/
-  | o  1: 'B'
+  o  0: 'A'
+  
+  $ hg rebase -s 4 -d 5
+  abort: source is ancestor of destination
+  [255]
+
+  $ hg rebase -s 5 -d 4
+  saved backup bundle to $TESTTMP/a1/.hg/strip-backup/*-backup.hg (glob)
+
+  $ hg tglog
+  @  8: 'D'
+  |
+  o  7: 'C'
+  |
+  o  6: 'B'
+  |
+  o  5: 'extra named branch'
+  |
+  o  4: 'H'
+  |
+  | o  3: 'G'
+  |/|
+  o |  2: 'F'
+  | |
+  | o  1: 'E'
   |/
   o  0: 'A'
   
   $ cd ..
- 
-Rebasing descendant onto ancestor across the same named branches
-
-  $ hg clone -q -u . a a2
-
-  $ cd a2
-
-  $ echo x > x
-
-  $ hg add x
-
-  $ hg ci -m 'G'
-
-  $ hg tglog
-  @  6: 'G'
-  |
-  o  5: 'F'
-  |
-  | o  4: 'E'
-  |/|
-  o |  3: 'D'
-  | |
-  | o  2: 'C'
-  |/
-  | o  1: 'B'
-  |/
-  o  0: 'A'
-  
-  $ hg rebase -s 6 -d 5
-  abort: source is descendant of destination
-  [255]
-
-  $ cd ..
- 
-Rebasing ancestor onto descendant across different named branches
-
-  $ hg clone -q -u . a a3
-
-  $ cd a3
-
-  $ hg branch dev
-  marked working directory as branch dev
-
-  $ echo x > x
-
-  $ hg add x
-
-  $ hg ci -m 'extra named branch'
-
-  $ hg tglog
-  @  6: 'extra named branch' dev
-  |
-  o  5: 'F'
-  |
-  | o  4: 'E'
-  |/|
-  o |  3: 'D'
-  | |
-  | o  2: 'C'
-  |/
-  | o  1: 'B'
-  |/
-  o  0: 'A'
-  
-  $ hg rebase -s 5 -d 6
-  abort: source is ancestor of destination
-  [255]
-
-  $ cd ..
- 
-
--- a/tests/test-rebase-parameters.t	Sun May 01 12:14:22 2011 +0200
+++ b/tests/test-rebase-parameters.t	Sun May 01 06:04:08 2011 -0500
@@ -10,60 +10,37 @@
 
   $ hg init a
   $ cd a
-
-  $ echo c1 > c1
-  $ hg ci -Am c1
-  adding c1
-
-  $ echo c2 > c2
-  $ hg ci -Am c2
-  adding c2
-
-  $ echo c3 > c3
-  $ hg ci -Am c3
-  adding c3
-
-  $ hg up -q -C 1
+  $ hg unbundle $TESTDIR/bundles/rebase.hg
+  adding changesets
+  adding manifests
+  adding file changes
+  added 8 changesets with 7 changes to 7 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
 
-  $ echo l1 > l1
-  $ hg ci -Am l1
-  adding l1
-  created new head
-
-  $ echo l2 > l2
-  $ hg ci -Am l2
-  adding l2
-
-  $ echo l3 > l3
-  $ hg ci -Am l3
-  adding l3
-
-  $ hg up -q -C 2
-
-  $ echo r1 > r1
-  $ hg ci -Am r1
-  adding r1
-
-  $ echo r2 > r2
-  $ hg ci -Am r2
-  adding r2
+  $ echo I > I
+  $ hg ci -AmI
+  adding I
 
   $ hg tglog
-  @  7: 'r2'
+  @  8: 'I'
   |
-  o  6: 'r1'
+  o  7: 'H'
   |
-  | o  5: 'l3'
-  | |
-  | o  4: 'l2'
+  | o  6: 'G'
+  |/|
+  o |  5: 'F'
   | |
-  | o  3: 'l1'
-  | |
-  o |  2: 'c3'
+  | o  4: 'E'
   |/
-  o  1: 'c2'
-  |
-  o  0: 'c1'
+  | o  3: 'D'
+  | |
+  | o  2: 'C'
+  | |
+  | o  1: 'B'
+  |/
+  o  0: 'A'
   
   $ cd ..
 
@@ -73,6 +50,10 @@
   $ hg clone -q -u . a a1
   $ cd a1
 
+  $ hg rebase -s 8 -d 7
+  abort: source is descendant of destination
+  [255]
+
   $ hg rebase --continue --abort
   abort: cannot use both abort and continue
   [255]
@@ -93,7 +74,7 @@
   nothing to rebase
   [1]
 
-  $ hg up -q 6
+  $ hg up -q 7
 
   $ hg rebase
   nothing to rebase
@@ -102,29 +83,31 @@
 
 These work:
 
-Rebase with no arguments (from 3 onto 7):
+Rebase with no arguments (from 3 onto 8):
 
-  $ hg up -q -C 5
+  $ hg up -q -C 3
 
   $ hg rebase
   saved backup bundle to $TESTTMP/a1/.hg/strip-backup/*-backup.hg (glob)
 
   $ hg tglog
-  @  7: 'l3'
+  @  8: 'D'
   |
-  o  6: 'l2'
+  o  7: 'C'
   |
-  o  5: 'l1'
+  o  6: 'B'
   |
-  o  4: 'r2'
+  o  5: 'I'
   |
-  o  3: 'r1'
-  |
-  o  2: 'c3'
+  o  4: 'H'
   |
-  o  1: 'c2'
-  |
-  o  0: 'c1'
+  | o  3: 'G'
+  |/|
+  o |  2: 'F'
+  | |
+  | o  1: 'E'
+  |/
+  o  0: 'A'
   
 Try to rollback after a rebase (fail):
 
@@ -135,198 +118,212 @@
   $ cd ..
 
 
-Rebase with base == '.' => same as no arguments (from 3 onto 7):
+Rebase with base == '.' => same as no arguments (from 3 onto 8):
 
-  $ hg clone -q -u 5 a a2
+  $ hg clone -q -u 3 a a2
   $ cd a2
 
   $ hg rebase --base .
   saved backup bundle to $TESTTMP/a2/.hg/strip-backup/*-backup.hg (glob)
 
   $ hg tglog
-  @  7: 'l3'
+  @  8: 'D'
   |
-  o  6: 'l2'
+  o  7: 'C'
   |
-  o  5: 'l1'
+  o  6: 'B'
   |
-  o  4: 'r2'
+  o  5: 'I'
   |
-  o  3: 'r1'
-  |
-  o  2: 'c3'
+  o  4: 'H'
   |
-  o  1: 'c2'
-  |
-  o  0: 'c1'
+  | o  3: 'G'
+  |/|
+  o |  2: 'F'
+  | |
+  | o  1: 'E'
+  |/
+  o  0: 'A'
   
   $ cd ..
 
 
-Rebase with dest == `hg branch` => same as no arguments (from 3 onto 7):
+Rebase with dest == `hg branch` => same as no arguments (from 3 onto 8):
 
-  $ hg clone -q -u 5 a a3
+  $ hg clone -q -u 3 a a3
   $ cd a3
 
   $ hg rebase --dest `hg branch`
   saved backup bundle to $TESTTMP/a3/.hg/strip-backup/*-backup.hg (glob)
 
   $ hg tglog
-  @  7: 'l3'
+  @  8: 'D'
   |
-  o  6: 'l2'
+  o  7: 'C'
   |
-  o  5: 'l1'
+  o  6: 'B'
   |
-  o  4: 'r2'
+  o  5: 'I'
   |
-  o  3: 'r1'
-  |
-  o  2: 'c3'
+  o  4: 'H'
   |
-  o  1: 'c2'
-  |
-  o  0: 'c1'
+  | o  3: 'G'
+  |/|
+  o |  2: 'F'
+  | |
+  | o  1: 'E'
+  |/
+  o  0: 'A'
   
   $ cd ..
 
 
-Specify only source (from 4 onto 7):
+Specify only source (from 2 onto 8):
 
   $ hg clone -q -u . a a4
   $ cd a4
 
-  $ hg rebase --source 4
+  $ hg rebase --source 2
   saved backup bundle to $TESTTMP/a4/.hg/strip-backup/*-backup.hg (glob)
 
   $ hg tglog
-  @  7: 'l3'
+  @  8: 'D'
   |
-  o    6: 'l2'
+  o    7: 'C'
   |\
-  | o  5: 'r2'
+  | o  6: 'I'
   | |
-  | o  4: 'r1'
+  | o  5: 'H'
   | |
-  o |  3: 'l1'
-  | |
-  | o  2: 'c3'
+  | | o  4: 'G'
+  | |/|
+  | o |  3: 'F'
+  | | |
+  | | o  2: 'E'
+  | |/
+  o |  1: 'B'
   |/
-  o  1: 'c2'
-  |
-  o  0: 'c1'
+  o  0: 'A'
   
   $ cd ..
 
 
 Specify only dest (from 3 onto 6):
 
-  $ hg clone -q -u 5 a a5
+  $ hg clone -q -u 3 a a5
   $ cd a5
 
   $ hg rebase --dest 6
   saved backup bundle to $TESTTMP/a5/.hg/strip-backup/*-backup.hg (glob)
 
   $ hg tglog
-  @  7: 'l3'
+  @  8: 'D'
   |
-  o  6: 'l2'
+  o  7: 'C'
+  |
+  o  6: 'B'
   |
-  o  5: 'l1'
-  |
-  | o  4: 'r2'
+  | o  5: 'I'
+  | |
+  | o  4: 'H'
+  | |
+  o |  3: 'G'
+  |\|
+  | o  2: 'F'
+  | |
+  o |  1: 'E'
   |/
-  o  3: 'r1'
-  |
-  o  2: 'c3'
-  |
-  o  1: 'c2'
-  |
-  o  0: 'c1'
+  o  0: 'A'
   
   $ cd ..
 
 
-Specify only base (from 3 onto 7):
+Specify only base (from 1 onto 8):
 
   $ hg clone -q -u . a a6
   $ cd a6
 
-  $ hg rebase --base 5
+  $ hg rebase --base 3
   saved backup bundle to $TESTTMP/a6/.hg/strip-backup/*-backup.hg (glob)
 
   $ hg tglog
-  @  7: 'l3'
+  @  8: 'D'
   |
-  o  6: 'l2'
+  o  7: 'C'
   |
-  o  5: 'l1'
+  o  6: 'B'
   |
-  o  4: 'r2'
+  o  5: 'I'
   |
-  o  3: 'r1'
-  |
-  o  2: 'c3'
+  o  4: 'H'
   |
-  o  1: 'c2'
-  |
-  o  0: 'c1'
+  | o  3: 'G'
+  |/|
+  o |  2: 'F'
+  | |
+  | o  1: 'E'
+  |/
+  o  0: 'A'
   
   $ cd ..
 
 
-Specify source and dest (from 4 onto 6):
+Specify source and dest (from 2 onto 7):
 
   $ hg clone -q -u . a a7
   $ cd a7
 
-  $ hg rebase --source 4 --dest 6
+  $ hg rebase --detach --source 2 --dest 7
   saved backup bundle to $TESTTMP/a7/.hg/strip-backup/*-backup.hg (glob)
 
   $ hg tglog
-  @  7: 'l3'
+  @  8: 'D'
+  |
+  o  7: 'C'
   |
-  o    6: 'l2'
-  |\
-  | | o  5: 'r2'
-  | |/
-  | o  4: 'r1'
+  | o  6: 'I'
+  |/
+  o  5: 'H'
+  |
+  | o  4: 'G'
+  |/|
+  o |  3: 'F'
   | |
-  o |  3: 'l1'
-  | |
-  | o  2: 'c3'
+  | o  2: 'E'
   |/
-  o  1: 'c2'
-  |
-  o  0: 'c1'
+  | o  1: 'B'
+  |/
+  o  0: 'A'
   
   $ cd ..
 
 
-Specify base and dest (from 3 onto 6):
+Specify base and dest (from 1 onto 7):
 
   $ hg clone -q -u . a a8
   $ cd a8
 
-  $ hg rebase --base 4 --dest 6
+  $ hg rebase --base 3 --dest 7
   saved backup bundle to $TESTTMP/a8/.hg/strip-backup/*-backup.hg (glob)
 
   $ hg tglog
-  @  7: 'l3'
+  @  8: 'D'
   |
-  o  6: 'l2'
+  o  7: 'C'
   |
-  o  5: 'l1'
+  o  6: 'B'
   |
-  | o  4: 'r2'
+  | o  5: 'I'
   |/
-  o  3: 'r1'
-  |
-  o  2: 'c3'
+  o  4: 'H'
   |
-  o  1: 'c2'
-  |
-  o  0: 'c1'
+  | o  3: 'G'
+  |/|
+  o |  2: 'F'
+  | |
+  | o  1: 'E'
+  |/
+  o  0: 'A'
   
   $ cd ..
 
--- a/tests/test-rebase-scenario-global.t	Sun May 01 12:14:22 2011 +0200
+++ b/tests/test-rebase-scenario-global.t	Sun May 01 06:04:08 2011 -0500
@@ -10,122 +10,111 @@
 
   $ 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 8 changesets with 7 changes to 7 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 ..
 
 
 Rebasing
-B onto F - simple rebase:
+D onto H - simple rebase:
 
   $ hg clone -q -u . a a1
   $ cd a1
 
   $ hg tglog
-  @  5: 'F'
+  @  7: 'H'
   |
+  | o  6: 'G'
+  |/|
+  o |  5: 'F'
+  | |
   | o  4: 'E'
-  |/|
-  o |  3: 'D'
+  |/
+  | o  3: 'D'
   | |
   | o  2: 'C'
-  |/
+  | |
   | o  1: 'B'
   |/
   o  0: 'A'
   
-  $ hg rebase -s 1 -d 5
+
+  $ hg rebase -s 3 -d 7
   saved backup bundle to $TESTTMP/a1/.hg/strip-backup/*-backup.hg (glob)
 
   $ hg tglog
-  @  5: 'B'
-  |
-  o  4: 'F'
-  |
-  | o  3: 'E'
-  |/|
-  o |  2: 'D'
+  @    7: 'D'
+  |\
+  | o  6: 'H'
   | |
-  | o  1: 'C'
+  | | o  5: 'G'
+  | |/|
+  | o |  4: 'F'
+  | | |
+  | | o  3: 'E'
+  | |/
+  o |  2: 'C'
+  | |
+  o |  1: 'B'
   |/
   o  0: 'A'
   
   $ cd ..
 
 
-B onto D - intermediate point:
+D onto F - intermediate point:
 
   $ hg clone -q -u . a a2
   $ cd a2
 
-  $ hg rebase -s 1 -d 3
+  $ hg rebase -s 3 -d 5
   saved backup bundle to $TESTTMP/a2/.hg/strip-backup/*-backup.hg (glob)
 
   $ hg tglog
-  @  5: 'B'
-  |
-  | o  4: 'F'
-  |/
-  | o  3: 'E'
-  |/|
-  o |  2: 'D'
+  @    7: 'D'
+  |\
+  | | o  6: 'H'
+  | |/
+  | | o  5: 'G'
+  | |/|
+  | o |  4: 'F'
+  | | |
+  | | o  3: 'E'
+  | |/
+  o |  2: 'C'
   | |
-  | o  1: 'C'
+  o |  1: 'B'
   |/
   o  0: 'A'
   
   $ cd ..
 
 
-C onto F - skip of E:
+E onto H - skip of G:
 
   $ hg clone -q -u . a a3
   $ cd a3
 
-  $ hg rebase -s 2 -d 5
+  $ hg rebase -s 4 -d 7
   saved backup bundle to $TESTTMP/a3/.hg/strip-backup/*-backup.hg (glob)
 
   $ hg tglog
-  @  4: 'C'
+  @  6: 'E'
+  |
+  o  5: 'H'
   |
-  o  3: 'F'
+  o  4: 'F'
   |
-  o  2: 'D'
-  |
+  | o  3: 'D'
+  | |
+  | o  2: 'C'
+  | |
   | o  1: 'B'
   |/
   o  0: 'A'
@@ -133,21 +122,25 @@
   $ cd ..
 
 
-D onto C - rebase of a branching point (skip E):
+F onto E - rebase of a branching point (skip G):
 
   $ hg clone -q -u . a a4
   $ cd a4
 
-  $ hg rebase -s 3 -d 2
+  $ hg rebase -s 5 -d 4
   saved backup bundle to $TESTTMP/a4/.hg/strip-backup/*-backup.hg (glob)
 
   $ hg tglog
-  @  4: 'F'
+  @  6: 'H'
+  |
+  o  5: 'F'
   |
-  o  3: 'D'
+  o  4: 'E'
   |
-  o  2: 'C'
-  |
+  | o  3: 'D'
+  | |
+  | o  2: 'C'
+  | |
   | o  1: 'B'
   |/
   o  0: 'A'
@@ -155,23 +148,27 @@
   $ cd ..
 
 
-E onto F - merged revision having a parent in ancestors of target:
+G onto H - merged revision having a parent in ancestors of target:
 
   $ hg clone -q -u . a a5
   $ cd a5
 
-  $ hg rebase -s 4 -d 5
+  $ hg rebase -s 6 -d 7
   saved backup bundle to $TESTTMP/a5/.hg/strip-backup/*-backup.hg (glob)
 
   $ hg tglog
-  @    5: 'E'
+  @    7: 'G'
   |\
-  | o  4: 'F'
+  | o  6: 'H'
   | |
+  | o  5: 'F'
+  | |
+  o |  4: 'E'
+  |/
   | o  3: 'D'
   | |
-  o |  2: 'C'
-  |/
+  | o  2: 'C'
+  | |
   | o  1: 'B'
   |/
   o  0: 'A'
@@ -179,22 +176,26 @@
   $ cd ..
 
 
-D onto B - E maintains C as parent:
+F onto B - G maintains E as parent:
 
   $ hg clone -q -u . a a6
   $ cd a6
 
-  $ hg rebase -s 3 -d 1
+  $ hg rebase -s 5 -d 1
   saved backup bundle to $TESTTMP/a6/.hg/strip-backup/*-backup.hg (glob)
 
   $ hg tglog
-  @  5: 'F'
+  @  7: 'H'
   |
-  | o  4: 'E'
+  | o  6: 'G'
   |/|
-  o |  3: 'D'
+  o |  5: 'F'
+  | |
+  | o  4: 'E'
   | |
-  | o  2: 'C'
+  | | o  3: 'D'
+  | | |
+  +---o  2: 'C'
   | |
   o |  1: 'B'
   |/
@@ -205,45 +206,45 @@
 
 These will fail (using --source):
 
-E onto D - rebase onto an ancestor:
+G onto F - rebase onto an ancestor:
 
   $ hg clone -q -u . a a7
   $ cd a7
 
-  $ hg rebase -s 4 -d 3
+  $ hg rebase -s 6 -d 5
   abort: source is descendant of destination
   [255]
 
-D onto E - rebase onto a descendant:
+F onto G - rebase onto a descendant:
 
-  $ hg rebase -s 3 -d 4
+  $ hg rebase -s 5 -d 6
   abort: source is ancestor of destination
   [255]
 
-E onto B - merge revision with both parents not in ancestors of target:
+G onto B - merge revision with both parents not in ancestors of target:
 
-  $ hg rebase -s 4 -d 1
-  abort: cannot use revision 4 as base, result would have 3 parents
+  $ hg rebase -s 6 -d 1
+  abort: cannot use revision 6 as base, result would have 3 parents
   [255]
 
 
 These will abort gracefully (using --base):
 
-E onto E - rebase onto same changeset:
+G onto G - rebase onto same changeset:
 
-  $ hg rebase -b 4 -d 4
+  $ hg rebase -b 6 -d 6
   nothing to rebase
   [1]
 
-E onto D - rebase onto an ancestor:
+G onto F - rebase onto an ancestor:
 
-  $ hg rebase -b 4 -d 3
+  $ hg rebase -b 6 -d 5
   nothing to rebase
   [1]
 
-D onto E - rebase onto a descendant:
+F onto G - rebase onto a descendant:
 
-  $ hg rebase -b 3 -d 4
+  $ hg rebase -b 5 -d 6
   nothing to rebase
   [1]
 
--- a/tests/test-ssh-clone-r.t	Sun May 01 12:14:22 2011 +0200
+++ b/tests/test-ssh-clone-r.t	Sun May 01 06:04:08 2011 -0500
@@ -22,83 +22,19 @@
   > r = os.system(sys.argv[2])
   > sys.exit(bool(r))
   > EOF
-  $ hg init remote
-  $ cd remote
 
 creating 'remote
 
-  $ cat >>afile <<EOF
-  > 0
-  > EOF
-  $ hg add afile
-  $ hg commit -m "0.0"
-  $ cat >>afile <<EOF
-  > 1
-  > EOF
-  $ hg commit -m "0.1"
-  $ cat >>afile <<EOF
-  > 2
-  > EOF
-  $ hg commit -m "0.2"
-  $ cat >>afile <<EOF
-  > 3
-  > EOF
-  $ hg commit -m "0.3"
-  $ hg update -C 0
+  $ hg init remote
+  $ cd remote
+  $ hg 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
-  $ cat >>afile <<EOF
-  > 1
-  > EOF
-  $ hg commit -m "1.1"
-  created new head
-  $ cat >>afile <<EOF
-  > 2
-  > EOF
-  $ hg commit -m "1.2"
-  $ cat >fred <<EOF
-  > a line
-  > EOF
-  $ cat >>afile <<EOF
-  > 3
-  > EOF
-  $ hg add fred
-  $ hg commit -m "1.3"
-  $ hg mv afile adifferentfile
-  $ hg commit -m "1.3m"
-  $ hg update -C 3
-  1 files updated, 0 files merged, 2 files removed, 0 files unresolved
-  $ hg mv afile anotherfile
-  $ hg commit -m "0.3m"
-  $ hg debugindex .hg/store/data/afile.i
-     rev    offset  length   base linkrev nodeid       p1           p2
-       0         0       3      0       0 362fef284ce2 000000000000 000000000000
-       1         3       5      1       1 125144f7e028 362fef284ce2 000000000000
-       2         8       7      2       2 4c982badb186 125144f7e028 000000000000
-       3        15       9      3       3 19b1fc555737 4c982badb186 000000000000
-  $ hg debugindex .hg/store/data/adifferentfile.i
-     rev    offset  length   base linkrev nodeid       p1           p2
-       0         0      75      0       7 2565f3199a74 000000000000 000000000000
-  $ hg debugindex .hg/store/data/anotherfile.i
-     rev    offset  length   base linkrev nodeid       p1           p2
-       0         0      75      0       8 2565f3199a74 000000000000 000000000000
-  $ hg debugindex .hg/store/data/fred.i
-     rev    offset  length   base linkrev nodeid       p1           p2
-       0         0       8      0       6 12ab3bcc5ea4 000000000000 000000000000
-  $ hg debugindex .hg/store/00manifest.i
-     rev    offset  length   base linkrev nodeid       p1           p2
-       0         0      48      0       0 43eadb1d2d06 000000000000 000000000000
-       1        48      48      1       1 8b89697eba2c 43eadb1d2d06 000000000000
-       2        96      48      2       2 626a32663c2f 8b89697eba2c 000000000000
-       3       144      48      3       3 f54c32f13478 626a32663c2f 000000000000
-       4       192      58      3       6 de68e904d169 626a32663c2f 000000000000
-       5       250      68      3       7 09bb521d218d de68e904d169 000000000000
-       6       318      54      6       8 1fde233dfb0f f54c32f13478 000000000000
-  $ hg verify
-  checking changesets
-  checking manifests
-  crosschecking files in changesets and manifests
-  checking files
-  4 files, 9 changesets, 7 total revisions
   $ cd ..
 
 clone remote via stream
--- a/tests/test-symlink-os-yes-fs-no.py	Sun May 01 12:14:22 2011 +0200
+++ b/tests/test-symlink-os-yes-fs-no.py	Sun May 01 06:04:08 2011 -0500
@@ -2,6 +2,7 @@
 from mercurial import hg, ui, commands
 
 TESTDIR = os.environ["TESTDIR"]
+BUNDLEPATH = os.path.join(TESTDIR, 'bundles', 'test-no-symlinks.hg')
 
 # only makes sense to test on os which supports symlinks
 if not hasattr(os, "symlink"):
@@ -9,7 +10,7 @@
 
 # clone with symlink support
 u = ui.ui()
-hg.clone(u, os.path.join(TESTDIR, 'test-no-symlinks.hg'), 'test0')
+hg.clone(u, BUNDLEPATH, 'test0')
 
 repo = hg.repository(u, 'test0')
 
@@ -38,4 +39,4 @@
 
 # try cloning a repo which contains symlinks
 u = ui.ui()
-hg.clone(u, os.path.join(TESTDIR, 'test-no-symlinks.hg'), 'test1')
+hg.clone(u, BUNDLEPATH, 'test1')