Mercurial > hg
annotate tests/test-mq-guards @ 3336:e44eadc92ec4
context: check self.__dict__ instead of using hasattr
hasattr implicitly calls getattr, instantiating the field it is
checking for.
author | Brendan Cully <brendan@kublai.com> |
---|---|
date | Wed, 11 Oct 2006 13:34:12 -0700 |
parents | 61fcd9fac434 |
children | 193e9c6d1a6d |
rev | line source |
---|---|
2821
2e4ace008c94
mq: new commands qselect, qguard
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
1 #!/bin/sh |
2e4ace008c94
mq: new commands qselect, qguard
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
2 |
2990
61fcd9fac434
Make tests append settings to $HGRCPATH instead of $HGTMP/.hgrc
Thomas Arendsen Hein <thomas@intevation.de>
parents:
2850
diff
changeset
|
3 echo "[extensions]" >> $HGRCPATH |
61fcd9fac434
Make tests append settings to $HGRCPATH instead of $HGTMP/.hgrc
Thomas Arendsen Hein <thomas@intevation.de>
parents:
2850
diff
changeset
|
4 echo "mq=" >> $HGRCPATH |
2821
2e4ace008c94
mq: new commands qselect, qguard
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
5 |
2e4ace008c94
mq: new commands qselect, qguard
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
6 hg init |
2e4ace008c94
mq: new commands qselect, qguard
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
7 hg qinit |
2e4ace008c94
mq: new commands qselect, qguard
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
8 |
2e4ace008c94
mq: new commands qselect, qguard
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
9 echo x > x |
2e4ace008c94
mq: new commands qselect, qguard
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
10 hg ci -Ama |
2e4ace008c94
mq: new commands qselect, qguard
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
11 |
2e4ace008c94
mq: new commands qselect, qguard
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
12 hg qnew a.patch |
2e4ace008c94
mq: new commands qselect, qguard
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
13 echo a > a |
2e4ace008c94
mq: new commands qselect, qguard
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
14 hg add a |
2e4ace008c94
mq: new commands qselect, qguard
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
15 hg qrefresh |
2e4ace008c94
mq: new commands qselect, qguard
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
16 |
2e4ace008c94
mq: new commands qselect, qguard
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
17 hg qnew b.patch |
2e4ace008c94
mq: new commands qselect, qguard
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
18 echo b > b |
2e4ace008c94
mq: new commands qselect, qguard
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
19 hg add b |
2e4ace008c94
mq: new commands qselect, qguard
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
20 hg qrefresh |
2e4ace008c94
mq: new commands qselect, qguard
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
21 |
2e4ace008c94
mq: new commands qselect, qguard
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
22 hg qnew c.patch |
2e4ace008c94
mq: new commands qselect, qguard
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
23 echo c > c |
2e4ace008c94
mq: new commands qselect, qguard
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
24 hg add c |
2e4ace008c94
mq: new commands qselect, qguard
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
25 hg qrefresh |
2e4ace008c94
mq: new commands qselect, qguard
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
26 |
2e4ace008c94
mq: new commands qselect, qguard
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
27 hg qpop -a |
2e4ace008c94
mq: new commands qselect, qguard
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
28 |
2e4ace008c94
mq: new commands qselect, qguard
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
29 echo % should fail |
2e4ace008c94
mq: new commands qselect, qguard
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
30 hg qguard +fail |
2e4ace008c94
mq: new commands qselect, qguard
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
31 |
2e4ace008c94
mq: new commands qselect, qguard
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
32 hg qpush |
2e4ace008c94
mq: new commands qselect, qguard
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
33 echo % should guard a.patch |
2e4ace008c94
mq: new commands qselect, qguard
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
34 hg qguard +a |
2e4ace008c94
mq: new commands qselect, qguard
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
35 echo % should print +a |
2e4ace008c94
mq: new commands qselect, qguard
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
36 hg qguard |
2e4ace008c94
mq: new commands qselect, qguard
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
37 hg qpop |
2e4ace008c94
mq: new commands qselect, qguard
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
38 |
2e4ace008c94
mq: new commands qselect, qguard
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
39 hg qguard a.patch |
2e4ace008c94
mq: new commands qselect, qguard
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
40 echo % should push b.patch |
2e4ace008c94
mq: new commands qselect, qguard
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
41 hg qpush |
2e4ace008c94
mq: new commands qselect, qguard
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
42 |
2e4ace008c94
mq: new commands qselect, qguard
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
43 hg qpop |
2e4ace008c94
mq: new commands qselect, qguard
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
44 hg qselect a |
2e4ace008c94
mq: new commands qselect, qguard
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
45 echo % should push a.patch |
2e4ace008c94
mq: new commands qselect, qguard
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
46 hg qpush |
2e4ace008c94
mq: new commands qselect, qguard
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
47 |
2e4ace008c94
mq: new commands qselect, qguard
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
48 hg qguard c.patch -a |
2e4ace008c94
mq: new commands qselect, qguard
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
49 echo % should print -a |
2e4ace008c94
mq: new commands qselect, qguard
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
50 hg qguard c.patch |
2e4ace008c94
mq: new commands qselect, qguard
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
51 |
2e4ace008c94
mq: new commands qselect, qguard
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
52 echo % should skip c.patch |
2e4ace008c94
mq: new commands qselect, qguard
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
53 hg qpush -a |
2e4ace008c94
mq: new commands qselect, qguard
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
54 |
2e4ace008c94
mq: new commands qselect, qguard
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
55 hg qguard -n c.patch |
2e4ace008c94
mq: new commands qselect, qguard
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
56 echo % should push c.patch |
2e4ace008c94
mq: new commands qselect, qguard
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
57 hg qpush -a |
2e4ace008c94
mq: new commands qselect, qguard
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
58 |
2e4ace008c94
mq: new commands qselect, qguard
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
59 hg qpop -a |
2e4ace008c94
mq: new commands qselect, qguard
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
60 hg qselect -n |
2829
05316bb57d01
mq: make guards more strict, add tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2821
diff
changeset
|
61 echo % should push all |
2821
2e4ace008c94
mq: new commands qselect, qguard
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
diff
changeset
|
62 hg qpush -a |
2829
05316bb57d01
mq: make guards more strict, add tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2821
diff
changeset
|
63 |
05316bb57d01
mq: make guards more strict, add tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2821
diff
changeset
|
64 hg qpop -a |
2850
851b07ec450c
mq: apply patch is any posative guard matches
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2844
diff
changeset
|
65 hg qguard a.patch +1 |
851b07ec450c
mq: apply patch is any posative guard matches
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2844
diff
changeset
|
66 hg qguard b.patch +2 |
2829
05316bb57d01
mq: make guards more strict, add tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2821
diff
changeset
|
67 hg qselect 1 |
2850
851b07ec450c
mq: apply patch is any posative guard matches
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2844
diff
changeset
|
68 echo % should push a.patch, not b.patch |
851b07ec450c
mq: apply patch is any posative guard matches
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2844
diff
changeset
|
69 hg qpush |
851b07ec450c
mq: apply patch is any posative guard matches
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2844
diff
changeset
|
70 hg qpush |
851b07ec450c
mq: apply patch is any posative guard matches
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2844
diff
changeset
|
71 hg qpop -a |
851b07ec450c
mq: apply patch is any posative guard matches
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2844
diff
changeset
|
72 |
851b07ec450c
mq: apply patch is any posative guard matches
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2844
diff
changeset
|
73 hg qselect 2 |
2829
05316bb57d01
mq: make guards more strict, add tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2821
diff
changeset
|
74 echo % should push b.patch |
05316bb57d01
mq: make guards more strict, add tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2821
diff
changeset
|
75 hg qpush |
05316bb57d01
mq: make guards more strict, add tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2821
diff
changeset
|
76 hg qpop -a |
05316bb57d01
mq: make guards more strict, add tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2821
diff
changeset
|
77 |
2850
851b07ec450c
mq: apply patch is any posative guard matches
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2844
diff
changeset
|
78 hg qselect 1 2 |
851b07ec450c
mq: apply patch is any posative guard matches
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2844
diff
changeset
|
79 echo % should push a.patch, b.patch |
2829
05316bb57d01
mq: make guards more strict, add tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2821
diff
changeset
|
80 hg qpush |
05316bb57d01
mq: make guards more strict, add tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2821
diff
changeset
|
81 hg qpush |
05316bb57d01
mq: make guards more strict, add tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2821
diff
changeset
|
82 hg qpop -a |
05316bb57d01
mq: make guards more strict, add tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2821
diff
changeset
|
83 |
05316bb57d01
mq: make guards more strict, add tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2821
diff
changeset
|
84 hg qguard a.patch +1 +2 -3 |
05316bb57d01
mq: make guards more strict, add tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2821
diff
changeset
|
85 hg qselect 1 2 3 |
2850
851b07ec450c
mq: apply patch is any posative guard matches
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2844
diff
changeset
|
86 echo % list patches and guards |
851b07ec450c
mq: apply patch is any posative guard matches
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2844
diff
changeset
|
87 hg qguard -l |
851b07ec450c
mq: apply patch is any posative guard matches
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2844
diff
changeset
|
88 echo % list series |
851b07ec450c
mq: apply patch is any posative guard matches
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2844
diff
changeset
|
89 hg qseries -v |
851b07ec450c
mq: apply patch is any posative guard matches
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2844
diff
changeset
|
90 echo % list guards |
851b07ec450c
mq: apply patch is any posative guard matches
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2844
diff
changeset
|
91 hg qselect |
2829
05316bb57d01
mq: make guards more strict, add tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2821
diff
changeset
|
92 echo % should push b.patch |
05316bb57d01
mq: make guards more strict, add tests
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2821
diff
changeset
|
93 hg qpush |
2844
582cbc4392cb
qselect: add --pop, --reapply options
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2829
diff
changeset
|
94 |
582cbc4392cb
qselect: add --pop, --reapply options
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2829
diff
changeset
|
95 hg qpush -a |
582cbc4392cb
qselect: add --pop, --reapply options
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2829
diff
changeset
|
96 hg qselect -n --reapply |
2850
851b07ec450c
mq: apply patch is any posative guard matches
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2844
diff
changeset
|
97 echo % guards in series file: +1 +2 -3 |
851b07ec450c
mq: apply patch is any posative guard matches
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2844
diff
changeset
|
98 hg qselect -s |
851b07ec450c
mq: apply patch is any posative guard matches
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2844
diff
changeset
|
99 echo % should show c.patch |
851b07ec450c
mq: apply patch is any posative guard matches
Vadim Gelfer <vadim.gelfer@gmail.com>
parents:
2844
diff
changeset
|
100 hg qapplied |