tests/test-mq-qqueue
author Martin Geisler <mg@lazybytes.net>
Sat, 19 Jun 2010 17:19:15 +0200
changeset 11400 e5b7841e0008
parent 11272 e8a66a40474d
child 11767 9b771b4ce2f3
permissions -rwxr-xr-x
i18n-zh_CN: split messages into paragraphs
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
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
11271
d1aca0863a9d mq: prevent the creation of a queue whose name is already taken
Cédric Duval <cedricduval@free.fr>
parents: 11270
diff changeset
    31
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
    32
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
    33
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
    34
11229
1e701ffd9df4 mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff changeset
    35
echo %% unapplied patches
1e701ffd9df4 mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff changeset
    36
hg qun
1e701ffd9df4 mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff changeset
    37
echo c > a
1e701ffd9df4 mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff changeset
    38
hg qnew -fgDU otherstuff
1e701ffd9df4 mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff changeset
    39
1e701ffd9df4 mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff changeset
    40
echo %% fail switching back
1e701ffd9df4 mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff changeset
    41
hg qqueue patches
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 deleting current
1e701ffd9df4 mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff changeset
    44
hg qqueue foo --delete
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 %% switch back and delete foo
1e701ffd9df4 mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff changeset
    47
hg qpop -a
1e701ffd9df4 mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff changeset
    48
hg qqueue patches
1e701ffd9df4 mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff changeset
    49
hg qqueue foo --delete
1e701ffd9df4 mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff changeset
    50
hg qqueue
11270
457813cb3024 mq: fix naming issues for qqueue directories
Henrik Stuart <hg@hstuart.dk>
parents: 11229
diff changeset
    51
457813cb3024 mq: fix naming issues for qqueue directories
Henrik Stuart <hg@hstuart.dk>
parents: 11229
diff changeset
    52
echo %% tricky cases
457813cb3024 mq: fix naming issues for qqueue directories
Henrik Stuart <hg@hstuart.dk>
parents: 11229
diff changeset
    53
hg qqueue store --create
11272
e8a66a40474d mq: better qqueue test for troublesome names
Henrik Stuart <hg@hstuart.dk>
parents: 11271
diff changeset
    54
hg qnew journal
11270
457813cb3024 mq: fix naming issues for qqueue directories
Henrik Stuart <hg@hstuart.dk>
parents: 11229
diff changeset
    55
hg qqueue
457813cb3024 mq: fix naming issues for qqueue directories
Henrik Stuart <hg@hstuart.dk>
parents: 11229
diff changeset
    56
hg qpop -a
457813cb3024 mq: fix naming issues for qqueue directories
Henrik Stuart <hg@hstuart.dk>
parents: 11229
diff changeset
    57
hg qqueue patches
457813cb3024 mq: fix naming issues for qqueue directories
Henrik Stuart <hg@hstuart.dk>
parents: 11229
diff changeset
    58
hg qun
457813cb3024 mq: fix naming issues for qqueue directories
Henrik Stuart <hg@hstuart.dk>
parents: 11229
diff changeset
    59
457813cb3024 mq: fix naming issues for qqueue directories
Henrik Stuart <hg@hstuart.dk>
parents: 11229
diff changeset
    60
echo %% invalid names
457813cb3024 mq: fix naming issues for qqueue directories
Henrik Stuart <hg@hstuart.dk>
parents: 11229
diff changeset
    61
hg qqueue test/../../bar --create
457813cb3024 mq: fix naming issues for qqueue directories
Henrik Stuart <hg@hstuart.dk>
parents: 11229
diff changeset
    62
hg qqueue . --create
457813cb3024 mq: fix naming issues for qqueue directories
Henrik Stuart <hg@hstuart.dk>
parents: 11229
diff changeset
    63
11229
1e701ffd9df4 mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff changeset
    64
cd ..