Mercurial > hg
annotate tests/test-mq-qqueue.t @ 24545:9e0c67e84896
json: implement {tags} template
Tags is pretty easy to implement. Let's start there.
The output is slightly different from `hg tags -Tjson`. For reference,
the CLI has the following output:
[
{
"node": "e2049974f9a23176c2addb61d8f5b86e0d620490",
"rev": 29880,
"tag": "tip",
"type": ""
},
...
]
Our output has the format:
{
"node": "0aeb19ea57a6d223bacddda3871cb78f24b06510",
"tags": [
{
"node": "e2049974f9a23176c2addb61d8f5b86e0d620490",
"tag": "tag1",
"date": [1427775457.0, 25200]
},
...
]
}
"rev" is omitted because it isn't a reliable identifier. We shouldn't
be exposing them in web APIs and giving the impression it remotely
resembles a stable identifier. Perhaps we could one day hide this behind
a config option (it might be useful to expose when running servers
locally).
The "type" of the tag isn't defined because this information isn't yet
exposed to the hgweb templater (it could be in a follow-up) and because
it is questionable whether different types should be exposed at all.
(Should the web interface really be exposing "local" tags?)
We use an object for the outer type instead of Array for a few reasons.
First, it is extensible. If we ever need to throw more global properties
into the output, we can do that without breaking backwards compatibility
(property additions should be backwards compatible). Second, uniformity
in web APIs is nice. Having everything return objects seems much saner than
a mix of array and object. Third, there are security issues with arrays
in older browsers. The JSON web services world almost never uses arrays
as the main type for this reason.
Another possibly controversial part about this patch is how dates are
defined. While JSON has a Date type, it is based on the JavaScript Date
type, which is widely considered a pile of garbage. It is a non-starter
for this reason.
Many of Mercurial's built-in date filters drop seconds resolution. So
that's a non-starter as well, since we want the API to be lossless where
possible. rfc3339date, rfc822date, isodatesec, and date are all lossless.
However, they each require the client to perform string parsing on top of
JSON decoding. While date parsing libraries are pretty ubiquitous, some
languages don't have them out of the box. However, pretty much every
programming language can deal with UNIX timestamps (which are just
integers or floats). So, we choose to use Mercurial's internal date
representation, which in JSON is modeled as float seconds since UNIX
epoch and an integer timezone offset from UTC (keep in mind
JavaScript/JSON models all "Numbers" as double prevision floating point
numbers, so there isn't a difference between ints and floats in JSON).
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Tue, 31 Mar 2015 14:52:21 -0700 |
parents | 4f2f0f367ef6 |
children |
rev | line source |
---|---|
12324
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
1 $ echo "[extensions]" >> $HGRCPATH |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
2 $ echo "mq=" >> $HGRCPATH |
11229
1e701ffd9df4
mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff
changeset
|
3 |
12324
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
4 $ hg init foo |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
5 $ cd foo |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
6 $ echo a > a |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
7 $ hg ci -qAm a |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
8 |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
9 Default queue: |
11229
1e701ffd9df4
mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff
changeset
|
10 |
12324
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
11 $ hg qqueue |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
12 patches (active) |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
13 |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
14 $ echo b > a |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
15 $ hg qnew -fgDU somestuff |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
16 |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
17 Applied patches in default queue: |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
18 |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
19 $ hg qap |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
20 somestuff |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
21 |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
22 Try to change patch (create succeeds, switch fails): |
11229
1e701ffd9df4
mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff
changeset
|
23 |
12324
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
24 $ hg qqueue foo --create |
17708
4f2f0f367ef6
mq: improve qqueue message with patches applied (issue3036)
Bryan O'Sullivan <bryano@fb.com>
parents:
12324
diff
changeset
|
25 abort: new queue created, but cannot make active as patches are applied |
12324
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
26 [255] |
11229
1e701ffd9df4
mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff
changeset
|
27 |
12324
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
28 $ hg qqueue |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
29 foo |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
30 patches (active) |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
31 |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
32 Empty default queue: |
11229
1e701ffd9df4
mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff
changeset
|
33 |
12324
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
34 $ hg qpop |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
35 popping somestuff |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
36 patch queue now empty |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
37 |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
38 Switch queue: |
11229
1e701ffd9df4
mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff
changeset
|
39 |
12324
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
40 $ hg qqueue foo |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
41 $ hg qqueue |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
42 foo (active) |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
43 patches |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
44 |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
45 List queues, quiet: |
11229
1e701ffd9df4
mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff
changeset
|
46 |
12324
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
47 $ hg qqueue --quiet |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
48 foo |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
49 patches |
11229
1e701ffd9df4
mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff
changeset
|
50 |
12324
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
51 Fail creating queue with already existing name: |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
52 |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
53 $ hg qqueue --create foo |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
54 abort: queue "foo" already exists |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
55 [255] |
11229
1e701ffd9df4
mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff
changeset
|
56 |
12324
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
57 $ hg qqueue |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
58 foo (active) |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
59 patches |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
60 |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
61 Create new queue for rename: |
11767
9b771b4ce2f3
mq/qqueue: --list does not print (active) with --quiet
"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
parents:
11272
diff
changeset
|
62 |
12324
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
63 $ hg qqueue --create bar |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
64 |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
65 $ hg qqueue |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
66 bar (active) |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
67 foo |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
68 patches |
11271
d1aca0863a9d
mq: prevent the creation of a queue whose name is already taken
Cédric Duval <cedricduval@free.fr>
parents:
11270
diff
changeset
|
69 |
12324
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
70 Rename queue, same name: |
11939
7d2ea5ce4aac
mq/qqueue: enable renaming of active queue
"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
parents:
11767
diff
changeset
|
71 |
12324
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
72 $ hg qqueue --rename bar |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
73 abort: can't rename "bar" to its current name |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
74 [255] |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
75 |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
76 Rename queue to existing: |
11939
7d2ea5ce4aac
mq/qqueue: enable renaming of active queue
"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
parents:
11767
diff
changeset
|
77 |
12324
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
78 $ hg qqueue --rename foo |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
79 abort: queue "foo" already exists |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
80 [255] |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
81 |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
82 Rename queue: |
11939
7d2ea5ce4aac
mq/qqueue: enable renaming of active queue
"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
parents:
11767
diff
changeset
|
83 |
12324
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
84 $ hg qqueue --rename buz |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
85 |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
86 $ hg qqueue |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
87 buz (active) |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
88 foo |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
89 patches |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
90 |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
91 Switch back to previous queue: |
11939
7d2ea5ce4aac
mq/qqueue: enable renaming of active queue
"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
parents:
11767
diff
changeset
|
92 |
12324
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
93 $ hg qqueue foo |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
94 $ hg qqueue --delete buz |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
95 |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
96 $ hg qqueue |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
97 foo (active) |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
98 patches |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
99 |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
100 Create queue for purge: |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
101 |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
102 $ hg qqueue --create purge-me |
11939
7d2ea5ce4aac
mq/qqueue: enable renaming of active queue
"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
parents:
11767
diff
changeset
|
103 |
12324
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
104 $ hg qqueue |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
105 foo |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
106 patches |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
107 purge-me (active) |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
108 |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
109 Create patch for purge: |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
110 |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
111 $ hg qnew patch-purge-me |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
112 |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
113 $ ls -1d .hg/patches-purge-me 2>/dev/null || true |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
114 .hg/patches-purge-me |
11967
6e3875a80533
mq/qqueue: add --purge option to delete a queue and its patch dir
"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
parents:
11939
diff
changeset
|
115 |
12324
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
116 $ hg qpop -a |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
117 popping patch-purge-me |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
118 patch queue now empty |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
119 |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
120 Purge queue: |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
121 |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
122 $ hg qqueue foo |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
123 $ hg qqueue --purge purge-me |
11967
6e3875a80533
mq/qqueue: add --purge option to delete a queue and its patch dir
"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
parents:
11939
diff
changeset
|
124 |
12324
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
125 $ hg qqueue |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
126 foo (active) |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
127 patches |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
128 |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
129 $ ls -1d .hg/patches-purge-me 2>/dev/null || true |
11967
6e3875a80533
mq/qqueue: add --purge option to delete a queue and its patch dir
"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
parents:
11939
diff
changeset
|
130 |
12324
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
131 Unapplied patches: |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
132 |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
133 $ hg qun |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
134 $ echo c > a |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
135 $ hg qnew -fgDU otherstuff |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
136 |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
137 Fail switching back: |
11229
1e701ffd9df4
mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff
changeset
|
138 |
12324
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
139 $ hg qqueue patches |
17708
4f2f0f367ef6
mq: improve qqueue message with patches applied (issue3036)
Bryan O'Sullivan <bryano@fb.com>
parents:
12324
diff
changeset
|
140 abort: new queue created, but cannot make active as patches are applied |
12324
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
141 [255] |
11229
1e701ffd9df4
mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff
changeset
|
142 |
12324
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
143 Fail deleting current: |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
144 |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
145 $ hg qqueue foo --delete |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
146 abort: cannot delete currently active queue |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
147 [255] |
11229
1e701ffd9df4
mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff
changeset
|
148 |
12324
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
149 Switch back and delete foo: |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
150 |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
151 $ hg qpop -a |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
152 popping otherstuff |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
153 patch queue now empty |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
154 |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
155 $ hg qqueue patches |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
156 $ hg qqueue foo --delete |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
157 $ hg qqueue |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
158 patches (active) |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
159 |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
160 Tricky cases: |
11270
457813cb3024
mq: fix naming issues for qqueue directories
Henrik Stuart <hg@hstuart.dk>
parents:
11229
diff
changeset
|
161 |
12324
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
162 $ hg qqueue store --create |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
163 $ hg qnew journal |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
164 |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
165 $ hg qqueue |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
166 patches |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
167 store (active) |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
168 |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
169 $ hg qpop -a |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
170 popping journal |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
171 patch queue now empty |
11270
457813cb3024
mq: fix naming issues for qqueue directories
Henrik Stuart <hg@hstuart.dk>
parents:
11229
diff
changeset
|
172 |
12324
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
173 $ hg qqueue patches |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
174 $ hg qun |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
175 somestuff |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
176 |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
177 Invalid names: |
11270
457813cb3024
mq: fix naming issues for qqueue directories
Henrik Stuart <hg@hstuart.dk>
parents:
11229
diff
changeset
|
178 |
12324
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
179 $ hg qqueue test/../../bar --create |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
180 abort: invalid queue name, may not contain the characters ":\/." |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
181 [255] |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
182 |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
183 $ hg qqueue . --create |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
184 abort: invalid queue name, may not contain the characters ":\/." |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
185 [255] |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
186 |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
187 $ cd .. |
b701610f6c56
tests: unify some of test-mq*
Adrian Buehlmann <adrian@cadifra.com>
parents:
11967
diff
changeset
|
188 |