Mercurial > hg
comparison tests/test-mq-qdelete.t @ 12324:b701610f6c56
tests: unify some of test-mq*
author | Adrian Buehlmann <adrian@cadifra.com> |
---|---|
date | Sun, 19 Sep 2010 23:42:18 +0200 |
parents | tests/test-mq-qdelete@c3d7daa0928e |
children | 5192b24f309c |
comparison
equal
deleted
inserted
replaced
12318:d643ae555a4d | 12324:b701610f6c56 |
---|---|
1 $ echo "[extensions]" >> $HGRCPATH | |
2 $ echo "mq=" >> $HGRCPATH | |
3 | |
4 $ hg init a | |
5 $ cd a | |
6 | |
7 $ echo 'base' > base | |
8 $ hg ci -Ambase -d '1 0' | |
9 adding base | |
10 | |
11 $ hg qnew -d '1 0' a | |
12 $ hg qnew -d '1 0' b | |
13 $ hg qnew -d '1 0' c | |
14 | |
15 $ hg qdel | |
16 abort: qdelete requires at least one revision or patch name | |
17 [255] | |
18 | |
19 $ hg qdel c | |
20 abort: cannot delete applied patch c | |
21 [255] | |
22 | |
23 $ hg qpop | |
24 popping c | |
25 now at: b | |
26 | |
27 $ hg qdel c | |
28 | |
29 $ hg qseries | |
30 a | |
31 b | |
32 | |
33 $ ls .hg/patches | |
34 a | |
35 b | |
36 series | |
37 status | |
38 | |
39 $ hg qpop | |
40 popping b | |
41 now at: a | |
42 | |
43 $ hg qdel -k 1 | |
44 | |
45 $ ls .hg/patches | |
46 a | |
47 b | |
48 series | |
49 status | |
50 | |
51 $ hg qdel -r a | |
52 patch a finalized without changeset message | |
53 | |
54 $ hg qapplied | |
55 | |
56 $ hg log --template '{rev} {desc}\n' | |
57 1 [mq]: a | |
58 0 base | |
59 | |
60 $ hg qnew d | |
61 $ hg qnew e | |
62 $ hg qnew f | |
63 | |
64 $ hg qdel -r e | |
65 abort: cannot delete revision 3 above applied patches | |
66 [255] | |
67 | |
68 $ hg qdel -r qbase:e | |
69 patch d finalized without changeset message | |
70 patch e finalized without changeset message | |
71 | |
72 $ hg qapplied | |
73 f | |
74 | |
75 $ hg log --template '{rev} {desc}\n' | |
76 4 [mq]: f | |
77 3 [mq]: e | |
78 2 [mq]: d | |
79 1 [mq]: a | |
80 0 base | |
81 | |
82 $ cd .. | |
83 | |
84 $ hg init b | |
85 $ cd b | |
86 | |
87 $ echo 'base' > base | |
88 $ hg ci -Ambase -d '1 0' | |
89 adding base | |
90 | |
91 $ hg qfinish | |
92 abort: no revisions specified | |
93 [255] | |
94 | |
95 $ hg qfinish -a | |
96 no patches applied | |
97 | |
98 $ hg qnew -d '1 0' a | |
99 $ hg qnew -d '1 0' b | |
100 $ hg qnew c # XXX fails to apply by /usr/bin/patch if we put a date | |
101 | |
102 $ hg qfinish 0 | |
103 abort: revision 0 is not managed | |
104 [255] | |
105 | |
106 $ hg qfinish b | |
107 abort: cannot delete revision 2 above applied patches | |
108 [255] | |
109 | |
110 $ hg qpop | |
111 popping c | |
112 now at: b | |
113 | |
114 $ hg qfinish -a c | |
115 abort: unknown revision 'c'! | |
116 [255] | |
117 | |
118 $ hg qpush | |
119 applying c | |
120 patch c is empty | |
121 now at: c | |
122 | |
123 $ hg qfinish qbase:b | |
124 patch a finalized without changeset message | |
125 patch b finalized without changeset message | |
126 | |
127 $ hg qapplied | |
128 c | |
129 | |
130 $ hg log --template '{rev} {desc}\n' | |
131 3 imported patch c | |
132 2 [mq]: b | |
133 1 [mq]: a | |
134 0 base | |
135 | |
136 $ hg qfinish -a c | |
137 patch c finalized without changeset message | |
138 | |
139 $ hg qapplied | |
140 | |
141 $ hg log --template '{rev} {desc}\n' | |
142 3 imported patch c | |
143 2 [mq]: b | |
144 1 [mq]: a | |
145 0 base | |
146 | |
147 $ ls .hg/patches | |
148 series | |
149 status | |
150 |