Mercurial > hg-stable
annotate tests/test-clone-cgi.t @ 43564:d053d3f10b6a
packaging: stage installed files for Inno
Previously, the Inno installer maintained its own mapping of
source files to install location. (We have to maintain a
similar mapping in the WiX installer.)
Managing the explicit file layout for Windows packages is
cumbersome and redundant. Every time you want to change the
layout you need to change N locations. We frequently forget
to do this and we only find out when people install Mercurial
from our packages at release time.
This commit starts the process of consolidating and simplifying
the logic for managing the install layout on Windows.
We introduce a list of install layout rules. These are simply
source filenames (which can contain wildcards) and destination
paths.
The Inno packaging code has been updated to assemble all
files into a staging directory that mirrors the final install
layout. The list of files to add to the installer is derived
by walking this staging directory and dynamically emitting
the proper entries for the Inno Setup script.
I diffed the file layout before and after this commit and
there is no difference.
Another benefit of this change is that it facilitates easier
testing of the Windows install layout. Before, in order to
test the final install layout, you needed to build an installer
and run it. Now, you can stage files into the final layout
and test from there, without running the installer. This
should cut down on overhead when changing Windows code.
Differential Revision: https://phab.mercurial-scm.org/D7159
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Wed, 23 Oct 2019 18:39:28 -0700 |
parents | 5abc47d4ca6b |
children | d5cd1fd690f3 |
rev | line source |
---|---|
22046
7a9cbb315d84
tests: replace exit 80 with #require
Matt Mackall <mpm@selenic.com>
parents:
18552
diff
changeset
|
1 #require no-msys # MSYS will translate web paths as if they were file paths |
15567
8b84d040d9f9
tests: introduce 'hghave msys' to skip tests that would fail because of msys
Mads Kiilerich <mads@kiilerich.com>
parents:
13269
diff
changeset
|
2 |
12410
2bfb335c7594
tests: unify test-clone-cgi
Matt Mackall <mpm@selenic.com>
parents:
11584
diff
changeset
|
3 This is a test of the wire protocol over CGI-based hgweb. |
2bfb335c7594
tests: unify test-clone-cgi
Matt Mackall <mpm@selenic.com>
parents:
11584
diff
changeset
|
4 initialize repository |
6922
1ec2d227a521
hgweb: fix WSGI iterators handling in CGI adapter (issue1254)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
5 |
12410
2bfb335c7594
tests: unify test-clone-cgi
Matt Mackall <mpm@selenic.com>
parents:
11584
diff
changeset
|
6 $ hg init test |
2bfb335c7594
tests: unify test-clone-cgi
Matt Mackall <mpm@selenic.com>
parents:
11584
diff
changeset
|
7 $ cd test |
2bfb335c7594
tests: unify test-clone-cgi
Matt Mackall <mpm@selenic.com>
parents:
11584
diff
changeset
|
8 $ echo a > a |
2bfb335c7594
tests: unify test-clone-cgi
Matt Mackall <mpm@selenic.com>
parents:
11584
diff
changeset
|
9 $ hg ci -Ama |
2bfb335c7594
tests: unify test-clone-cgi
Matt Mackall <mpm@selenic.com>
parents:
11584
diff
changeset
|
10 adding a |
2bfb335c7594
tests: unify test-clone-cgi
Matt Mackall <mpm@selenic.com>
parents:
11584
diff
changeset
|
11 $ cd .. |
2bfb335c7594
tests: unify test-clone-cgi
Matt Mackall <mpm@selenic.com>
parents:
11584
diff
changeset
|
12 $ cat >hgweb.cgi <<HGWEB |
2bfb335c7594
tests: unify test-clone-cgi
Matt Mackall <mpm@selenic.com>
parents:
11584
diff
changeset
|
13 > # |
2bfb335c7594
tests: unify test-clone-cgi
Matt Mackall <mpm@selenic.com>
parents:
11584
diff
changeset
|
14 > # An example CGI script to use hgweb, edit as necessary |
2bfb335c7594
tests: unify test-clone-cgi
Matt Mackall <mpm@selenic.com>
parents:
11584
diff
changeset
|
15 > import cgitb |
2bfb335c7594
tests: unify test-clone-cgi
Matt Mackall <mpm@selenic.com>
parents:
11584
diff
changeset
|
16 > cgitb.enable() |
2bfb335c7594
tests: unify test-clone-cgi
Matt Mackall <mpm@selenic.com>
parents:
11584
diff
changeset
|
17 > from mercurial import demandimport; demandimport.enable() |
2bfb335c7594
tests: unify test-clone-cgi
Matt Mackall <mpm@selenic.com>
parents:
11584
diff
changeset
|
18 > from mercurial.hgweb import hgweb |
2bfb335c7594
tests: unify test-clone-cgi
Matt Mackall <mpm@selenic.com>
parents:
11584
diff
changeset
|
19 > from mercurial.hgweb import wsgicgi |
37668
2a42ca2679e2
py3: add b'' prefixes to make values bytes
Pulkit Goyal <7895pulkit@gmail.com>
parents:
33262
diff
changeset
|
20 > application = hgweb(b"test", b"Empty test repository") |
12410
2bfb335c7594
tests: unify test-clone-cgi
Matt Mackall <mpm@selenic.com>
parents:
11584
diff
changeset
|
21 > wsgicgi.launch(application) |
2bfb335c7594
tests: unify test-clone-cgi
Matt Mackall <mpm@selenic.com>
parents:
11584
diff
changeset
|
22 > HGWEB |
2bfb335c7594
tests: unify test-clone-cgi
Matt Mackall <mpm@selenic.com>
parents:
11584
diff
changeset
|
23 $ chmod 755 hgweb.cgi |
6922
1ec2d227a521
hgweb: fix WSGI iterators handling in CGI adapter (issue1254)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
24 |
12410
2bfb335c7594
tests: unify test-clone-cgi
Matt Mackall <mpm@selenic.com>
parents:
11584
diff
changeset
|
25 try hgweb request |
6922
1ec2d227a521
hgweb: fix WSGI iterators handling in CGI adapter (issue1254)
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
diff
changeset
|
26 |
13269
aa3f726a2bdb
tests: remove duplication of the CGI environment variables
StevenGBrown
parents:
12410
diff
changeset
|
27 $ . "$TESTDIR/cgienv" |
12410
2bfb335c7594
tests: unify test-clone-cgi
Matt Mackall <mpm@selenic.com>
parents:
11584
diff
changeset
|
28 $ QUERY_STRING="cmd=changegroup&roots=0000000000000000000000000000000000000000"; export QUERY_STRING |
39723
5abc47d4ca6b
tests: quote PYTHON usage
Matt Harbison <matt_harbison@yahoo.com>
parents:
37668
diff
changeset
|
29 $ "$PYTHON" hgweb.cgi >page1 2>&1 |
5abc47d4ca6b
tests: quote PYTHON usage
Matt Harbison <matt_harbison@yahoo.com>
parents:
37668
diff
changeset
|
30 $ "$PYTHON" "$TESTDIR/md5sum.py" page1 |
12410
2bfb335c7594
tests: unify test-clone-cgi
Matt Mackall <mpm@selenic.com>
parents:
11584
diff
changeset
|
31 1f424bb22ec05c3c6bc866b6e67efe43 page1 |
18552
e8efcc8ff5c0
hgweb.cgi: fix internal WSGI emulation (issue3804)
Mads Kiilerich <madski@unity3d.com>
parents:
15567
diff
changeset
|
32 |
e8efcc8ff5c0
hgweb.cgi: fix internal WSGI emulation (issue3804)
Mads Kiilerich <madski@unity3d.com>
parents:
15567
diff
changeset
|
33 make sure headers are sent even when there is no body |
e8efcc8ff5c0
hgweb.cgi: fix internal WSGI emulation (issue3804)
Mads Kiilerich <madski@unity3d.com>
parents:
15567
diff
changeset
|
34 |
39723
5abc47d4ca6b
tests: quote PYTHON usage
Matt Harbison <matt_harbison@yahoo.com>
parents:
37668
diff
changeset
|
35 $ QUERY_STRING="cmd=listkeys&namespace=nosuchnamespace" "$PYTHON" hgweb.cgi |
18552
e8efcc8ff5c0
hgweb.cgi: fix internal WSGI emulation (issue3804)
Mads Kiilerich <madski@unity3d.com>
parents:
15567
diff
changeset
|
36 Status: 200 Script output follows\r (esc) |
e8efcc8ff5c0
hgweb.cgi: fix internal WSGI emulation (issue3804)
Mads Kiilerich <madski@unity3d.com>
parents:
15567
diff
changeset
|
37 Content-Type: application/mercurial-0.1\r (esc) |
e8efcc8ff5c0
hgweb.cgi: fix internal WSGI emulation (issue3804)
Mads Kiilerich <madski@unity3d.com>
parents:
15567
diff
changeset
|
38 Content-Length: 0\r (esc) |
e8efcc8ff5c0
hgweb.cgi: fix internal WSGI emulation (issue3804)
Mads Kiilerich <madski@unity3d.com>
parents:
15567
diff
changeset
|
39 \r (esc) |