diff --git a/hgext/rebase.py b/hgext/rebase.py index c8eda7bbdcab193934f04e43a4ee592c139be028_aGdleHQvcmViYXNlLnB5..efd2e14f72353626355dc82465bdf23bf6416aa2_aGdleHQvcmViYXNlLnB5 100644 --- a/hgext/rebase.py +++ b/hgext/rebase.py @@ -558,10 +558,11 @@ def abort(repo, originalwd, target, state): 'Restore the repository to its original state' dstates = [s for s in state.values() if s != nullrev] - if [d for d in dstates if not repo[d].mutable()]: - repo.ui.warn(_("warning: immutable rebased changeset detected, " - "can't abort\n")) - return -1 + immutable = [d for d in dstates if not repo[d].mutable()] + if immutable: + raise util.Abort(_("can't abort rebase due to immutable changesets %s") + % ', '.join(str(repo[r]) for r in immutable), + hint=_('see hg help phases for details')) descendants = set() if dstates: diff --git a/mercurial/subrepo.py b/mercurial/subrepo.py index c8eda7bbdcab193934f04e43a4ee592c139be028_bWVyY3VyaWFsL3N1YnJlcG8ucHk=..efd2e14f72353626355dc82465bdf23bf6416aa2_bWVyY3VyaWFsL3N1YnJlcG8ucHk= 100644 --- a/mercurial/subrepo.py +++ b/mercurial/subrepo.py @@ -842,7 +842,6 @@ class gitsubrepo(abstractsubrepo): def __init__(self, ctx, path, state): - # TODO add git version check. self._state = state self._ctx = ctx self._path = path @@ -850,6 +849,29 @@ self._abspath = ctx._repo.wjoin(path) self._subparent = ctx._repo self._ui = ctx._repo.ui + self._ensuregit() + + def _ensuregit(self): + try: + self._gitexecutable = 'git' + out, err = self._gitnodir(['--version']) + except OSError, e: + if e.errno != 2 or os.name != 'nt': + raise + self._gitexecutable = 'git.cmd' + out, err = self._gitnodir(['--version']) + m = re.search(r'^git version (\d+)\.(\d+)\.(\d+)', out) + if not m: + self._ui.warn(_('cannot retrieve git version')) + return + version = (int(m.group(1)), m.group(2), m.group(3)) + # git 1.4.0 can't work at all, but 1.5.X can in at least some cases, + # despite the docstring comment. For now, error on 1.4.0, warn on + # 1.5.0 but attempt to continue. + if version < (1, 5, 0): + raise util.Abort(_('git subrepo requires at least 1.6.0 or later')) + elif version < (1, 6, 0): + self._ui.warn(_('git subrepo requires at least 1.6.0 or later')) def _gitcommand(self, commands, env=None, stream=False): return self._gitdir(commands, env=env, stream=stream)[0] @@ -870,8 +892,8 @@ errpipe = None if self._ui.quiet: errpipe = open(os.devnull, 'w') - p = subprocess.Popen(['git'] + commands, bufsize=-1, cwd=cwd, env=env, - close_fds=util.closefds, + p = subprocess.Popen([self._gitexecutable] + commands, bufsize=-1, + cwd=cwd, env=env, close_fds=util.closefds, stdout=subprocess.PIPE, stderr=errpipe) if stream: return p.stdout, None diff --git a/tests/get-with-headers.py b/tests/get-with-headers.py index c8eda7bbdcab193934f04e43a4ee592c139be028_dGVzdHMvZ2V0LXdpdGgtaGVhZGVycy5weQ==..efd2e14f72353626355dc82465bdf23bf6416aa2_dGVzdHMvZ2V0LXdpdGgtaGVhZGVycy5weQ== 100755 --- a/tests/get-with-headers.py +++ b/tests/get-with-headers.py @@ -21,10 +21,10 @@ tag = None def request(host, path, show): - + assert not path.startswith('/'), path global tag headers = {} if tag: headers['If-None-Match'] = tag conn = httplib.HTTPConnection(host) @@ -25,10 +25,10 @@ global tag headers = {} if tag: headers['If-None-Match'] = tag conn = httplib.HTTPConnection(host) - conn.request("GET", path, None, headers) + conn.request("GET", '/' + path, None, headers) response = conn.getresponse() print response.status, reasons.get(response.reason, response.reason) for h in [h.lower() for h in show]: diff --git a/tests/hghave.py b/tests/hghave.py index c8eda7bbdcab193934f04e43a4ee592c139be028_dGVzdHMvaGdoYXZlLnB5..efd2e14f72353626355dc82465bdf23bf6416aa2_dGVzdHMvaGdoYXZlLnB5 100755 --- a/tests/hghave.py +++ b/tests/hghave.py @@ -239,7 +239,9 @@ return False def has_outer_repo(): - return matchoutput('hg root 2>&1', r'') + # failing for other reasons than 'no repo' imply that there is a repo + return not matchoutput('hg root 2>&1', + r'abort: no repository found', True) def has_ssl(): try: diff --git a/tests/printenv.py b/tests/printenv.py index c8eda7bbdcab193934f04e43a4ee592c139be028_dGVzdHMvcHJpbnRlbnYucHk=..efd2e14f72353626355dc82465bdf23bf6416aa2_dGVzdHMvcHJpbnRlbnYucHk= 100644 --- a/tests/printenv.py +++ b/tests/printenv.py @@ -3,7 +3,7 @@ # put something like this in the repo .hg/hgrc: # # [hooks] -# changegroup = python "$TESTDIR"/printenv.py <hookname> [exit] [output] +# changegroup = python "$TESTDIR/printenv.py" <hookname> [exit] [output] # # - <hookname> is a mandatory argument (e.g. "changegroup") # - [exit] is the exit code of the hook (default: 0) diff --git a/tests/test-alias.t b/tests/test-alias.t index c8eda7bbdcab193934f04e43a4ee592c139be028_dGVzdHMvdGVzdC1hbGlhcy50..efd2e14f72353626355dc82465bdf23bf6416aa2_dGVzdHMvdGVzdC1hbGlhcy50 100644 --- a/tests/test-alias.t +++ b/tests/test-alias.t @@ -109,5 +109,6 @@ optional repository +#if no-outer-repo $ hg optionalrepo init @@ -112,5 +113,6 @@ $ hg optionalrepo init +#endif $ cd alias $ cat > .hg/hgrc <<EOF > [alias] diff --git a/tests/test-archive.t b/tests/test-archive.t index c8eda7bbdcab193934f04e43a4ee592c139be028_dGVzdHMvdGVzdC1hcmNoaXZlLnQ=..efd2e14f72353626355dc82465bdf23bf6416aa2_dGVzdHMvdGVzdC1hcmNoaXZlLnQ= 100644 --- a/tests/test-archive.t +++ b/tests/test-archive.t @@ -20,5 +20,5 @@ > hg serve -p $HGPORT -d --pid-file=hg.pid -E errors.log > cat hg.pid >> $DAEMON_PIDS > echo % $1 allowed should give 200 - > "$TESTDIR/get-with-headers.py" localhost:$HGPORT "/archive/tip.$2" | head -n 1 + > "$TESTDIR/get-with-headers.py" localhost:$HGPORT "archive/tip.$2" | head -n 1 > echo % $3 and $4 disallowed should both give 403 @@ -24,6 +24,6 @@ > echo % $3 and $4 disallowed should both give 403 - > "$TESTDIR/get-with-headers.py" localhost:$HGPORT "/archive/tip.$3" | head -n 1 - > "$TESTDIR/get-with-headers.py" localhost:$HGPORT "/archive/tip.$4" | head -n 1 + > "$TESTDIR/get-with-headers.py" localhost:$HGPORT "archive/tip.$3" | head -n 1 + > "$TESTDIR/get-with-headers.py" localhost:$HGPORT "archive/tip.$4" | head -n 1 > "$TESTDIR/killdaemons.py" > cat errors.log > cp .hg/hgrc-base .hg/hgrc @@ -56,7 +56,7 @@ invalid arch type should give 404 - $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT "/archive/tip.invalid" | head -n 1 + $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT "archive/tip.invalid" | head -n 1 404 Unsupported archive type: None $ TIP=`hg id -v | cut -f1 -d' '` diff --git a/tests/test-bad-pull.t b/tests/test-bad-pull.t index c8eda7bbdcab193934f04e43a4ee592c139be028_dGVzdHMvdGVzdC1iYWQtcHVsbC50..efd2e14f72353626355dc82465bdf23bf6416aa2_dGVzdHMvdGVzdC1iYWQtcHVsbC50 100644 --- a/tests/test-bad-pull.t +++ b/tests/test-bad-pull.t @@ -1,5 +1,10 @@ $ "$TESTDIR/hghave" serve || exit 80 +#if windows + $ hg clone http://localhost:$HGPORT/ copy + abort: * (glob) + [255] +#else $ hg clone http://localhost:$HGPORT/ copy abort: error: Connection refused [255] @@ -3,6 +8,7 @@ $ hg clone http://localhost:$HGPORT/ copy abort: error: Connection refused [255] +#endif $ test -d copy [1] diff --git a/tests/test-bookmarks-pushpull.t b/tests/test-bookmarks-pushpull.t index c8eda7bbdcab193934f04e43a4ee592c139be028_dGVzdHMvdGVzdC1ib29rbWFya3MtcHVzaHB1bGwudA==..efd2e14f72353626355dc82465bdf23bf6416aa2_dGVzdHMvdGVzdC1ib29rbWFya3MtcHVzaHB1bGwudA== 100644 --- a/tests/test-bookmarks-pushpull.t +++ b/tests/test-bookmarks-pushpull.t @@ -121,7 +121,7 @@ foobar 1:9b140be10808 $ hg pull --config paths.foo=../a foo - pulling from $TESTTMP/a + pulling from $TESTTMP/a (glob) searching for changes adding changesets adding manifests @@ -251,6 +251,4 @@ foo -1:000000000000 foobar 1:9b140be10808 - $ kill `cat ../hg.pid` - $ cd .. diff --git a/tests/test-bundle.t b/tests/test-bundle.t index c8eda7bbdcab193934f04e43a4ee592c139be028_dGVzdHMvdGVzdC1idW5kbGUudA==..efd2e14f72353626355dc82465bdf23bf6416aa2_dGVzdHMvdGVzdC1idW5kbGUudA== 100644 --- a/tests/test-bundle.t +++ b/tests/test-bundle.t @@ -206,7 +206,7 @@ Pull ../full.hg into empty (with hook) $ echo "[hooks]" >> .hg/hgrc - $ echo "changegroup = python \"$TESTDIR\"/printenv.py changegroup" >> .hg/hgrc + $ echo "changegroup = python \"$TESTDIR/printenv.py\" changegroup" >> .hg/hgrc doesn't work (yet ?) @@ -388,6 +388,9 @@ [255] $ cd .. +hide outer repo + $ hg init + Direct clone from bundle (all-history) $ hg clone full.hg full-clone diff --git a/tests/test-config-case.t b/tests/test-config-case.t index c8eda7bbdcab193934f04e43a4ee592c139be028_dGVzdHMvdGVzdC1jb25maWctY2FzZS50..efd2e14f72353626355dc82465bdf23bf6416aa2_dGVzdHMvdGVzdC1jb25maWctY2FzZS50 100644 --- a/tests/test-config-case.t +++ b/tests/test-config-case.t @@ -1,3 +1,6 @@ +hide outer repo + $ hg init + $ echo '[Section]' >> $HGRCPATH $ echo 'KeY = Case Sensitive' >> $HGRCPATH $ echo 'key = lower case' >> $HGRCPATH diff --git a/tests/test-convert-cvs.t b/tests/test-convert-cvs.t index c8eda7bbdcab193934f04e43a4ee592c139be028_dGVzdHMvdGVzdC1jb252ZXJ0LWN2cy50..efd2e14f72353626355dc82465bdf23bf6416aa2_dGVzdHMvdGVzdC1jb252ZXJ0LWN2cy50 100644 --- a/tests/test-convert-cvs.t +++ b/tests/test-convert-cvs.t @@ -143,5 +143,5 @@ sorting... converting... updating tags - $ hg cat -r tip srcfull-hg/src/a + $ hg cat -r tip --cwd srcfull-hg src/a a @@ -147,5 +147,5 @@ a - $ hg cat -r tip srcfull-hg/src/b/c + $ hg cat -r tip --cwd srcfull-hg src/b/c c c diff --git a/tests/test-convert-darcs.t b/tests/test-convert-darcs.t index c8eda7bbdcab193934f04e43a4ee592c139be028_dGVzdHMvdGVzdC1jb252ZXJ0LWRhcmNzLnQ=..efd2e14f72353626355dc82465bdf23bf6416aa2_dGVzdHMvdGVzdC1jb252ZXJ0LWRhcmNzLnQ= 100644 --- a/tests/test-convert-darcs.t +++ b/tests/test-convert-darcs.t @@ -14,9 +14,11 @@ > 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 @@ -17,9 +19,11 @@ 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 diff --git a/tests/test-convert-svn-sink.t b/tests/test-convert-svn-sink.t index c8eda7bbdcab193934f04e43a4ee592c139be028_dGVzdHMvdGVzdC1jb252ZXJ0LXN2bi1zaW5rLnQ=..efd2e14f72353626355dc82465bdf23bf6416aa2_dGVzdHMvdGVzdC1jb252ZXJ0LXN2bi1zaW5rLnQ= 100644 --- a/tests/test-convert-svn-sink.t +++ b/tests/test-convert-svn-sink.t @@ -1,4 +1,4 @@ - $ "$TESTDIR/hghave" svn13 no-outer-repo || exit 80 + $ "$TESTDIR/hghave" svn13 || exit 80 $ fixpath() > { @@ -356,7 +356,7 @@ use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon [1] $ hg --cwd b revert -r 2 b - $ hg resolve -m b + $ hg --cwd b resolve -m b $ hg --cwd b ci -d '5 0' -m 'merge' Expect 4 changes diff --git a/tests/test-dispatch.t b/tests/test-dispatch.t index c8eda7bbdcab193934f04e43a4ee592c139be028_dGVzdHMvdGVzdC1kaXNwYXRjaC50..efd2e14f72353626355dc82465bdf23bf6416aa2_dGVzdHMvdGVzdC1kaXNwYXRjaC50 100644 --- a/tests/test-dispatch.t +++ b/tests/test-dispatch.t @@ -1,9 +1,5 @@ test command parsing and dispatch - $ "$TESTDIR/hghave" no-outer-repo || exit 80 - - $ dir=`pwd` - $ hg init a $ cd a @@ -48,6 +44,10 @@ a: no such file in rev 000000000000 [1] + $ cd "$TESTTMP" + +#if no-outer-repo + No repo: $ cd $dir @@ -55,3 +55,4 @@ abort: no repository found in '$TESTTMP' (.hg not found)! [255] +#endif diff --git a/tests/test-extension.t b/tests/test-extension.t index c8eda7bbdcab193934f04e43a4ee592c139be028_dGVzdHMvdGVzdC1leHRlbnNpb24udA==..efd2e14f72353626355dc82465bdf23bf6416aa2_dGVzdHMvdGVzdC1leHRlbnNpb24udA== 100644 --- a/tests/test-extension.t +++ b/tests/test-extension.t @@ -1,7 +1,5 @@ Test basic extension support - $ "$TESTDIR/hghave" no-outer-repo || exit 80 - $ cat > foobar.py <<EOF > import os > from mercurial import commands @@ -132,6 +130,9 @@ $ cd .. +hide outer repo + $ hg init + $ cat > empty.py <<EOF > '''empty cmdtable > ''' diff --git a/tests/test-globalopts.t b/tests/test-globalopts.t index c8eda7bbdcab193934f04e43a4ee592c139be028_dGVzdHMvdGVzdC1nbG9iYWxvcHRzLnQ=..efd2e14f72353626355dc82465bdf23bf6416aa2_dGVzdHMvdGVzdC1nbG9iYWxvcHRzLnQ= 100644 --- a/tests/test-globalopts.t +++ b/tests/test-globalopts.t @@ -1,5 +1,3 @@ - $ "$TESTDIR/hghave" no-outer-repo || exit 80 - $ hg init a $ cd a $ echo a > a @@ -77,6 +75,8 @@ 8580ff50825a tip $ cd .. +#if no-outer-repo + Implicit -R: $ hg ann a/a @@ -93,6 +93,8 @@ abort: no repository found in '$TESTTMP' (.hg not found)! [255] +#endif + Abbreviation of long option: $ hg --repo c tip @@ -272,6 +274,9 @@ $ hg --version -q Mercurial Distributed SCM * (glob) +hide outer repo + $ hg init + Testing -h/--help: $ hg -h diff --git a/tests/test-glog.t b/tests/test-glog.t index c8eda7bbdcab193934f04e43a4ee592c139be028_dGVzdHMvdGVzdC1nbG9nLnQ=..efd2e14f72353626355dc82465bdf23bf6416aa2_dGVzdHMvdGVzdC1nbG9nLnQ= 100644 --- a/tests/test-glog.t +++ b/tests/test-glog.t @@ -69,8 +69,6 @@ o (0) root - $ "$TESTDIR/hghave" no-outer-repo || exit 80 - $ commit() > { > rev=$1 @@ -1136,4 +1134,8 @@ Empty revision range - display nothing: $ hg glog -r 1..0 + $ cd .. + +#if no-outer-repo + From outer space: @@ -1139,5 +1141,4 @@ From outer space: - $ cd .. $ hg glog -l1 repo @ changeset: 34:fea3ac5810e0 | tag: tip @@ -1156,6 +1157,8 @@ | $ hg glog -l1 repo/missing +#endif + File log with revs != cset revs: $ hg init flog $ cd flog diff --git a/tests/test-hgrc.t b/tests/test-hgrc.t index c8eda7bbdcab193934f04e43a4ee592c139be028_dGVzdHMvdGVzdC1oZ3JjLnQ=..efd2e14f72353626355dc82465bdf23bf6416aa2_dGVzdHMvdGVzdC1oZ3JjLnQ= 100644 --- a/tests/test-hgrc.t +++ b/tests/test-hgrc.t @@ -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 diff --git a/tests/test-hgweb-commands.t b/tests/test-hgweb-commands.t index c8eda7bbdcab193934f04e43a4ee592c139be028_dGVzdHMvdGVzdC1oZ3dlYi1jb21tYW5kcy50..efd2e14f72353626355dc82465bdf23bf6416aa2_dGVzdHMvdGVzdC1oZ3dlYi1jb21tYW5kcy50 100644 --- a/tests/test-hgweb-commands.t +++ b/tests/test-hgweb-commands.t @@ -37,7 +37,7 @@ Logs and changes - $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/log/?style=atom' + $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'log/?style=atom' 200 Script output follows <?xml version="1.0" encoding="ascii"?> @@ -115,7 +115,7 @@ </entry> </feed> - $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/log/1/?style=atom' + $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'log/1/?style=atom' 200 Script output follows <?xml version="1.0" encoding="ascii"?> @@ -193,7 +193,7 @@ </entry> </feed> - $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/log/1/foo/?style=atom' + $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'log/1/foo/?style=atom' 200 Script output follows <?xml version="1.0" encoding="ascii"?> @@ -221,7 +221,7 @@ </entry> </feed> - $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/shortlog/' + $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'shortlog/' 200 Script output follows <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> @@ -326,7 +326,7 @@ </body> </html> - $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/rev/0/' + $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'rev/0/' 200 Script output follows <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> @@ -453,7 +453,7 @@ </body> </html> - $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/rev/1/?style=raw' + $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'rev/1/?style=raw' 200 Script output follows @@ -470,7 +470,7 @@ @@ -0,0 +1,1 @@ +2ef0ac749a14e4f57a5a822464a0902c6f7f448f 1.0 - $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/log?rev=base' + $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'log?rev=base' 200 Script output follows <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> @@ -548,7 +548,7 @@ File-related - $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/file/1/foo/?style=raw' + $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'file/1/foo/?style=raw' 200 Script output follows foo @@ -552,7 +552,7 @@ 200 Script output follows foo - $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/annotate/1/foo/?style=raw' + $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'annotate/1/foo/?style=raw' 200 Script output follows @@ -561,7 +561,7 @@ - $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/file/1/?style=raw' + $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'file/1/?style=raw' 200 Script output follows @@ -570,7 +570,7 @@ -rw-r--r-- 4 foo - $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/file/1/foo' + $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'file/1/foo' 200 Script output follows <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> @@ -663,7 +663,7 @@ </body> </html> - $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/filediff/0/foo/?style=raw' + $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'filediff/0/foo/?style=raw' 200 Script output follows @@ -677,7 +677,7 @@ - $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/filediff/1/foo/?style=raw' + $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'filediff/1/foo/?style=raw' 200 Script output follows @@ -688,8 +688,8 @@ Overviews - $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/raw-tags' + $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'raw-tags' 200 Script output follows tip ba87b23d29ca67a305625d81a20ac279c1e3f444 1.0 2ef0ac749a14e4f57a5a822464a0902c6f7f448f @@ -692,10 +692,10 @@ 200 Script output follows tip ba87b23d29ca67a305625d81a20ac279c1e3f444 1.0 2ef0ac749a14e4f57a5a822464a0902c6f7f448f - $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/raw-branches' + $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'raw-branches' 200 Script output follows unstable ba87b23d29ca67a305625d81a20ac279c1e3f444 open stable 1d22e65f027e5a0609357e7d8e7508cd2ba5d2fe inactive default a4f92ed23982be056b9852de5dfe873eaac7f0de inactive @@ -697,10 +697,10 @@ 200 Script output follows unstable ba87b23d29ca67a305625d81a20ac279c1e3f444 open stable 1d22e65f027e5a0609357e7d8e7508cd2ba5d2fe inactive default a4f92ed23982be056b9852de5dfe873eaac7f0de inactive - $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/raw-bookmarks' + $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'raw-bookmarks' 200 Script output follows anotherthing 2ef0ac749a14e4f57a5a822464a0902c6f7f448f something ba87b23d29ca67a305625d81a20ac279c1e3f444 @@ -703,8 +703,8 @@ 200 Script output follows anotherthing 2ef0ac749a14e4f57a5a822464a0902c6f7f448f something ba87b23d29ca67a305625d81a20ac279c1e3f444 - $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/summary/?style=gitweb' + $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'summary/?style=gitweb' 200 Script output follows <?xml version="1.0" encoding="ascii"?> @@ -906,7 +906,7 @@ </body> </html> - $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/graph/?style=gitweb' + $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'graph/?style=gitweb' 200 Script output follows <?xml version="1.0" encoding="ascii"?> @@ -1049,7 +1049,7 @@ raw graph - $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/graph/?style=raw' + $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'graph/?style=raw' 200 Script output follows @@ -1147,7 +1147,7 @@ Static files - $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/static/style.css' + $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'static/style.css' 200 Script output follows a { text-decoration:none; } @@ -1270,7 +1270,7 @@ Graph json escape of multibyte character - $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/graph/' \ + $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'graph/' \ > | grep '^var data =' var data = [["548001d11f45", [0, 1], [[0, 0, 1, -1, ""]], "\u80fd", "test", "1970-01-01", ["unstable", true], ["tip"], ["something"]], ["ba87b23d29ca", [0, 1], [[0, 0, 1, 3, "FF0000"]], "branch", "test", "1970-01-01", ["unstable", false], [], []], ["1d22e65f027e", [0, 1], [[0, 0, 1, 3, ""]], "branch", "test", "1970-01-01", ["stable", true], [], []], ["a4f92ed23982", [0, 1], [[0, 0, 1, 3, ""]], "Added tag 1.0 for changeset 2ef0ac749a14", "test", "1970-01-01", ["default", true], [], []], ["2ef0ac749a14", [0, 1], [], "base", "test", "1970-01-01", ["default", false], ["1.0"], ["anotherthing"]]]; diff --git a/tests/test-hgweb-descend-empties.t b/tests/test-hgweb-descend-empties.t index c8eda7bbdcab193934f04e43a4ee592c139be028_dGVzdHMvdGVzdC1oZ3dlYi1kZXNjZW5kLWVtcHRpZXMudA==..efd2e14f72353626355dc82465bdf23bf6416aa2_dGVzdHMvdGVzdC1oZ3dlYi1kZXNjZW5kLWVtcHRpZXMudA== 100644 --- a/tests/test-hgweb-descend-empties.t +++ b/tests/test-hgweb-descend-empties.t @@ -29,7 +29,7 @@ manifest with descending - $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/file' + $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'file' 200 Script output follows <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> diff --git a/tests/test-hgweb-diffs.t b/tests/test-hgweb-diffs.t index c8eda7bbdcab193934f04e43a4ee592c139be028_dGVzdHMvdGVzdC1oZ3dlYi1kaWZmcy50..efd2e14f72353626355dc82465bdf23bf6416aa2_dGVzdHMvdGVzdC1oZ3dlYi1kaWZmcy50 100644 --- a/tests/test-hgweb-diffs.t +++ b/tests/test-hgweb-diffs.t @@ -23,7 +23,7 @@ revision - $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/rev/0' + $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'rev/0' 200 Script output follows <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> @@ -153,7 +153,7 @@ raw revision - $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/raw-rev/0' + $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'raw-rev/0' 200 Script output follows @@ -178,7 +178,7 @@ diff removed file - $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/diff/tip/b' + $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'diff/tip/b' 200 Script output follows <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> @@ -283,7 +283,7 @@ revision - $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/rev/0' + $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'rev/0' 200 Script output follows <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> @@ -415,7 +415,7 @@ revision - $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/raw-rev/0' + $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'raw-rev/0' 200 Script output follows @@ -442,7 +442,7 @@ diff removed file - $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/diff/tip/a' + $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'diff/tip/a' 200 Script output follows <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> @@ -572,7 +572,7 @@ > EOF $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log $ cat hg.pid >> $DAEMON_PIDS - $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/raw-rev/0' + $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'raw-rev/0' 200 Script output follows Block: 1 diff --git a/tests/test-hgweb-empty.t b/tests/test-hgweb-empty.t index c8eda7bbdcab193934f04e43a4ee592c139be028_dGVzdHMvdGVzdC1oZ3dlYi1lbXB0eS50..efd2e14f72353626355dc82465bdf23bf6416aa2_dGVzdHMvdGVzdC1oZ3dlYi1lbXB0eS50 100644 --- a/tests/test-hgweb-empty.t +++ b/tests/test-hgweb-empty.t @@ -6,7 +6,7 @@ $ cd test $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log $ cat hg.pid >> $DAEMON_PIDS - $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/shortlog') + $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT 'shortlog') 200 Script output follows <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> @@ -91,7 +91,7 @@ </body> </html> - $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/log') + $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT 'log') 200 Script output follows <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> @@ -176,7 +176,7 @@ </body> </html> - $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/graph') + $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT 'graph') 200 Script output follows <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> @@ -322,7 +322,7 @@ </body> </html> - $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/file') + $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT 'file') 200 Script output follows <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> diff --git a/tests/test-hgweb-filelog.t b/tests/test-hgweb-filelog.t index c8eda7bbdcab193934f04e43a4ee592c139be028_dGVzdHMvdGVzdC1oZ3dlYi1maWxlbG9nLnQ=..efd2e14f72353626355dc82465bdf23bf6416aa2_dGVzdHMvdGVzdC1oZ3dlYi1maWxlbG9nLnQ= 100644 --- a/tests/test-hgweb-filelog.t +++ b/tests/test-hgweb-filelog.t @@ -109,7 +109,7 @@ tip - two revisions - $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/log/tip/a') + $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT 'log/tip/a') 200 Script output follows <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> @@ -210,7 +210,7 @@ second version - two revisions - $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/log/3/a') + $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT 'log/3/a') 200 Script output follows <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> @@ -311,7 +311,7 @@ first deleted - one revision - $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/log/2/a') + $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT 'log/2/a') 200 Script output follows <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> @@ -407,7 +407,7 @@ first version - one revision - $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/log/1/a') + $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT 'log/1/a') 200 Script output follows <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> @@ -503,7 +503,7 @@ before addition - error - $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/log/0/a') + $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT 'log/0/a') 404 Not Found <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> @@ -567,7 +567,7 @@ should show base link, use spartan because it shows it - $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/log/tip/c?style=spartan') + $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT 'log/tip/c?style=spartan') 200 Script output follows <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> @@ -676,7 +676,7 @@ rss log - $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/rss-log/tip/a') + $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT 'rss-log/tip/a') 200 Script output follows <?xml version="1.0" encoding="ascii"?> @@ -707,7 +707,7 @@ atom log - $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/atom-log/tip/a') + $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT 'atom-log/tip/a') 200 Script output follows <?xml version="1.0" encoding="ascii"?> diff --git a/tests/test-hgweb-raw.t b/tests/test-hgweb-raw.t index c8eda7bbdcab193934f04e43a4ee592c139be028_dGVzdHMvdGVzdC1oZ3dlYi1yYXcudA==..efd2e14f72353626355dc82465bdf23bf6416aa2_dGVzdHMvdGVzdC1oZ3dlYi1yYXcudA== 100644 --- a/tests/test-hgweb-raw.t +++ b/tests/test-hgweb-raw.t @@ -17,7 +17,7 @@ $ hg serve -p $HGPORT -A access.log -E error.log -d --pid-file=hg.pid $ cat hg.pid >> $DAEMON_PIDS - $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/?f=bf0ff59095c9;file=sub/some%20text%25.txt;style=raw' content-type content-length content-disposition) >getoutput.txt + $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '?f=bf0ff59095c9;file=sub/some%20text%25.txt;style=raw' content-type content-length content-disposition) >getoutput.txt $ while kill `cat hg.pid` 2>/dev/null; do sleep 0; done @@ -39,7 +39,7 @@ > --config web.guessmime=True $ cat hg.pid >> $DAEMON_PIDS - $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/?f=bf0ff59095c9;file=sub/some%20text%25.txt;style=raw' content-type content-length content-disposition) >getoutput.txt + $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '?f=bf0ff59095c9;file=sub/some%20text%25.txt;style=raw' content-type content-length content-disposition) >getoutput.txt $ while kill `cat hg.pid` 2>/dev/null; do sleep 0; done $ cat getoutput.txt diff --git a/tests/test-hgweb-removed.t b/tests/test-hgweb-removed.t index c8eda7bbdcab193934f04e43a4ee592c139be028_dGVzdHMvdGVzdC1oZ3dlYi1yZW1vdmVkLnQ=..efd2e14f72353626355dc82465bdf23bf6416aa2_dGVzdHMvdGVzdC1oZ3dlYi1yZW1vdmVkLnQ= 100644 --- a/tests/test-hgweb-removed.t +++ b/tests/test-hgweb-removed.t @@ -17,7 +17,7 @@ revision - $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/rev/tip' + $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'rev/tip' 200 Script output follows <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> @@ -135,7 +135,7 @@ diff removed file - $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/diff/tip/a' + $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'diff/tip/a' 200 Script output follows <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> diff --git a/tests/test-hgweb.t b/tests/test-hgweb.t index c8eda7bbdcab193934f04e43a4ee592c139be028_dGVzdHMvdGVzdC1oZ3dlYi50..efd2e14f72353626355dc82465bdf23bf6416aa2_dGVzdHMvdGVzdC1oZ3dlYi50 100644 --- a/tests/test-hgweb.t +++ b/tests/test-hgweb.t @@ -15,7 +15,7 @@ manifest - $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/file/tip/?style=raw') + $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT 'file/tip/?style=raw') 200 Script output follows @@ -23,7 +23,7 @@ -rw-r--r-- 4 foo - $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/file/tip/da?style=raw') + $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT 'file/tip/da?style=raw') 200 Script output follows @@ -33,10 +33,10 @@ plain file - $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/file/tip/foo?style=raw' + $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'file/tip/foo?style=raw' 200 Script output follows foo should give a 404 - static file that does not exist @@ -37,10 +37,10 @@ 200 Script output follows foo should give a 404 - static file that does not exist - $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/static/bogus' + $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'static/bogus' 404 Not Found <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> @@ -104,7 +104,7 @@ should give a 404 - bad revision - $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/file/spam/foo?style=raw' + $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'file/spam/foo?style=raw' 404 Not Found @@ -113,7 +113,7 @@ should give a 400 - bad command - $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/file/tip/foo?cmd=spam&style=raw' + $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'file/tip/foo?cmd=spam&style=raw' 400* (glob) @@ -122,9 +122,9 @@ should give a 404 - file does not exist - $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/file/tip/bork?style=raw' + $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'file/tip/bork?style=raw' 404 Not Found error: bork@2ef0ac749a14: not found in manifest [1] @@ -126,9 +126,9 @@ 404 Not Found error: bork@2ef0ac749a14: not found in manifest [1] - $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/file/tip/bork' + $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'file/tip/bork' 404 Not Found <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> @@ -189,7 +189,7 @@ </html> [1] - $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/diff/tip/bork?style=raw' + $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'diff/tip/bork?style=raw' 404 Not Found @@ -198,7 +198,7 @@ try bad style - $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/file/tip/?style=foobar') + $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT 'file/tip/?style=foobar') 200 Script output follows <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> @@ -306,7 +306,7 @@ static file - $ "$TESTDIR/get-with-headers.py" --twice localhost:$HGPORT '/static/style-gitweb.css' + $ "$TESTDIR/get-with-headers.py" --twice localhost:$HGPORT 'static/style-gitweb.css' 200 Script output follows body { font-family: sans-serif; font-size: 12px; margin:0px; border:solid #d9d8d1; border-width:1px; margin:10px; } diff --git a/tests/test-hgwebdir.t b/tests/test-hgwebdir.t index c8eda7bbdcab193934f04e43a4ee592c139be028_dGVzdHMvdGVzdC1oZ3dlYmRpci50..efd2e14f72353626355dc82465bdf23bf6416aa2_dGVzdHMvdGVzdC1oZ3dlYmRpci50 100644 --- a/tests/test-hgwebdir.t +++ b/tests/test-hgwebdir.t @@ -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 @@ -70,7 +77,7 @@ should give a 404 - file does not exist - $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/a/file/tip/bork?style=raw' + $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'a/file/tip/bork?style=raw' 404 Not Found @@ -79,10 +86,10 @@ should succeed - $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/?style=raw' + $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '?style=raw' 200 Script output follows /a/ /b/ @@ -83,10 +90,10 @@ 200 Script output follows /a/ /b/ - $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/a/file/tip/a?style=raw' + $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'a/file/tip/a?style=raw' 200 Script output follows a @@ -90,10 +97,10 @@ 200 Script output follows a - $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/b/file/tip/b?style=raw' + $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'b/file/tip/b?style=raw' 200 Script output follows b should give a 404 - repo is not published @@ -94,10 +101,10 @@ 200 Script output follows b should give a 404 - repo is not published - $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/c/file/tip/c?style=raw' + $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'c/file/tip/c?style=raw' 404 Not Found @@ -106,10 +113,10 @@ atom-log without basedir - $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/a/atom-log' | grep '<link' + $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'a/atom-log' | grep '<link' <link rel="self" href="http://*:$HGPORT/a/atom-log"/> (glob) <link rel="alternate" href="http://*:$HGPORT/a/"/> (glob) <link href="http://*:$HGPORT/a/rev/8580ff50825a"/> (glob) rss-log without basedir @@ -110,10 +117,10 @@ <link rel="self" href="http://*:$HGPORT/a/atom-log"/> (glob) <link rel="alternate" href="http://*:$HGPORT/a/"/> (glob) <link href="http://*:$HGPORT/a/rev/8580ff50825a"/> (glob) rss-log without basedir - $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/a/rss-log' | grep '<guid' + $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'a/rss-log' | grep '<guid' <guid isPermaLink="true">http://*:$HGPORT/a/rev/8580ff50825a</guid> (glob) $ cat > paths.conf <<EOF > [paths] @@ -131,7 +138,7 @@ should succeed, slashy names - $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/?style=raw' + $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '?style=raw' 200 Script output follows @@ -170,7 +177,7 @@ /astar/ /astar/.hg/patches/ - $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/?style=paper' + $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '?style=paper' 200 Script output follows <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> @@ -483,9 +490,9 @@ </body> </html> - $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/t?style=raw' + $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 't?style=raw' 200 Script output follows /t/a/ @@ -487,11 +494,11 @@ 200 Script output follows /t/a/ - $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/t/?style=raw' + $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 't/?style=raw' 200 Script output follows /t/a/ @@ -493,9 +500,9 @@ 200 Script output follows /t/a/ - $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/t/?style=paper' + $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 't/?style=paper' 200 Script output follows <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> @@ -544,7 +551,7 @@ </body> </html> - $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/t/a?style=atom' + $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 't/a?style=atom' 200 Script output follows <?xml version="1.0" encoding="ascii"?> @@ -574,7 +581,7 @@ </entry> </feed> - $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/t/a/?style=atom' + $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 't/a/?style=atom' 200 Script output follows <?xml version="1.0" encoding="ascii"?> @@ -604,10 +611,10 @@ </entry> </feed> - $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/t/a/file/tip/a?style=raw' + $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 't/a/file/tip/a?style=raw' 200 Script output follows a Test [paths] '*' extension @@ -608,10 +615,10 @@ 200 Script output follows a Test [paths] '*' extension - $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/coll/?style=raw' + $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 'coll/?style=raw' 200 Script output follows @@ -622,10 +629,10 @@ /coll/notrepo/e/ /coll/notrepo/f/ - $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/coll/a/file/tip/a?style=raw' + $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 'coll/a/file/tip/a?style=raw' 200 Script output follows a Test [paths] '**' extension @@ -626,10 +633,10 @@ 200 Script output follows a Test [paths] '**' extension - $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/rcoll/?style=raw' + $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 'rcoll/?style=raw' 200 Script output follows @@ -643,7 +650,7 @@ /rcoll/notrepo/f/ /rcoll/notrepo/f/f2/ - $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/rcoll/b/d/file/tip/d?style=raw' + $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 'rcoll/b/d/file/tip/d?style=raw' 200 Script output follows d @@ -658,7 +665,7 @@ $ hg serve -p $HGPORT1 -d --pid-file=hg.pid --webdir-conf paths.conf \ > -A access-paths.log -E error-paths-3.log $ cat hg.pid >> $DAEMON_PIDS - $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/coll/?style=raw' + $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 'coll/?style=raw' 200 Script output follows @@ -668,7 +675,7 @@ /coll/c/ /coll/notrepo/ - $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/coll/a/file/tip/a?style=raw' + $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 'coll/a/file/tip/a?style=raw' 200 Script output follows a @@ -672,7 +679,7 @@ 200 Script output follows a - $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/rcoll/?style=raw' + $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 'rcoll/?style=raw' 200 Script output follows @@ -683,10 +690,10 @@ /rcoll/c/ /rcoll/notrepo/ - $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/rcoll/b/d/file/tip/d?style=raw' + $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 'rcoll/b/d/file/tip/d?style=raw' 200 Script output follows d Test intermediate directories @@ -687,10 +694,10 @@ 200 Script output follows d Test intermediate directories - $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/rcoll/notrepo/?style=raw' + $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 'rcoll/notrepo/?style=raw' 200 Script output follows @@ -702,10 +709,10 @@ Test repositories inside intermediate directories - $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/rcoll/notrepo/e/file/tip/e?style=raw' + $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 'rcoll/notrepo/e/file/tip/e?style=raw' 200 Script output follows e Test subrepositories inside intermediate directories @@ -706,10 +713,10 @@ 200 Script output follows e Test subrepositories inside intermediate directories - $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/rcoll/notrepo/f/f2/file/tip/f2?style=raw' + $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 'rcoll/notrepo/f/f2/file/tip/f2?style=raw' 200 Script output follows f2 @@ -723,7 +730,7 @@ $ hg serve -p $HGPORT1 -d --pid-file=hg.pid --webdir-conf paths.conf \ > -A access-paths.log -E error-paths-4.log $ cat hg.pid >> $DAEMON_PIDS - $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/coll/?style=raw' + $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 'coll/?style=raw' 200 Script output follows @@ -731,7 +738,7 @@ /coll/b/ /coll/c/ - $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/coll/a/file/tip/a?style=raw' + $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 'coll/a/file/tip/a?style=raw' 200 Script output follows a @@ -735,7 +742,7 @@ 200 Script output follows a - $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/rcoll/?style=raw' + $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 'rcoll/?style=raw' 200 Script output follows @@ -743,10 +750,10 @@ /rcoll/b/ /rcoll/c/ - $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/rcoll/b/d/file/tip/d?style=raw' + $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 'rcoll/b/d/file/tip/d?style=raw' 200 Script output follows d Test intermediate directories @@ -747,10 +754,10 @@ 200 Script output follows d Test intermediate directories - $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/rcoll/notrepo/?style=raw' + $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 'rcoll/notrepo/?style=raw' 200 Script output follows @@ -760,10 +767,10 @@ Test repositories inside intermediate directories - $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/rcoll/notrepo/e/file/tip/e?style=raw' + $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 'rcoll/notrepo/e/file/tip/e?style=raw' 200 Script output follows e Test subrepositories inside intermediate directories @@ -764,10 +771,10 @@ 200 Script output follows e Test subrepositories inside intermediate directories - $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/rcoll/notrepo/f/f2/file/tip/f2?style=raw' + $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 'rcoll/notrepo/f/f2/file/tip/f2?style=raw' 200 Script output follows f2 @@ -787,7 +794,7 @@ $ hg serve -p $HGPORT1 -d --pid-file=hg.pid --webdir-conf paths.conf \ > -A access-paths.log -E error-paths-5.log $ cat hg.pid >> $DAEMON_PIDS - $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/?style=raw' + $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '?style=raw' 200 Script output follows @@ -795,7 +802,7 @@ /t/b/ /c/ - $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/t/?style=raw' + $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 't/?style=raw' 200 Script output follows @@ -813,10 +820,10 @@ $ hg serve -p $HGPORT1 -d --pid-file=hg.pid --webdir-conf paths.conf \ > -A access-paths.log -E error-paths-6.log $ cat hg.pid >> $DAEMON_PIDS - $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/?style=raw' + $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '?style=raw' 200 Script output follows /t/ /c/ @@ -817,10 +824,10 @@ 200 Script output follows /t/ /c/ - $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/t/?style=raw' + $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 't/?style=raw' 200 Script output follows @@ -837,9 +844,9 @@ $ hg serve -p $HGPORT1 -d --pid-file=hg.pid --webdir-conf paths.conf \ > -A access-paths.log -E error-paths-7.log $ cat hg.pid >> $DAEMON_PIDS - $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/?style=raw' + $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '?style=raw' 200 Script output follows /c/ @@ -841,9 +848,9 @@ 200 Script output follows /c/ - $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/t/?style=raw' + $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 't/?style=raw' 200 Script output follows @@ -862,7 +869,7 @@ test inexistent and inaccessible repo should be ignored silently - $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/' + $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '' 200 Script output follows <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> @@ -914,7 +921,7 @@ collections: should succeed - $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 '/?style=raw' + $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 '?style=raw' 200 Script output follows @@ -925,7 +932,7 @@ /notrepo/e/ /notrepo/f/ - $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 '/a/file/tip/a?style=raw' + $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 'a/file/tip/a?style=raw' 200 Script output follows a @@ -929,7 +936,7 @@ 200 Script output follows a - $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 '/b/file/tip/b?style=raw' + $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 'b/file/tip/b?style=raw' 200 Script output follows b @@ -933,10 +940,10 @@ 200 Script output follows b - $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 '/c/file/tip/c?style=raw' + $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 'c/file/tip/c?style=raw' 200 Script output follows c atom-log with basedir / @@ -937,13 +944,13 @@ 200 Script output follows c atom-log with basedir / - $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 '/a/atom-log' | grep '<link' + $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 'a/atom-log' | grep '<link' <link rel="self" href="http://hg.example.com:8080/a/atom-log"/> <link rel="alternate" href="http://hg.example.com:8080/a/"/> <link href="http://hg.example.com:8080/a/rev/8580ff50825a"/> rss-log with basedir / @@ -944,10 +951,10 @@ <link rel="self" href="http://hg.example.com:8080/a/atom-log"/> <link rel="alternate" href="http://hg.example.com:8080/a/"/> <link href="http://hg.example.com:8080/a/rev/8580ff50825a"/> rss-log with basedir / - $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 '/a/rss-log' | grep '<guid' + $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 'a/rss-log' | grep '<guid' <guid isPermaLink="true">http://hg.example.com:8080/a/rev/8580ff50825a</guid> $ "$TESTDIR/killdaemons.py" $ hg serve --config web.baseurl=http://hg.example.com:8080/foo/ -p $HGPORT2 -d \ @@ -957,10 +964,10 @@ atom-log with basedir /foo/ - $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 '/a/atom-log' | grep '<link' + $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 'a/atom-log' | grep '<link' <link rel="self" href="http://hg.example.com:8080/foo/a/atom-log"/> <link rel="alternate" href="http://hg.example.com:8080/foo/a/"/> <link href="http://hg.example.com:8080/foo/a/rev/8580ff50825a"/> rss-log with basedir /foo/ @@ -961,10 +968,10 @@ <link rel="self" href="http://hg.example.com:8080/foo/a/atom-log"/> <link rel="alternate" href="http://hg.example.com:8080/foo/a/"/> <link href="http://hg.example.com:8080/foo/a/rev/8580ff50825a"/> rss-log with basedir /foo/ - $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 '/a/rss-log' | grep '<guid' + $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 'a/rss-log' | grep '<guid' <guid isPermaLink="true">http://hg.example.com:8080/foo/a/rev/8580ff50825a</guid> paths errors 1 diff --git a/tests/test-hgwebdirsym.t b/tests/test-hgwebdirsym.t index c8eda7bbdcab193934f04e43a4ee592c139be028_dGVzdHMvdGVzdC1oZ3dlYmRpcnN5bS50..efd2e14f72353626355dc82465bdf23bf6416aa2_dGVzdHMvdGVzdC1oZ3dlYmRpcnN5bS50 100644 --- a/tests/test-hgwebdirsym.t +++ b/tests/test-hgwebdirsym.t @@ -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' @@ -29,7 +33,7 @@ should succeed - $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/?style=raw' + $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '?style=raw' 200 Script output follows @@ -37,7 +41,7 @@ /b/ /c/ - $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/al/file/tip/a?style=raw' + $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'al/file/tip/a?style=raw' 200 Script output follows a @@ -41,7 +45,7 @@ 200 Script output follows a - $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/b/file/tip/b?style=raw' + $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'b/file/tip/b?style=raw' 200 Script output follows b @@ -45,10 +49,10 @@ 200 Script output follows b - $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/c/file/tip/c?style=raw' + $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'c/file/tip/c?style=raw' 200 Script output follows c should fail @@ -49,12 +53,12 @@ 200 Script output follows c should fail - $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/circle/al/file/tip/a?style=raw' + $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'circle/al/file/tip/a?style=raw' 404 Not Found error: repository circle/al/file/tip/a not found [1] @@ -56,11 +60,11 @@ 404 Not Found error: repository circle/al/file/tip/a not found [1] - $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/circle/b/file/tip/a?style=raw' + $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'circle/b/file/tip/a?style=raw' 404 Not Found error: repository circle/b/file/tip/a not found [1] @@ -62,9 +66,9 @@ 404 Not Found error: repository circle/b/file/tip/a not found [1] - $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/circle/c/file/tip/a?style=raw' + $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'circle/c/file/tip/a?style=raw' 404 Not Found diff --git a/tests/test-highlight.t b/tests/test-highlight.t index c8eda7bbdcab193934f04e43a4ee592c139be028_dGVzdHMvdGVzdC1oaWdobGlnaHQudA==..efd2e14f72353626355dc82465bdf23bf6416aa2_dGVzdHMvdGVzdC1oaWdobGlnaHQudA== 100644 --- a/tests/test-highlight.t +++ b/tests/test-highlight.t @@ -55,7 +55,7 @@ hgweb filerevision, html - $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/file/tip/primes.py') \ + $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT 'file/tip/primes.py') \ > | sed "s/class=\"k\"/class=\"kn\"/g" | sed "s/class=\"mf\"/class=\"mi\"/g" 200 Script output follows @@ -183,7 +183,7 @@ hgweb fileannotate, html - $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/annotate/tip/primes.py') \ + $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT 'annotate/tip/primes.py') \ > | sed "s/class=\"k\"/class=\"kn\"/g" | sed "s/class=\"mi\"/class=\"mf\"/g" 200 Script output follows @@ -509,7 +509,7 @@ hgweb fileannotate, raw - $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/annotate/tip/primes.py?style=raw') \ + $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT 'annotate/tip/primes.py?style=raw') \ > | sed "s/test@//" > a $ echo "200 Script output follows" > b $ echo "" >> b @@ -523,7 +523,7 @@ hgweb filerevision, raw - $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/file/tip/primes.py?style=raw') \ + $ ("$TESTDIR/get-with-headers.py" localhost:$HGPORT 'file/tip/primes.py?style=raw') \ > > a $ echo "200 Script output follows" > b $ echo "" >> b @@ -532,7 +532,7 @@ hgweb highlightcss friendly - $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/highlightcss' > out + $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'highlightcss' > out $ head -n 4 out 200 Script output follows @@ -559,7 +559,7 @@ hgweb highlightcss fruity - $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/highlightcss' > out + $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'highlightcss' > out $ head -n 4 out 200 Script output follows @@ -583,7 +583,7 @@ > cat hg.pid >> $DAEMON_PIDS > > echo % hgweb filerevision, html - > "$TESTDIR/get-with-headers.py" localhost:$HGPORT "/file/tip/$2" \ + > "$TESTDIR/get-with-headers.py" localhost:$HGPORT "file/tip/$2" \ > | grep '<div class="parity0 source">' > echo % errors encountered > cat errors.log diff --git a/tests/test-http.t b/tests/test-http.t index c8eda7bbdcab193934f04e43a4ee592c139be028_dGVzdHMvdGVzdC1odHRwLnQ=..efd2e14f72353626355dc82465bdf23bf6416aa2_dGVzdHMvdGVzdC1odHRwLnQ= 100644 --- a/tests/test-http.t +++ b/tests/test-http.t @@ -17,6 +17,11 @@ Test server address cannot be reused +#if windows + $ hg serve -p $HGPORT1 2>&1 + abort: cannot start server at ':$HGPORT1': * (glob) + [255] +#else $ hg serve -p $HGPORT1 2>&1 abort: cannot start server at ':$HGPORT1': Address already in use [255] @@ -20,6 +25,7 @@ $ hg serve -p $HGPORT1 2>&1 abort: cannot start server at ':$HGPORT1': Address already in use [255] +#endif $ cd .. $ cat hg1.pid hg2.pid >> $DAEMON_PIDS @@ -93,7 +99,7 @@ $ cd copy-pull $ echo '[hooks]' >> .hg/hgrc - $ echo 'changegroup = python "$TESTDIR"/printenv.py changegroup' >> .hg/hgrc + $ echo "changegroup = python \"$TESTDIR/printenv.py\" changegroup" >> .hg/hgrc $ hg pull pulling from http://localhost:$HGPORT1/ searching for changes diff --git a/tests/test-https.t b/tests/test-https.t index c8eda7bbdcab193934f04e43a4ee592c139be028_dGVzdHMvdGVzdC1odHRwcy50..efd2e14f72353626355dc82465bdf23bf6416aa2_dGVzdHMvdGVzdC1odHRwcy50 100644 --- a/tests/test-https.t +++ b/tests/test-https.t @@ -104,6 +104,11 @@ Test server address cannot be reused +#if windows + $ hg serve -p $HGPORT --certificate=$PRIV 2>&1 + abort: cannot start server at ':$HGPORT': (glob) + [255] +#else $ hg serve -p $HGPORT --certificate=$PRIV 2>&1 abort: cannot start server at ':$HGPORT': Address already in use [255] @@ -107,6 +112,7 @@ $ hg serve -p $HGPORT --certificate=$PRIV 2>&1 abort: cannot start server at ':$HGPORT': Address already in use [255] +#endif $ cd .. clone via pull @@ -137,7 +143,7 @@ $ cd copy-pull $ echo '[hooks]' >> .hg/hgrc - $ echo "changegroup = python '$TESTDIR'/printenv.py changegroup" >> .hg/hgrc + $ echo "changegroup = python \"$TESTDIR/printenv.py\" changegroup" >> .hg/hgrc $ hg pull warning: localhost certificate with fingerprint 91:4f:1a:ff:87:24:9c:09:b6:85:9b:88:b1:90:6d:30:75:64:91:ca not verified (check hostfingerprints or web.cacerts config setting) pulling from https://localhost:$HGPORT/ diff --git a/tests/test-i18n.t b/tests/test-i18n.t index c8eda7bbdcab193934f04e43a4ee592c139be028_dGVzdHMvdGVzdC1pMThuLnQ=..efd2e14f72353626355dc82465bdf23bf6416aa2_dGVzdHMvdGVzdC1pMThuLnQ= 100644 --- a/tests/test-i18n.t +++ b/tests/test-i18n.t @@ -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 diff --git a/tests/test-identify.t b/tests/test-identify.t index c8eda7bbdcab193934f04e43a4ee592c139be028_dGVzdHMvdGVzdC1pZGVudGlmeS50..efd2e14f72353626355dc82465bdf23bf6416aa2_dGVzdHMvdGVzdC1pZGVudGlmeS50 100644 --- a/tests/test-identify.t +++ b/tests/test-identify.t @@ -1,4 +1,6 @@ - $ "$TESTDIR/hghave" no-outer-repo serve || exit 80 + $ "$TESTDIR/hghave" serve || exit 80 + +#if no-outer-repo no repo @@ -6,6 +8,8 @@ abort: there is no Mercurial repository here (.hg not found) [255] +#endif + create repo $ hg init test @@ -51,5 +55,6 @@ $ cd .. $ hg -R test id cb9a9f314b8b+ tip +#if no-outer-repo $ hg id test cb9a9f314b8b+ tip @@ -54,5 +59,6 @@ $ hg id test cb9a9f314b8b+ tip +#endif with remote http repo @@ -111,6 +117,7 @@ [255] $ cd .. +#if no-outer-repo $ hg id test abort: unknown repository format: requires features 'fake' (upgrade Mercurial)! [255] @@ -114,4 +121,4 @@ $ hg id test abort: unknown repository format: requires features 'fake' (upgrade Mercurial)! [255] - +#endif diff --git a/tests/test-interhg.t b/tests/test-interhg.t index c8eda7bbdcab193934f04e43a4ee592c139be028_dGVzdHMvdGVzdC1pbnRlcmhnLnQ=..efd2e14f72353626355dc82465bdf23bf6416aa2_dGVzdHMvdGVzdC1pbnRlcmhnLnQ= 100644 --- a/tests/test-interhg.t +++ b/tests/test-interhg.t @@ -23,7 +23,7 @@ log - $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/' | grep bts + $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '' | grep bts <td class="description"><a href="/rev/1b0e7ece6bd6"><a href="http://bts.example.org/issue123">Issue123</a>: fixed the <i class="x">bug</i>!</a><span class="branchhead">default</span> <span class="tag">tip</span> </td> errors diff --git a/tests/test-keyword.t b/tests/test-keyword.t index c8eda7bbdcab193934f04e43a4ee592c139be028_dGVzdHMvdGVzdC1rZXl3b3JkLnQ=..efd2e14f72353626355dc82465bdf23bf6416aa2_dGVzdHMvdGVzdC1rZXl3b3JkLnQ= 100644 --- a/tests/test-keyword.t +++ b/tests/test-keyword.t @@ -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 @@ -928,10 +931,10 @@ $ hg serve -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log $ cat hg.pid >> $DAEMON_PIDS - $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/file/tip/a/?style=raw' + $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'file/tip/a/?style=raw' 200 Script output follows expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $ do not process $Id: xxx $ $Xinfo: User Name <user@example.com>: firstline $ @@ -932,10 +935,10 @@ 200 Script output follows expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $ do not process $Id: xxx $ $Xinfo: User Name <user@example.com>: firstline $ - $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/annotate/tip/a/?style=raw' + $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'annotate/tip/a/?style=raw' 200 Script output follows @@ -947,7 +950,7 @@ - $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/rev/tip/?style=raw' + $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'rev/tip/?style=raw' 200 Script output follows @@ -967,7 +970,7 @@ +xxx $ +$Xinfo$ - $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/diff/bb948857c743/a?style=raw' + $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'diff/bb948857c743/a?style=raw' 200 Script output follows diff --git a/tests/test-largefiles.t b/tests/test-largefiles.t index c8eda7bbdcab193934f04e43a4ee592c139be028_dGVzdHMvdGVzdC1sYXJnZWZpbGVzLnQ=..efd2e14f72353626355dc82465bdf23bf6416aa2_dGVzdHMvdGVzdC1sYXJnZWZpbGVzLnQ= 100644 --- a/tests/test-largefiles.t +++ b/tests/test-largefiles.t @@ -146,7 +146,7 @@ $ hg serve -d -p $HGPORT --pid-file ../hg.pid $ cat ../hg.pid >> $DAEMON_PIDS - $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/file/tip/?style=raw' + $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'file/tip/?style=raw' 200 Script output follows @@ -155,7 +155,7 @@ -rw-r--r-- 9 normal3 - $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT '/file/tip/sub/?style=raw' + $ "$TESTDIR/get-with-headers.py" 127.0.0.1:$HGPORT 'file/tip/sub/?style=raw' 200 Script output follows diff --git a/tests/test-mq-qclone-http.t b/tests/test-mq-qclone-http.t index c8eda7bbdcab193934f04e43a4ee592c139be028_dGVzdHMvdGVzdC1tcS1xY2xvbmUtaHR0cC50..efd2e14f72353626355dc82465bdf23bf6416aa2_dGVzdHMvdGVzdC1tcS1xY2xvbmUtaHR0cC50 100644 --- a/tests/test-mq-qclone-http.t +++ b/tests/test-mq-qclone-http.t @@ -1,5 +1,8 @@ $ "$TESTDIR/hghave" serve || exit 80 +hide outer repo + $ hg init + $ echo "[extensions]" >> $HGRCPATH $ echo "mq=" >> $HGRCPATH $ mkdir webdir @@ -31,7 +34,7 @@ $ hg serve -p $HGPORT -d --pid-file=hg.pid --webdir-conf collections.conf \ > -A access-paths.log -E error-paths-1.log $ cat hg.pid >> $DAEMON_PIDS - $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/?style=raw' + $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '?style=raw' 200 Script output follows @@ -70,7 +73,7 @@ $ hg serve -p $HGPORT1 -d --pid-file=hg.pid --webdir-conf collections1.conf \ > -A access-paths.log -E error-paths-1.log $ cat hg.pid >> $DAEMON_PIDS - $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '/?style=raw' + $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT1 '?style=raw' 200 Script output follows @@ -109,7 +112,7 @@ $ hg serve -p $HGPORT2 -d --pid-file=hg.pid --webdir-conf collections2.conf \ > -A access-paths.log -E error-paths-1.log $ cat hg.pid >> $DAEMON_PIDS - $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 '/?style=raw' + $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT2 '?style=raw' 200 Script output follows diff --git a/tests/test-mq.t b/tests/test-mq.t index c8eda7bbdcab193934f04e43a4ee592c139be028_dGVzdHMvdGVzdC1tcS50..efd2e14f72353626355dc82465bdf23bf6416aa2_dGVzdHMvdGVzdC1tcS50 100644 --- a/tests/test-mq.t +++ b/tests/test-mq.t @@ -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 diff --git a/tests/test-push-http.t b/tests/test-push-http.t index c8eda7bbdcab193934f04e43a4ee592c139be028_dGVzdHMvdGVzdC1wdXNoLWh0dHAudA==..efd2e14f72353626355dc82465bdf23bf6416aa2_dGVzdHMvdGVzdC1wdXNoLWh0dHAudA== 100644 --- a/tests/test-push-http.t +++ b/tests/test-push-http.t @@ -55,7 +55,7 @@ $ echo 'allow_push = *' >> .hg/hgrc $ echo '[hooks]' >> .hg/hgrc - $ echo 'changegroup = python "$TESTDIR"/printenv.py changegroup 0' >> .hg/hgrc + $ echo "changegroup = python \"$TESTDIR/printenv.py\" changegroup 0" >> .hg/hgrc $ req pushing to http://localhost:$HGPORT/ searching for changes diff --git a/tests/test-rebase-interruptions.t b/tests/test-rebase-interruptions.t index c8eda7bbdcab193934f04e43a4ee592c139be028_dGVzdHMvdGVzdC1yZWJhc2UtaW50ZXJydXB0aW9ucy50..efd2e14f72353626355dc82465bdf23bf6416aa2_dGVzdHMvdGVzdC1yZWJhc2UtaW50ZXJydXB0aW9ucy50 100644 --- a/tests/test-rebase-interruptions.t +++ b/tests/test-rebase-interruptions.t @@ -248,7 +248,8 @@ Abort the rebasing: $ hg rebase --abort - warning: immutable rebased changeset detected, can't abort + abort: can't abort rebase due to immutable changesets 45396c49d53b + (see hg help phases for details) [255] $ hg tglogp diff --git a/tests/test-share.t b/tests/test-share.t index c8eda7bbdcab193934f04e43a4ee592c139be028_dGVzdHMvdGVzdC1zaGFyZS50..efd2e14f72353626355dc82465bdf23bf6416aa2_dGVzdHMvdGVzdC1zaGFyZS50 100644 --- a/tests/test-share.t +++ b/tests/test-share.t @@ -99,7 +99,7 @@ $ hg serve -n test -p $HGPORT -d --pid-file=hg.pid $ cat hg.pid >> $DAEMON_PIDS - $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT '/raw-file/' + $ "$TESTDIR/get-with-headers.py" localhost:$HGPORT 'raw-file/' 200 Script output follows diff --git a/tests/test-ssh.t b/tests/test-ssh.t index c8eda7bbdcab193934f04e43a4ee592c139be028_dGVzdHMvdGVzdC1zc2gudA==..efd2e14f72353626355dc82465bdf23bf6416aa2_dGVzdHMvdGVzdC1zc2gudA== 100644 --- a/tests/test-ssh.t +++ b/tests/test-ssh.t @@ -14,7 +14,7 @@ > uncompressed = True > > [hooks] - > changegroup = python "$TESTDIR"/printenv.py changegroup-in-remote 0 ../dummylog + > changegroup = python "$TESTDIR/printenv.py" changegroup-in-remote 0 ../dummylog > EOF $ cd .. @@ -70,7 +70,7 @@ checking files 2 files, 1 changesets, 2 total revisions $ echo '[hooks]' >> .hg/hgrc - $ echo 'changegroup = python "$TESTDIR"/printenv.py changegroup-in-local 0 ../dummylog' >> .hg/hgrc + $ echo "changegroup = python \"$TESTDIR/printenv.py\" changegroup-in-local 0 ../dummylog" >> .hg/hgrc empty default pull @@ -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" diff --git a/tests/test-static-http.t b/tests/test-static-http.t index c8eda7bbdcab193934f04e43a4ee592c139be028_dGVzdHMvdGVzdC1zdGF0aWMtaHR0cC50..efd2e14f72353626355dc82465bdf23bf6416aa2_dGVzdHMvdGVzdC1zdGF0aWMtaHR0cC50 100644 --- a/tests/test-static-http.t +++ b/tests/test-static-http.t @@ -1,5 +1,10 @@ $ "$TESTDIR/hghave" serve || exit 80 +#if windows + $ hg clone http://localhost:$HGPORT/ copy + abort: * (glob) + [255] +#else $ hg clone http://localhost:$HGPORT/ copy abort: error: Connection refused [255] @@ -3,6 +8,7 @@ $ hg clone http://localhost:$HGPORT/ copy abort: error: Connection refused [255] +#endif $ test -d copy [1] @@ -66,7 +72,7 @@ $ rm .hg/cache/* $ cd ../local $ echo '[hooks]' >> .hg/hgrc - $ echo 'changegroup = python "$TESTDIR"/printenv.py changegroup' >> .hg/hgrc + $ echo "changegroup = python \"$TESTDIR/printenv.py\" changegroup" >> .hg/hgrc $ hg pull pulling from static-http://localhost:$HGPORT/remote searching for changes diff --git a/tests/test-subrepo-git.t b/tests/test-subrepo-git.t index c8eda7bbdcab193934f04e43a4ee592c139be028_dGVzdHMvdGVzdC1zdWJyZXBvLWdpdC50..efd2e14f72353626355dc82465bdf23bf6416aa2_dGVzdHMvdGVzdC1zdWJyZXBvLWdpdC50 100644 --- a/tests/test-subrepo-git.t +++ b/tests/test-subrepo-git.t @@ -2,6 +2,8 @@ make git commits repeatable + $ echo "[core]" >> $HOME/.gitconfig + $ echo "autocrlf = false" >> $HOME/.gitconfig $ GIT_AUTHOR_NAME='test'; export GIT_AUTHOR_NAME $ GIT_AUTHOR_EMAIL='test@example.org'; export GIT_AUTHOR_EMAIL $ GIT_AUTHOR_DATE='1234567891 +0000'; export GIT_AUTHOR_DATE @@ -133,7 +135,7 @@ user b push changes $ hg push 2>/dev/null - pushing to $TESTTMP/t + pushing to $TESTTMP/t (glob) pushing branch testing of subrepo s searching for changes adding changesets @@ -145,7 +147,7 @@ $ cd ../ta $ hg pull - pulling from $TESTTMP/t + pulling from $TESTTMP/t (glob) searching for changes adding changesets adding manifests @@ -173,7 +175,7 @@ source ../gitroot revision f47b465e1bce645dbf37232a00574aa1546ca8d3 $ hg push 2>/dev/null - pushing to $TESTTMP/t + pushing to $TESTTMP/t (glob) pushing branch testing of subrepo s searching for changes adding changesets @@ -205,7 +207,7 @@ $ echo aa >> a $ hg commit -m aa $ hg push - pushing to $TESTTMP/t + pushing to $TESTTMP/t (glob) searching for changes adding changesets adding manifests @@ -292,7 +294,7 @@ M inner/s/f $ hg commit --subrepos -m nested committing subrepository inner - committing subrepository inner/s + committing subrepository inner/s (glob) nested archive @@ -509,6 +511,7 @@ Test forgetting files, not implemented in git subrepo, used to traceback +#if no-windows $ hg forget 'notafile*' notafile*: No such file or directory [1] @@ -512,5 +515,10 @@ $ hg forget 'notafile*' notafile*: No such file or directory [1] +#else + $ hg forget 'notafile' + notafile: * (glob) + [1] +#endif $ cd .. diff --git a/tests/test-subrepo-relative-path.t b/tests/test-subrepo-relative-path.t index c8eda7bbdcab193934f04e43a4ee592c139be028_dGVzdHMvdGVzdC1zdWJyZXBvLXJlbGF0aXZlLXBhdGgudA==..efd2e14f72353626355dc82465bdf23bf6416aa2_dGVzdHMvdGVzdC1zdWJyZXBvLXJlbGF0aXZlLXBhdGgudA== 100644 --- a/tests/test-subrepo-relative-path.t +++ b/tests/test-subrepo-relative-path.t @@ -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 diff --git a/tests/test-symlink-os-yes-fs-no.py b/tests/test-symlink-os-yes-fs-no.py index c8eda7bbdcab193934f04e43a4ee592c139be028_dGVzdHMvdGVzdC1zeW1saW5rLW9zLXllcy1mcy1uby5weQ==..efd2e14f72353626355dc82465bdf23bf6416aa2_dGVzdHMvdGVzdC1zeW1saW5rLW9zLXllcy1mcy1uby5weQ== 100644 --- a/tests/test-symlink-os-yes-fs-no.py +++ b/tests/test-symlink-os-yes-fs-no.py @@ -8,4 +8,8 @@ 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 @@ -11,5 +15,4 @@ # clone with symlink support -u = ui.ui() hg.clone(u, {}, BUNDLEPATH, 'test0') repo = hg.repository(u, 'test0')