tests: add missing no-outer-repo requirements
Outer repos (if any) will now never be touched by the tests. But it is better
to run without any repos around the tmp directory.
--- a/tests/test-alias.t Wed Jun 20 23:41:21 2012 +0200
+++ b/tests/test-alias.t Wed Jun 20 23:41:21 2012 +0200
@@ -109,8 +109,10 @@
optional repository
+#if no-outer-repo
$ hg optionalrepo
init
+#endif
$ cd alias
$ cat > .hg/hgrc <<EOF
> [alias]
--- a/tests/test-bundle.t Wed Jun 20 23:41:21 2012 +0200
+++ b/tests/test-bundle.t Wed Jun 20 23:41:21 2012 +0200
@@ -388,6 +388,9 @@
[255]
$ cd ..
+hide outer repo
+ $ hg init
+
Direct clone from bundle (all-history)
$ hg clone full.hg full-clone
--- a/tests/test-config-case.t Wed Jun 20 23:41:21 2012 +0200
+++ b/tests/test-config-case.t Wed Jun 20 23:41:21 2012 +0200
@@ -1,3 +1,6 @@
+hide outer repo
+ $ hg init
+
$ echo '[Section]' >> $HGRCPATH
$ echo 'KeY = Case Sensitive' >> $HGRCPATH
$ echo 'key = lower case' >> $HGRCPATH
--- a/tests/test-convert-cvs.t Wed Jun 20 23:41:21 2012 +0200
+++ b/tests/test-convert-cvs.t Wed Jun 20 23:41:21 2012 +0200
@@ -143,9 +143,9 @@
sorting...
converting...
updating tags
- $ hg cat -r tip srcfull-hg/src/a
+ $ hg cat -r tip --cwd srcfull-hg src/a
a
- $ hg cat -r tip srcfull-hg/src/b/c
+ $ hg cat -r tip --cwd srcfull-hg src/b/c
c
c
--- a/tests/test-convert-darcs.t Wed Jun 20 23:41:21 2012 +0200
+++ b/tests/test-convert-darcs.t Wed Jun 20 23:41:21 2012 +0200
@@ -14,12 +14,16 @@
> exit 80
> fi
+#if no-outer-repo
+
try converting darcs1 repository
$ 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
+#endif
+
initialize darcs repo
$ mkdir darcs-repo
--- a/tests/test-hgrc.t Wed Jun 20 23:41:21 2012 +0200
+++ b/tests/test-hgrc.t Wed Jun 20 23:41:21 2012 +0200
@@ -1,3 +1,6 @@
+hide outer repo
+ $ hg init
+
Use hgrc within $TESTTMP
$ HGRCPATH=`pwd`/hgrc
@@ -63,6 +66,7 @@
make sure global options given on the cmdline take precedence
$ hg showconfig --config ui.verbose=True --quiet
+ bundle.mainreporoot=$TESTTMP
ui.verbose=False
ui.debug=False
ui.quiet=True
@@ -93,6 +97,7 @@
$ cd ..
$ hg showconfig
+ bundle.mainreporoot=$TESTTMP
ui.username=$FAKEUSER
$ unset FAKEUSER
@@ -117,7 +122,6 @@
HGPLAIN
- $ p=`pwd`
$ echo "[ui]" > $HGRC
$ echo "debug=true" >> $HGRC
$ echo "fallbackencoding=ASCII" >> $HGRC
@@ -137,6 +141,7 @@
$ hg showconfig
read config from: $TESTTMP/hgrc
$TESTTMP/hgrc:13: alias.log=log -g
+ none: bundle.mainreporoot=$TESTTMP
$TESTTMP/hgrc:11: defaults.identify=-n
$TESTTMP/hgrc:2: ui.debug=true
$TESTTMP/hgrc:3: ui.fallbackencoding=ASCII
@@ -152,6 +157,7 @@
$ HGPLAIN=; export HGPLAIN
$ hg showconfig --config ui.traceback=True --debug
read config from: $TESTTMP/hgrc
+ none: bundle.mainreporoot=$TESTTMP
none: ui.traceback=True
none: ui.verbose=False
none: ui.debug=True
@@ -169,6 +175,7 @@
$ hg showconfig --config ui.traceback=True --debug
plain: True
read config from: $TESTTMP/hgrc
+ none: bundle.mainreporoot=$TESTTMP
$TESTTMP/hgrc:15: extensions.plain=./plain.py
none: ui.traceback=True
none: ui.verbose=False
@@ -178,6 +185,7 @@
$ hg showconfig --config ui.traceback=True --debug
plain: True
read config from: $TESTTMP/hgrc
+ none: bundle.mainreporoot=$TESTTMP
$TESTTMP/hgrc:15: extensions.plain=./plain.py
none: ui.traceback=True
none: ui.verbose=False
@@ -187,6 +195,7 @@
$ hg showconfig --config ui.traceback=True --debug
plain: True
read config from: $TESTTMP/hgrc
+ none: bundle.mainreporoot=$TESTTMP
$TESTTMP/hgrc:15: extensions.plain=./plain.py
none: ui.traceback=True
none: ui.verbose=False
--- a/tests/test-hgwebdir.t Wed Jun 20 23:41:21 2012 +0200
+++ b/tests/test-hgwebdir.t Wed Jun 20 23:41:21 2012 +0200
@@ -1,5 +1,10 @@
$ "$TESTDIR/hghave" serve || exit 80
+hide outer repo and work in dir without '.hg'
+ $ hg init
+ $ mkdir dir
+ $ cd dir
+
Tests some basic hgwebdir functionality. Tests setting up paths and
collection, different forms of 404s and the subdirectory support.
@@ -59,6 +64,8 @@
$ rm -R nostore/.hg/store
$ root=`pwd`
$ cd ..
+
+serve
$ cat > paths.conf <<EOF
> [paths]
> a=$root/a
--- a/tests/test-hgwebdirsym.t Wed Jun 20 23:41:21 2012 +0200
+++ b/tests/test-hgwebdirsym.t Wed Jun 20 23:41:21 2012 +0200
@@ -1,6 +1,10 @@
Tests whether or not hgwebdir properly handles various symlink topologies.
$ "$TESTDIR/hghave" serve symlink || exit 80
+
+hide outer repo
+ $ hg init
+
$ hg init a
$ echo a > a/a
$ hg --cwd a ci -Ama -d'1 0'
--- a/tests/test-i18n.t Wed Jun 20 23:41:21 2012 +0200
+++ b/tests/test-i18n.t Wed Jun 20 23:41:21 2012 +0200
@@ -2,6 +2,8 @@
$ "$TESTDIR/hghave" gettext || exit 80
+#if no-outer-repo
+
Test that translations are compiled and installed correctly.
Default encoding in tests is "ascii" and the translation is encoded
@@ -23,6 +25,8 @@
abortado: n\xe3o foi encontrado um reposit\xf3rio em '$TESTTMP' (.hg n\xe3o encontrado)! (esc)
[255]
+#endif
+
Test keyword search in translated help text:
$ HGENCODING=UTF-8 LANGUAGE=de hg help -k blättern
--- a/tests/test-keyword.t Wed Jun 20 23:41:21 2012 +0200
+++ b/tests/test-keyword.t Wed Jun 20 23:41:21 2012 +0200
@@ -11,6 +11,9 @@
> interactive = true
> EOF
+hide outer repo
+ $ hg init
+
Run kwdemo before [keyword] files are set up
as it would succeed without uisetup otherwise
--- a/tests/test-mq-qclone-http.t Wed Jun 20 23:41:21 2012 +0200
+++ b/tests/test-mq-qclone-http.t Wed Jun 20 23:41:21 2012 +0200
@@ -1,5 +1,8 @@
$ "$TESTDIR/hghave" serve || exit 80
+hide outer repo
+ $ hg init
+
$ echo "[extensions]" >> $HGRCPATH
$ echo "mq=" >> $HGRCPATH
$ mkdir webdir
--- a/tests/test-mq.t Wed Jun 20 23:41:21 2012 +0200
+++ b/tests/test-mq.t Wed Jun 20 23:41:21 2012 +0200
@@ -211,6 +211,8 @@
$ cd ..
+#if no-outer-repo
+
init --mq without repo
$ mkdir f
@@ -220,6 +222,8 @@
[255]
$ cd ..
+#endif
+
init --mq with repo path
$ hg init g
--- a/tests/test-ssh.t Wed Jun 20 23:41:21 2012 +0200
+++ b/tests/test-ssh.t Wed Jun 20 23:41:21 2012 +0200
@@ -271,6 +271,9 @@
$ cd ..
+hide outer repo
+ $ hg init
+
Test remote paths with spaces (issue2983):
$ hg init --ssh "python \"$TESTDIR/dummyssh\"" "ssh://user@dummy/a repo"
--- a/tests/test-subrepo-relative-path.t Wed Jun 20 23:41:21 2012 +0200
+++ b/tests/test-subrepo-relative-path.t Wed Jun 20 23:41:21 2012 +0200
@@ -29,6 +29,9 @@
0 files updated, 0 files merged, 3 files removed, 0 files unresolved
$ rm -rf main/sub
+hide outer repo
+ $ hg init
+
Serving them both using hgweb
$ printf '[paths]\n/main = main\nsub = sub\n' > webdir.conf
--- a/tests/test-symlink-os-yes-fs-no.py Wed Jun 20 23:41:21 2012 +0200
+++ b/tests/test-symlink-os-yes-fs-no.py Wed Jun 20 23:41:21 2012 +0200
@@ -8,8 +8,11 @@
if not getattr(os, "symlink", False):
sys.exit(80) # SKIPPED_STATUS defined in run-tests.py
+u = ui.ui()
+# hide outer repo
+hg.peer(u, {}, '.', create=True)
+
# clone with symlink support
-u = ui.ui()
hg.clone(u, {}, BUNDLEPATH, 'test0')
repo = hg.repository(u, 'test0')