tests: use `hg unbundle` instead of `hg pull` in some tests
authorGregory Szorc <gregory.szorc@gmail.com>
Tue, 03 Apr 2018 13:56:09 -0700
changeset 37336 5d10f41ddcc4
parent 37335 956260cbc564
child 37337 d257c5f2a940
tests: use `hg unbundle` instead of `hg pull` in some tests `hg pull <bundle>` uses the special "bundlerepo" repository. The bundlerepo code makes many assumptions about the storage of repositories. It will be difficult to teach bundlerepo to use non-revlog storage before a better storage interface is established. Many test failures using our "simple store" are related to bundlerepo: the simple store just isn't compatible with bundlerepo because of storage assumptions in bundlerepo. In order to mitigate the impact of bundlerepo on our code base, this commit changes various tests to use `hg unbundle` instead of `hg pull`. This bypasses the bundlerepo code. Tests exercising exchange functionality have not been altered, as they should be using `hg pull` and going through the bundlerepo code paths. Differential Revision: https://phab.mercurial-scm.org/D3059
tests/test-branches.t
tests/test-bundle-type.t
tests/test-keyword.t
tests/test-merge-symlinks.t
tests/test-rebase-conflicts.t
tests/test-strip.t
tests/test-treemanifest.t
--- a/tests/test-branches.t	Wed Apr 04 09:41:18 2018 -0700
+++ b/tests/test-branches.t	Tue Apr 03 13:56:09 2018 -0700
@@ -86,9 +86,7 @@
 
   $ hg init test-invalid-branch-name
   $ cd test-invalid-branch-name
-  $ hg pull -u "$TESTDIR"/bundles/test-invalid-branch-name.hg
-  pulling from *test-invalid-branch-name.hg (glob)
-  requesting all changes
+  $ hg unbundle -u "$TESTDIR"/bundles/test-invalid-branch-name.hg
   adding changesets
   adding manifests
   adding file changes
--- a/tests/test-bundle-type.t	Wed Apr 04 09:41:18 2018 -0700
+++ b/tests/test-bundle-type.t	Tue Apr 03 13:56:09 2018 -0700
@@ -13,9 +13,7 @@
   1 changesets found
 
   $ cd ../t2
-  $ hg pull ../b1
-  pulling from ../b1
-  requesting all changes
+  $ hg unbundle ../b1
   adding changesets
   adding manifests
   adding file changes
@@ -32,7 +30,7 @@
 
   $ hg init t3
   $ cd t3
-  $ hg -q pull ../b1
+  $ hg -q unbundle ../b1
   $ hg bundle -a -t unknown out.hg
   abort: unknown is not a recognized bundle specification
   (see 'hg help bundlespec' for supported values for --type)
--- a/tests/test-keyword.t	Wed Apr 04 09:41:18 2018 -0700
+++ b/tests/test-keyword.t	Tue Apr 03 13:56:09 2018 -0700
@@ -118,14 +118,14 @@
  hg ci -m addsym -u mercurial
  hg bundle --base null ../test-keyword.hg
 
-  $ hg pull -u "$TESTDIR"/bundles/test-keyword.hg
-  pulling from *test-keyword.hg (glob)
-  requesting all changes
+  $ hg unbundle "$TESTDIR"/bundles/test-keyword.hg
   adding changesets
   adding manifests
   adding file changes
   added 1 changesets with 1 changes to 1 files
   new changesets a2392c293916
+  (run 'hg update' to get a working copy)
+  $ hg up a2392c293916
   1 files updated, 0 files merged, 0 files removed, 0 files unresolved
 
   $ echo 'expand $Id$' > a
--- a/tests/test-merge-symlinks.t	Wed Apr 04 09:41:18 2018 -0700
+++ b/tests/test-merge-symlinks.t	Tue Apr 03 13:56:09 2018 -0700
@@ -31,7 +31,7 @@
 
   $ hg init t
   $ cd t
-  $ hg -q pull "$TESTDIR/bundles/test-merge-symlinks.hg"
+  $ hg -q unbundle "$TESTDIR/bundles/test-merge-symlinks.hg"
   $ hg up -C 3
   3 files updated, 0 files merged, 0 files removed, 0 files unresolved
 
--- a/tests/test-rebase-conflicts.t	Wed Apr 04 09:41:18 2018 -0700
+++ b/tests/test-rebase-conflicts.t	Tue Apr 03 13:56:09 2018 -0700
@@ -148,16 +148,17 @@
 
 Check that the right ancestors is used while rebasing a merge (issue4041)
 
-  $ hg clone "$TESTDIR/bundles/issue4041.hg" issue4041
-  requesting all changes
+  $ hg init issue4041
+  $ cd issue4041
+  $ hg unbundle "$TESTDIR/bundles/issue4041.hg"
   adding changesets
   adding manifests
   adding file changes
   added 11 changesets with 8 changes to 3 files (+1 heads)
   new changesets 24797d4f68de:2f2496ddf49d
-  updating to branch default
+  (run 'hg heads' to see heads)
+  $ hg up default
   2 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  $ cd issue4041
   $ hg log -G
   o    changeset:   10:2f2496ddf49d
   |\   branch:      f1
--- a/tests/test-strip.t	Wed Apr 04 09:41:18 2018 -0700
+++ b/tests/test-strip.t	Tue Apr 03 13:56:09 2018 -0700
@@ -215,13 +215,11 @@
   cache:rev-branch-cache -- {}
   phase-heads -- {}
       264128213d290d868c54642d13aeaa3675551a78 draft
-  $ hg pull .hg/strip-backup/*
-  pulling from .hg/strip-backup/264128213d29-0b39d6bf-backup.hg
-  searching for changes
+  $ hg unbundle .hg/strip-backup/*
   adding changesets
   adding manifests
   adding file changes
-  added 1 changesets with 0 changes to 0 files (+1 heads)
+  added 1 changesets with 0 changes to 1 files (+1 heads)
   new changesets 264128213d29
   (run 'hg heads' to see heads, 'hg merge' to merge)
   $ rm .hg/strip-backup/*
@@ -1107,9 +1105,7 @@
      summary:     commitA
   
 
-  $ hg pull -u $TESTTMP/issue4736/.hg/strip-backup/35358f982181-a6f020aa-backup.hg
-  pulling from $TESTTMP/issue4736/.hg/strip-backup/35358f982181-a6f020aa-backup.hg
-  searching for changes
+  $ hg unbundle -u $TESTTMP/issue4736/.hg/strip-backup/35358f982181-a6f020aa-backup.hg
   adding changesets
   adding manifests
   adding file changes
--- a/tests/test-treemanifest.t	Wed Apr 04 09:41:18 2018 -0700
+++ b/tests/test-treemanifest.t	Tue Apr 03 13:56:09 2018 -0700
@@ -334,9 +334,7 @@
   date:        Thu Jan 01 00:00:00 1970 +0000
   summary:     modify dir1/a
   
-  $ hg pull .hg/strip-backup/*
-  pulling from .hg/strip-backup/51cfd7b1e13b-78a2f3ed-backup.hg
-  searching for changes
+  $ hg unbundle .hg/strip-backup/*
   adding changesets
   adding manifests
   adding file changes