Mercurial > hg
annotate tests/test-hgweb-bundle.t @ 29489:54ad81b0665f
sslutil: handle default CA certificate loading on Windows
See the inline comment for what's going on here.
There is magic built into the "ssl" module that ships with modern
CPython that knows how to load the system CA certificates on
Windows. Since we're not shipping a CA bundle with Mercurial,
if we're running on legacy CPython there's nothing we can do
to load CAs on Windows, so it makes sense to print a warning.
I don't anticipate many people will see this warning because
the official (presumed popular) Mercurial distributions on
Windows bundle Python and should be distributing a modern Python
capable of loading system CA certs.
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Mon, 04 Jul 2016 10:04:11 -0700 |
parents | 4d2b9b304ad0 |
children | 4441705b7111 |
rev | line source |
---|---|
22223
c39d404f0eb0
hgweb: refresh repository using URL not path (issue4323)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
1 #require serve |
c39d404f0eb0
hgweb: refresh repository using URL not path (issue4323)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
2 |
c39d404f0eb0
hgweb: refresh repository using URL not path (issue4323)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
3 $ hg init server |
c39d404f0eb0
hgweb: refresh repository using URL not path (issue4323)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
4 $ cd server |
c39d404f0eb0
hgweb: refresh repository using URL not path (issue4323)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
5 $ cat >> .hg/hgrc << EOF |
c39d404f0eb0
hgweb: refresh repository using URL not path (issue4323)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
6 > [extensions] |
c39d404f0eb0
hgweb: refresh repository using URL not path (issue4323)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
7 > strip= |
c39d404f0eb0
hgweb: refresh repository using URL not path (issue4323)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
8 > EOF |
c39d404f0eb0
hgweb: refresh repository using URL not path (issue4323)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
9 |
c39d404f0eb0
hgweb: refresh repository using URL not path (issue4323)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
10 $ echo 1 > foo |
c39d404f0eb0
hgweb: refresh repository using URL not path (issue4323)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
11 $ hg commit -A -m 'first' |
c39d404f0eb0
hgweb: refresh repository using URL not path (issue4323)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
12 adding foo |
c39d404f0eb0
hgweb: refresh repository using URL not path (issue4323)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
13 $ echo 2 > bar |
c39d404f0eb0
hgweb: refresh repository using URL not path (issue4323)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
14 $ hg commit -A -m 'second' |
c39d404f0eb0
hgweb: refresh repository using URL not path (issue4323)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
15 adding bar |
c39d404f0eb0
hgweb: refresh repository using URL not path (issue4323)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
16 |
c39d404f0eb0
hgweb: refresh repository using URL not path (issue4323)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
17 Produce a bundle to use |
c39d404f0eb0
hgweb: refresh repository using URL not path (issue4323)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
18 |
c39d404f0eb0
hgweb: refresh repository using URL not path (issue4323)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
19 $ hg strip -r 1 |
c39d404f0eb0
hgweb: refresh repository using URL not path (issue4323)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
20 0 files updated, 0 files merged, 1 files removed, 0 files unresolved |
23835
aa4a1672583e
bundles: do not overwrite existing backup bundles (BC)
Durham Goode <durham@fb.com>
parents:
22223
diff
changeset
|
21 saved backup bundle to $TESTTMP/server/.hg/strip-backup/ed602e697e0f-cc9fff6a-backup.hg (glob) |
22223
c39d404f0eb0
hgweb: refresh repository using URL not path (issue4323)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
22 |
c39d404f0eb0
hgweb: refresh repository using URL not path (issue4323)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
23 Serve from a bundle file |
c39d404f0eb0
hgweb: refresh repository using URL not path (issue4323)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
24 |
23835
aa4a1672583e
bundles: do not overwrite existing backup bundles (BC)
Durham Goode <durham@fb.com>
parents:
22223
diff
changeset
|
25 $ hg serve -R .hg/strip-backup/ed602e697e0f-cc9fff6a-backup.hg -d -p $HGPORT --pid-file=hg.pid |
22223
c39d404f0eb0
hgweb: refresh repository using URL not path (issue4323)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
26 $ cat hg.pid >> $DAEMON_PIDS |
c39d404f0eb0
hgweb: refresh repository using URL not path (issue4323)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
27 |
c39d404f0eb0
hgweb: refresh repository using URL not path (issue4323)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
28 Ensure we're serving from the bundle |
c39d404f0eb0
hgweb: refresh repository using URL not path (issue4323)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
29 |
25472
4d2b9b304ad0
tests: drop explicit $TESTDIR from executables
Matt Mackall <mpm@selenic.com>
parents:
23835
diff
changeset
|
30 $ (get-with-headers.py localhost:$HGPORT 'file/tip/?style=raw') |
22223
c39d404f0eb0
hgweb: refresh repository using URL not path (issue4323)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
31 200 Script output follows |
c39d404f0eb0
hgweb: refresh repository using URL not path (issue4323)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
32 |
c39d404f0eb0
hgweb: refresh repository using URL not path (issue4323)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
33 |
c39d404f0eb0
hgweb: refresh repository using URL not path (issue4323)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
34 -rw-r--r-- 2 bar |
c39d404f0eb0
hgweb: refresh repository using URL not path (issue4323)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
35 -rw-r--r-- 2 foo |
c39d404f0eb0
hgweb: refresh repository using URL not path (issue4323)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
36 |
c39d404f0eb0
hgweb: refresh repository using URL not path (issue4323)
Gregory Szorc <gregory.szorc@gmail.com>
parents:
diff
changeset
|
37 |