equal
deleted
inserted
replaced
|
1 |
|
2 $ cp "$TESTDIR"/printenv.py . |
|
3 $ hg init test |
|
4 $ cd test |
|
5 $ echo a > a |
|
6 $ hg ci -Ama |
|
7 adding a |
|
8 $ cd .. |
|
9 $ hg clone test test2 |
|
10 updating to branch default |
|
11 1 files updated, 0 files merged, 0 files removed, 0 files unresolved |
|
12 $ cd test2 |
|
13 $ echo a >> a |
|
14 $ hg ci -mb |
|
15 |
|
16 expect error, cloning not allowed |
|
17 |
|
18 $ echo '[web]' > .hg/hgrc |
|
19 $ echo 'allowpull = false' >> .hg/hgrc |
|
20 $ hg serve -p $HGPORT -d --pid-file=hg.pid -E errors.log |
|
21 $ cat hg.pid >> $DAEMON_PIDS |
|
22 $ hg clone http://localhost:$HGPORT/ test3 |
|
23 requesting all changes |
|
24 abort: authorization failed |
|
25 [255] |
|
26 $ "$TESTDIR/killdaemons.py" |
|
27 |
|
28 serve errors |
|
29 |
|
30 $ cat errors.log |
|
31 $ req() { |
|
32 > hg serve -p $HGPORT -d --pid-file=hg.pid -E errors.log |
|
33 > cat hg.pid >> $DAEMON_PIDS |
|
34 > hg --cwd ../test pull http://localhost:$HGPORT/ |
|
35 > kill `cat hg.pid` |
|
36 > echo % serve errors |
|
37 > cat errors.log |
|
38 > } |
|
39 |
|
40 expect error, pulling not allowed |
|
41 |
|
42 $ req |
|
43 pulling from http://localhost:*/ (glob) |
|
44 searching for changes |
|
45 abort: authorization failed |
|
46 % serve errors |