author | Patrick Mezard <pmezard@gmail.com> |
Thu, 19 Aug 2010 23:13:20 +0200 | |
changeset 11993 | 9bce7ed50c9a |
parent 11967 | 6e3875a80533 |
permissions | -rwxr-xr-x |
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 |
|
11939
7d2ea5ce4aac
mq/qqueue: enable renaming of active queue
"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
parents:
11767
diff
changeset
|
38 |
echo %% create new queue for rename |
7d2ea5ce4aac
mq/qqueue: enable renaming of active queue
"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
parents:
11767
diff
changeset
|
39 |
hg qqueue --create bar |
7d2ea5ce4aac
mq/qqueue: enable renaming of active queue
"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
parents:
11767
diff
changeset
|
40 |
hg qqueue |
7d2ea5ce4aac
mq/qqueue: enable renaming of active queue
"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
parents:
11767
diff
changeset
|
41 |
|
7d2ea5ce4aac
mq/qqueue: enable renaming of active queue
"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
parents:
11767
diff
changeset
|
42 |
echo %% rename queue, same name |
7d2ea5ce4aac
mq/qqueue: enable renaming of active queue
"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
parents:
11767
diff
changeset
|
43 |
hg qqueue --rename bar |
7d2ea5ce4aac
mq/qqueue: enable renaming of active queue
"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
parents:
11767
diff
changeset
|
44 |
|
7d2ea5ce4aac
mq/qqueue: enable renaming of active queue
"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
parents:
11767
diff
changeset
|
45 |
echo %% rename queue to existing |
7d2ea5ce4aac
mq/qqueue: enable renaming of active queue
"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
parents:
11767
diff
changeset
|
46 |
hg qqueue --rename foo |
7d2ea5ce4aac
mq/qqueue: enable renaming of active queue
"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
parents:
11767
diff
changeset
|
47 |
|
7d2ea5ce4aac
mq/qqueue: enable renaming of active queue
"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
parents:
11767
diff
changeset
|
48 |
echo %% rename queue |
7d2ea5ce4aac
mq/qqueue: enable renaming of active queue
"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
parents:
11767
diff
changeset
|
49 |
hg qqueue --rename buz |
7d2ea5ce4aac
mq/qqueue: enable renaming of active queue
"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
parents:
11767
diff
changeset
|
50 |
hg qqueue |
7d2ea5ce4aac
mq/qqueue: enable renaming of active queue
"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
parents:
11767
diff
changeset
|
51 |
|
7d2ea5ce4aac
mq/qqueue: enable renaming of active queue
"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
parents:
11767
diff
changeset
|
52 |
echo %% switch back to previous queue |
7d2ea5ce4aac
mq/qqueue: enable renaming of active queue
"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
parents:
11767
diff
changeset
|
53 |
hg qqueue foo |
7d2ea5ce4aac
mq/qqueue: enable renaming of active queue
"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
parents:
11767
diff
changeset
|
54 |
hg qqueue --delete buz |
7d2ea5ce4aac
mq/qqueue: enable renaming of active queue
"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
parents:
11767
diff
changeset
|
55 |
hg qqueue |
7d2ea5ce4aac
mq/qqueue: enable renaming of active queue
"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
parents:
11767
diff
changeset
|
56 |
|
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
|
57 |
echo %% create queue for purge |
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
|
58 |
hg qqueue --create purge-me |
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
|
59 |
hg qqueue |
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
|
60 |
|
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
|
61 |
echo %% create patch for purge |
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
|
62 |
hg qnew patch-purge-me |
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
|
63 |
ls -1d .hg/patches-purge-me 2>/dev/null || true |
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
|
64 |
hg qpop -a |
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
|
65 |
|
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
|
66 |
echo %% purge queue |
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
|
67 |
hg qqueue foo |
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
|
68 |
hg qqueue --purge purge-me |
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
|
69 |
hg qqueue |
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
|
70 |
ls -1d .hg/patches-purge-me 2>/dev/null || true |
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
|
71 |
|
11229
1e701ffd9df4
mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff
changeset
|
72 |
echo %% unapplied patches |
1e701ffd9df4
mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff
changeset
|
73 |
hg qun |
1e701ffd9df4
mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff
changeset
|
74 |
echo c > a |
1e701ffd9df4
mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff
changeset
|
75 |
hg qnew -fgDU otherstuff |
1e701ffd9df4
mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff
changeset
|
76 |
|
1e701ffd9df4
mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff
changeset
|
77 |
echo %% fail switching back |
1e701ffd9df4
mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff
changeset
|
78 |
hg qqueue patches |
1e701ffd9df4
mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff
changeset
|
79 |
|
1e701ffd9df4
mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff
changeset
|
80 |
echo %% fail deleting current |
1e701ffd9df4
mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff
changeset
|
81 |
hg qqueue foo --delete |
1e701ffd9df4
mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff
changeset
|
82 |
|
1e701ffd9df4
mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff
changeset
|
83 |
echo %% switch back and delete foo |
1e701ffd9df4
mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff
changeset
|
84 |
hg qpop -a |
1e701ffd9df4
mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff
changeset
|
85 |
hg qqueue patches |
1e701ffd9df4
mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff
changeset
|
86 |
hg qqueue foo --delete |
1e701ffd9df4
mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff
changeset
|
87 |
hg qqueue |
11270
457813cb3024
mq: fix naming issues for qqueue directories
Henrik Stuart <hg@hstuart.dk>
parents:
11229
diff
changeset
|
88 |
|
457813cb3024
mq: fix naming issues for qqueue directories
Henrik Stuart <hg@hstuart.dk>
parents:
11229
diff
changeset
|
89 |
echo %% tricky cases |
457813cb3024
mq: fix naming issues for qqueue directories
Henrik Stuart <hg@hstuart.dk>
parents:
11229
diff
changeset
|
90 |
hg qqueue store --create |
11272
e8a66a40474d
mq: better qqueue test for troublesome names
Henrik Stuart <hg@hstuart.dk>
parents:
11271
diff
changeset
|
91 |
hg qnew journal |
11270
457813cb3024
mq: fix naming issues for qqueue directories
Henrik Stuart <hg@hstuart.dk>
parents:
11229
diff
changeset
|
92 |
hg qqueue |
457813cb3024
mq: fix naming issues for qqueue directories
Henrik Stuart <hg@hstuart.dk>
parents:
11229
diff
changeset
|
93 |
hg qpop -a |
457813cb3024
mq: fix naming issues for qqueue directories
Henrik Stuart <hg@hstuart.dk>
parents:
11229
diff
changeset
|
94 |
hg qqueue patches |
457813cb3024
mq: fix naming issues for qqueue directories
Henrik Stuart <hg@hstuart.dk>
parents:
11229
diff
changeset
|
95 |
hg qun |
457813cb3024
mq: fix naming issues for qqueue directories
Henrik Stuart <hg@hstuart.dk>
parents:
11229
diff
changeset
|
96 |
|
457813cb3024
mq: fix naming issues for qqueue directories
Henrik Stuart <hg@hstuart.dk>
parents:
11229
diff
changeset
|
97 |
echo %% invalid names |
457813cb3024
mq: fix naming issues for qqueue directories
Henrik Stuart <hg@hstuart.dk>
parents:
11229
diff
changeset
|
98 |
hg qqueue test/../../bar --create |
457813cb3024
mq: fix naming issues for qqueue directories
Henrik Stuart <hg@hstuart.dk>
parents:
11229
diff
changeset
|
99 |
hg qqueue . --create |
457813cb3024
mq: fix naming issues for qqueue directories
Henrik Stuart <hg@hstuart.dk>
parents:
11229
diff
changeset
|
100 |
|
11229
1e701ffd9df4
mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff
changeset
|
101 |
cd .. |