tests/test-mq-qqueue
author Matt Mackall <mpm@selenic.com>
Tue, 01 Jun 2010 10:54:57 -0500
changeset 11262 55226ceb0b2a
parent 11229 1e701ffd9df4
child 11270 457813cb3024
permissions -rwxr-xr-x
Merge with i18n
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
1e701ffd9df4 mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff changeset
    31
echo %% unapplied patches
1e701ffd9df4 mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff changeset
    32
hg qun
1e701ffd9df4 mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff changeset
    33
echo c > a
1e701ffd9df4 mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff changeset
    34
hg qnew -fgDU otherstuff
1e701ffd9df4 mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff changeset
    35
1e701ffd9df4 mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff changeset
    36
echo %% fail switching back
1e701ffd9df4 mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff changeset
    37
hg qqueue patches
1e701ffd9df4 mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff changeset
    38
1e701ffd9df4 mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff changeset
    39
echo %% fail deleting current
1e701ffd9df4 mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff changeset
    40
hg qqueue foo --delete
1e701ffd9df4 mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff changeset
    41
1e701ffd9df4 mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff changeset
    42
echo %% switch back and delete foo
1e701ffd9df4 mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff changeset
    43
hg qpop -a
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
hg qqueue foo --delete
1e701ffd9df4 mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff changeset
    46
hg qqueue
1e701ffd9df4 mq: support multiple patch queues using qqueue
Henrik Stuart <hg@hstuart.dk>
parents:
diff changeset
    47
cd ..