##// END OF EJS Templates
test: use both bundle formats in test-pull-http...
Pierre-Yves David -
r25372:df723a26 default
parent child Browse files
Show More
@@ -1,75 +1,79 b''
1 #require killdaemons
1 #require killdaemons
2
2
3 $ hg init test
3 $ hg init test
4 $ cd test
4 $ cd test
5 $ echo a > a
5 $ echo a > a
6 $ hg ci -Ama
6 $ hg ci -Ama
7 adding a
7 adding a
8 $ cd ..
8 $ cd ..
9 $ hg clone test test2
9 $ hg clone test test2
10 updating to branch default
10 updating to branch default
11 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
11 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
12 $ cd test2
12 $ cd test2
13 $ echo a >> a
13 $ echo a >> a
14 $ hg ci -mb
14 $ hg ci -mb
15
15
16 Cloning with a password in the URL should not save the password in .hg/hgrc:
16 Cloning with a password in the URL should not save the password in .hg/hgrc:
17
17
18 $ hg serve -p $HGPORT -d --pid-file=hg.pid -E errors.log
18 $ hg serve -p $HGPORT -d --pid-file=hg.pid -E errors.log
19 $ cat hg.pid >> $DAEMON_PIDS
19 $ cat hg.pid >> $DAEMON_PIDS
20 $ hg clone http://foo:xyzzy@localhost:$HGPORT/ test3
20 $ hg clone http://foo:xyzzy@localhost:$HGPORT/ test3
21 requesting all changes
21 requesting all changes
22 adding changesets
22 adding changesets
23 adding manifests
23 adding manifests
24 adding file changes
24 adding file changes
25 added 2 changesets with 2 changes to 1 files
25 added 2 changesets with 2 changes to 1 files
26 updating to branch default
26 updating to branch default
27 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
27 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
28 $ cat test3/.hg/hgrc
28 $ cat test3/.hg/hgrc
29 # example repository config (see "hg help config" for more info)
29 # example repository config (see "hg help config" for more info)
30 [paths]
30 [paths]
31 default = http://foo@localhost:$HGPORT/
31 default = http://foo@localhost:$HGPORT/
32
32
33 # path aliases to other clones of this repo in URLs or filesystem paths
33 # path aliases to other clones of this repo in URLs or filesystem paths
34 # (see "hg help config.paths" for more info)
34 # (see "hg help config.paths" for more info)
35 #
35 #
36 # default-push = ssh://jdoe@example.net/hg/jdoes-fork
36 # default-push = ssh://jdoe@example.net/hg/jdoes-fork
37 # my-fork = ssh://jdoe@example.net/hg/jdoes-fork
37 # my-fork = ssh://jdoe@example.net/hg/jdoes-fork
38 # my-clone = /home/jdoe/jdoes-clone
38 # my-clone = /home/jdoe/jdoes-clone
39
39
40 [ui]
40 [ui]
41 # name and email (local to this repository, optional), e.g.
41 # name and email (local to this repository, optional), e.g.
42 # username = Jane Doe <jdoe@example.com>
42 # username = Jane Doe <jdoe@example.com>
43 $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS
43 $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS
44
44
45 expect error, cloning not allowed
45 expect error, cloning not allowed
46
46
47 $ echo '[web]' > .hg/hgrc
47 $ echo '[web]' > .hg/hgrc
48 $ echo 'allowpull = false' >> .hg/hgrc
48 $ echo 'allowpull = false' >> .hg/hgrc
49 $ hg serve -p $HGPORT -d --pid-file=hg.pid -E errors.log
49 $ hg serve -p $HGPORT -d --pid-file=hg.pid -E errors.log
50 $ cat hg.pid >> $DAEMON_PIDS
50 $ cat hg.pid >> $DAEMON_PIDS
51 $ hg clone http://localhost:$HGPORT/ test4
51 $ hg clone http://localhost:$HGPORT/ test4 --config experimental.bundle2-exp=True
52 requesting all changes
53 abort: authorization failed
54 [255]
55 $ hg clone http://localhost:$HGPORT/ test4 --config experimental.bundle2-exp=False
52 abort: authorization failed
56 abort: authorization failed
53 [255]
57 [255]
54 $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS
58 $ "$TESTDIR/killdaemons.py" $DAEMON_PIDS
55
59
56 serve errors
60 serve errors
57
61
58 $ cat errors.log
62 $ cat errors.log
59 $ req() {
63 $ req() {
60 > hg serve -p $HGPORT -d --pid-file=hg.pid -E errors.log
64 > hg serve -p $HGPORT -d --pid-file=hg.pid -E errors.log
61 > cat hg.pid >> $DAEMON_PIDS
65 > cat hg.pid >> $DAEMON_PIDS
62 > hg --cwd ../test pull http://localhost:$HGPORT/
66 > hg --cwd ../test pull http://localhost:$HGPORT/
63 > "$TESTDIR/killdaemons.py" hg.pid
67 > "$TESTDIR/killdaemons.py" hg.pid
64 > echo % serve errors
68 > echo % serve errors
65 > cat errors.log
69 > cat errors.log
66 > }
70 > }
67
71
68 expect error, pulling not allowed
72 expect error, pulling not allowed
69
73
70 $ req
74 $ req
71 pulling from http://localhost:$HGPORT/
75 pulling from http://localhost:$HGPORT/
72 abort: authorization failed
76 abort: authorization failed
73 % serve errors
77 % serve errors
74
78
75 $ cd ..
79 $ cd ..
General Comments 0
You need to be logged in to leave comments. Login now