annotate tests/test-push-http.t @ 13446:1e497df514e2 stable

rollback: clarifies the message about the reverted state (issue2628) Previously, when rolling back a transaction, some users could be confused between the level to which the store is rolled back, and the new parents of the working directory. $ hg rollback rolling back to revision 4 (undo commit) With this change: $ hg rollback repository tip rolled back to tip revision 4 (undo commit) working directory now based on revision 2 and 1 So now the user can realize that the store has been rolled back to an older tip, but also that the working directory may not on the tip (here we are rolling back the merge of the heads 2 and 1)
author Gilles Moris <gilles.moris@free.fr>
date Thu, 10 Feb 2011 09:03:06 +0100
parents 682edefe7dbb
children 8b1125eb361e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2481
5c65b4e51610 add tests for push over http.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
1
12483
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
2 $ hg init test
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
3 $ cd test
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
4 $ echo a > a
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
5 $ hg ci -Ama
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
6 adding a
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
7 $ cd ..
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
8 $ hg clone test test2
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
9 updating to branch default
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
10 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
11 $ cd test2
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
12 $ echo a >> a
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
13 $ hg ci -mb
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
14 $ req() {
12743
4c4aeaab2339 check-code: add 'no tab indent' check for unified tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12643
diff changeset
15 > hg serve -p $HGPORT -d --pid-file=hg.pid -E errors.log
4c4aeaab2339 check-code: add 'no tab indent' check for unified tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12643
diff changeset
16 > cat hg.pid >> $DAEMON_PIDS
4c4aeaab2339 check-code: add 'no tab indent' check for unified tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12643
diff changeset
17 > hg --cwd ../test2 push http://localhost:$HGPORT/
4c4aeaab2339 check-code: add 'no tab indent' check for unified tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12643
diff changeset
18 > kill `cat hg.pid`
4c4aeaab2339 check-code: add 'no tab indent' check for unified tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12643
diff changeset
19 > echo % serve errors
4c4aeaab2339 check-code: add 'no tab indent' check for unified tests
Adrian Buehlmann <adrian@cadifra.com>
parents: 12643
diff changeset
20 > cat errors.log
12483
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
21 > }
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
22 $ cd ../test
2481
5c65b4e51610 add tests for push over http.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
23
12483
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
24 expect ssl error
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
25
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
26 $ req
12643
d08bb64888bc tests: reintroduce ":$HGPORT" in test output
Mads Kiilerich <mads@kiilerich.com>
parents: 12483
diff changeset
27 pushing to http://localhost:$HGPORT/
12483
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
28 searching for changes
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
29 remote: ssl required
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
30 % serve errors
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
31
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
32 expect authorization error
6167
f53b9a383476 tests: easier hg serve error diagnosis
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 5386
diff changeset
33
12483
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
34 $ echo '[web]' > .hg/hgrc
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
35 $ echo 'push_ssl = false' >> .hg/hgrc
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
36 $ req
12643
d08bb64888bc tests: reintroduce ":$HGPORT" in test output
Mads Kiilerich <mads@kiilerich.com>
parents: 12483
diff changeset
37 pushing to http://localhost:$HGPORT/
12483
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
38 searching for changes
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
39 abort: authorization failed
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
40 % serve errors
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
41
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
42 expect authorization error: must have authorized user
2481
5c65b4e51610 add tests for push over http.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
43
12483
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
44 $ echo 'allow_push = unperson' >> .hg/hgrc
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
45 $ req
12643
d08bb64888bc tests: reintroduce ":$HGPORT" in test output
Mads Kiilerich <mads@kiilerich.com>
parents: 12483
diff changeset
46 pushing to http://localhost:$HGPORT/
12483
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
47 searching for changes
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
48 abort: authorization failed
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
49 % serve errors
2481
5c65b4e51610 add tests for push over http.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
50
12483
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
51 expect success
2481
5c65b4e51610 add tests for push over http.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
52
12483
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
53 $ echo 'allow_push = *' >> .hg/hgrc
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
54 $ echo '[hooks]' >> .hg/hgrc
13405
682edefe7dbb tests: use printenv.py where it is - don't copy it around
Mads Kiilerich <mads@kiilerich.com>
parents: 13404
diff changeset
55 $ echo 'changegroup = python "$TESTDIR"/printenv.py changegroup 0' >> .hg/hgrc
12483
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
56 $ req
12643
d08bb64888bc tests: reintroduce ":$HGPORT" in test output
Mads Kiilerich <mads@kiilerich.com>
parents: 12483
diff changeset
57 pushing to http://localhost:$HGPORT/
12483
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
58 searching for changes
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
59 remote: adding changesets
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
60 remote: adding manifests
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
61 remote: adding file changes
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
62 remote: added 1 changesets with 1 changes to 1 files
13404
31a256ffe9e5 tests: let printenv.py show the real values
Mads Kiilerich <mads@kiilerich.com>
parents: 12743
diff changeset
63 remote: changegroup hook: HG_NODE=ba677d0156c1196c1a699fa53f390dcfc3ce3872 HG_SOURCE=serve HG_URL=remote:http:*: (glob)
12483
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
64 % serve errors
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
65 $ hg rollback
13446
1e497df514e2 rollback: clarifies the message about the reverted state (issue2628)
Gilles Moris <gilles.moris@free.fr>
parents: 13405
diff changeset
66 repository tip rolled back to revision 0 (undo serve)
1e497df514e2 rollback: clarifies the message about the reverted state (issue2628)
Gilles Moris <gilles.moris@free.fr>
parents: 13405
diff changeset
67 working directory now based on revision 0
12483
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
68
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
69 expect authorization error: all users denied
2481
5c65b4e51610 add tests for push over http.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
70
12483
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
71 $ echo '[web]' > .hg/hgrc
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
72 $ echo 'push_ssl = false' >> .hg/hgrc
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
73 $ echo 'deny_push = *' >> .hg/hgrc
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
74 $ req
12643
d08bb64888bc tests: reintroduce ":$HGPORT" in test output
Mads Kiilerich <mads@kiilerich.com>
parents: 12483
diff changeset
75 pushing to http://localhost:$HGPORT/
12483
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
76 searching for changes
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
77 abort: authorization failed
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
78 % serve errors
2481
5c65b4e51610 add tests for push over http.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff changeset
79
12483
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
80 expect authorization error: some users denied, users must be authenticated
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
81
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
82 $ echo 'deny_push = unperson' >> .hg/hgrc
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
83 $ req
12643
d08bb64888bc tests: reintroduce ":$HGPORT" in test output
Mads Kiilerich <mads@kiilerich.com>
parents: 12483
diff changeset
84 pushing to http://localhost:$HGPORT/
12483
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
85 searching for changes
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
86 abort: authorization failed
fecd4966f8d4 tests: unify test-push-http
Matt Mackall <mpm@selenic.com>
parents: 11469
diff changeset
87 % serve errors