annotate tests/test-mq-qqueue @ 11767:9b771b4ce2f3

mq/qqueue: --list does not print (active) with --quiet For scripting purposes, it can be convenient to get a simple listing of available queues, without indication of the active one. --quiet documentation change removed by Patrick Mézard.
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
date Sun, 08 Aug 2010 22:49:01 +0200
parents e8a66a40474d
children 7d2ea5ce4aac
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
11229
1e701ffd9df4 mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff changeset
1 #!/bin/sh
1e701ffd9df4 mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff changeset
2
1e701ffd9df4 mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff changeset
3 echo "[extensions]" >> $HGRCPATH
1e701ffd9df4 mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff changeset
4 echo "mq=" >> $HGRCPATH
1e701ffd9df4 mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff changeset
5
1e701ffd9df4 mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff changeset
6 hg init foo
1e701ffd9df4 mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff changeset
7 cd foo
1e701ffd9df4 mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff changeset
8 echo a > a
1e701ffd9df4 mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff changeset
9 hg ci -qAm a
1e701ffd9df4 mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff changeset
10
1e701ffd9df4 mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff changeset
11 echo %% default queue
1e701ffd9df4 mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff changeset
12 hg qqueue
1e701ffd9df4 mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff changeset
13
1e701ffd9df4 mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff changeset
14 echo b > a
1e701ffd9df4 mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff changeset
15 hg qnew -fgDU somestuff
1e701ffd9df4 mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff changeset
16
1e701ffd9df4 mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff changeset
17 echo %% applied patches in default queue
1e701ffd9df4 mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff changeset
18 hg qap
1e701ffd9df4 mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff changeset
19
1e701ffd9df4 mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff changeset
20 echo %% try to change patch \(create succeeds, switch fails\)
1e701ffd9df4 mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff changeset
21 hg qqueue foo --create
1e701ffd9df4 mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff changeset
22 hg qqueue
1e701ffd9df4 mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff changeset
23
1e701ffd9df4 mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff changeset
24 echo %% empty default queue
1e701ffd9df4 mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff changeset
25 hg qpop
1e701ffd9df4 mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff changeset
26
1e701ffd9df4 mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff changeset
27 echo %% switch queue
1e701ffd9df4 mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff changeset
28 hg qqueue foo
1e701ffd9df4 mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff changeset
29 hg qqueue
1e701ffd9df4 mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff changeset
30
11767
9b771b4ce2f3 mq/qqueue: --list does not print (active) with --quiet
"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
parents: 11272
diff changeset
31 echo %% list queues, quiet
9b771b4ce2f3 mq/qqueue: --list does not print (active) with --quiet
"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
parents: 11272
diff changeset
32 hg qqueue --quiet
9b771b4ce2f3 mq/qqueue: --list does not print (active) with --quiet
"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
parents: 11272
diff changeset
33
11271
d1aca0863a9d mq: prevent the creation of a queue whose name is already taken
Cédric Duval <cedricduval@free.fr>
parents: 11270
diff changeset
34 echo %% fail creating queue with already existing name
d1aca0863a9d mq: prevent the creation of a queue whose name is already taken
Cédric Duval <cedricduval@free.fr>
parents: 11270
diff changeset
35 hg qqueue --create foo
d1aca0863a9d mq: prevent the creation of a queue whose name is already taken
Cédric Duval <cedricduval@free.fr>
parents: 11270
diff changeset
36 hg qqueue
d1aca0863a9d mq: prevent the creation of a queue whose name is already taken
Cédric Duval <cedricduval@free.fr>
parents: 11270
diff changeset
37
11229
1e701ffd9df4 mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff changeset
38 echo %% unapplied patches
1e701ffd9df4 mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff changeset
39 hg qun
1e701ffd9df4 mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff changeset
40 echo c > a
1e701ffd9df4 mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff changeset
41 hg qnew -fgDU otherstuff
1e701ffd9df4 mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff changeset
42
1e701ffd9df4 mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff changeset
43 echo %% fail switching back
1e701ffd9df4 mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff changeset
44 hg qqueue patches
1e701ffd9df4 mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff changeset
45
1e701ffd9df4 mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff changeset
46 echo %% fail deleting current
1e701ffd9df4 mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff changeset
47 hg qqueue foo --delete
1e701ffd9df4 mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff changeset
48
1e701ffd9df4 mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff changeset
49 echo %% switch back and delete foo
1e701ffd9df4 mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff changeset
50 hg qpop -a
1e701ffd9df4 mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff changeset
51 hg qqueue patches
1e701ffd9df4 mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff changeset
52 hg qqueue foo --delete
1e701ffd9df4 mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff changeset
53 hg qqueue
11270
457813cb3024 mq: fix naming issues for qqueue directories
Henrik Stuart <hg@hstuart.dk>
parents: 11229
diff changeset
54
457813cb3024 mq: fix naming issues for qqueue directories
Henrik Stuart <hg@hstuart.dk>
parents: 11229
diff changeset
55 echo %% tricky cases
457813cb3024 mq: fix naming issues for qqueue directories
Henrik Stuart <hg@hstuart.dk>
parents: 11229
diff changeset
56 hg qqueue store --create
11272
e8a66a40474d mq: better qqueue test for troublesome names
Henrik Stuart <hg@hstuart.dk>
parents: 11271
diff changeset
57 hg qnew journal
11270
457813cb3024 mq: fix naming issues for qqueue directories
Henrik Stuart <hg@hstuart.dk>
parents: 11229
diff changeset
58 hg qqueue
457813cb3024 mq: fix naming issues for qqueue directories
Henrik Stuart <hg@hstuart.dk>
parents: 11229
diff changeset
59 hg qpop -a
457813cb3024 mq: fix naming issues for qqueue directories
Henrik Stuart <hg@hstuart.dk>
parents: 11229
diff changeset
60 hg qqueue patches
457813cb3024 mq: fix naming issues for qqueue directories
Henrik Stuart <hg@hstuart.dk>
parents: 11229
diff changeset
61 hg qun
457813cb3024 mq: fix naming issues for qqueue directories
Henrik Stuart <hg@hstuart.dk>
parents: 11229
diff changeset
62
457813cb3024 mq: fix naming issues for qqueue directories
Henrik Stuart <hg@hstuart.dk>
parents: 11229
diff changeset
63 echo %% invalid names
457813cb3024 mq: fix naming issues for qqueue directories
Henrik Stuart <hg@hstuart.dk>
parents: 11229
diff changeset
64 hg qqueue test/../../bar --create
457813cb3024 mq: fix naming issues for qqueue directories
Henrik Stuart <hg@hstuart.dk>
parents: 11229
diff changeset
65 hg qqueue . --create
457813cb3024 mq: fix naming issues for qqueue directories
Henrik Stuart <hg@hstuart.dk>
parents: 11229
diff changeset
66
11229
1e701ffd9df4 mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff changeset
67 cd ..