##// END OF EJS Templates
tests: load showstack in test-pull-http.t so network hangs are easier to find...
Augie Fackler -
r37606:165a77f7 default
parent child Browse files
Show More
@@ -1,79 +1,90
1 1 #require killdaemons
2 2
3 #if no-windows
4 For debugging: this is a pretty simple test that is a good candidate
5 for tracking down network-related bugs. Sometimes a command in this
6 hangs, so having showstack pre-loaded is sometimes helpful. This also
7 gives us a test that at least proves showstack can be loaded.
8 $ cat >> $HGRCPATH <<EOF
9 > [extensions]
10 > showstack = $TESTDIR/../contrib/showstack.py
11 > EOF
12 #endif
13
3 14 $ hg init test
4 15 $ cd test
5 16 $ echo a > a
6 17 $ hg ci -Ama
7 18 adding a
8 19 $ cd ..
9 20 $ hg clone test test2
10 21 updating to branch default
11 22 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
12 23 $ cd test2
13 24 $ echo a >> a
14 25 $ hg ci -mb
15 26
16 27 Cloning with a password in the URL should not save the password in .hg/hgrc:
17 28
18 29 $ hg serve -p $HGPORT -d --pid-file=hg.pid -E errors.log
19 30 $ cat hg.pid >> $DAEMON_PIDS
20 31 $ hg clone http://foo:xyzzy@localhost:$HGPORT/ test3
21 32 requesting all changes
22 33 adding changesets
23 34 adding manifests
24 35 adding file changes
25 36 added 2 changesets with 2 changes to 1 files
26 37 new changesets cb9a9f314b8b:ba677d0156c1
27 38 updating to branch default
28 39 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
29 40 $ cat test3/.hg/hgrc
30 41 # example repository config (see 'hg help config' for more info)
31 42 [paths]
32 43 default = http://foo@localhost:$HGPORT/
33 44
34 45 # path aliases to other clones of this repo in URLs or filesystem paths
35 46 # (see 'hg help config.paths' for more info)
36 47 #
37 48 # default:pushurl = ssh://jdoe@example.net/hg/jdoes-fork
38 49 # my-fork = ssh://jdoe@example.net/hg/jdoes-fork
39 50 # my-clone = /home/jdoe/jdoes-clone
40 51
41 52 [ui]
42 53 # name and email (local to this repository, optional), e.g.
43 54 # username = Jane Doe <jdoe@example.com>
44 55 $ killdaemons.py
45 56
46 57 expect error, cloning not allowed
47 58
48 59 $ echo '[web]' > .hg/hgrc
49 60 $ echo 'allowpull = false' >> .hg/hgrc
50 61 $ hg serve -p $HGPORT -d --pid-file=hg.pid -E errors.log
51 62 $ cat hg.pid >> $DAEMON_PIDS
52 63 $ hg clone http://localhost:$HGPORT/ test4 # bundle2+
53 64 abort: authorization failed
54 65 [255]
55 66 $ hg clone http://localhost:$HGPORT/ test4 --config devel.legacy.exchange=bundle1
56 67 abort: authorization failed
57 68 [255]
58 69 $ killdaemons.py
59 70
60 71 serve errors
61 72
62 73 $ cat errors.log
63 74 $ req() {
64 75 > hg serve -p $HGPORT -d --pid-file=hg.pid -E errors.log
65 76 > cat hg.pid >> $DAEMON_PIDS
66 77 > hg --cwd ../test pull http://localhost:$HGPORT/
67 78 > killdaemons.py hg.pid
68 79 > echo % serve errors
69 80 > cat errors.log
70 81 > }
71 82
72 83 expect error, pulling not allowed
73 84
74 85 $ req
75 86 pulling from http://localhost:$HGPORT/
76 87 abort: authorization failed
77 88 % serve errors
78 89
79 90 $ cd ..
General Comments 0
You need to be logged in to leave comments. Login now