comparison tests/test-mq-guards @ 2810:2e4ace008c94

mq: new commands qselect, qguard implement quilt-style guards for mq. guards allow to control whether patch can be pushed. if guard X is active and patch is guarded by +X (called "posative guard"), patch can be pushed. if patch is guarded by -X (called "nagative guard"), patch cannot be pushed and is skipped. use qguard to set/list guards on patches. use qselect to set/list active guards. also "qseries -v" prints guarded patches with "G" now.
author Vadim Gelfer <vadim.gelfer@gmail.com>
date Tue, 08 Aug 2006 21:42:50 -0700
parents
children 05316bb57d01
comparison
equal deleted inserted replaced
2809:1bb8dd08c594 2810:2e4ace008c94
1 #!/bin/sh
2
3 HGRCPATH=$HGTMP/.hgrc; export HGRCPATH
4 echo "[extensions]" >> $HGTMP/.hgrc
5 echo "mq=" >> $HGTMP/.hgrc
6
7 hg init
8 hg qinit
9
10 echo x > x
11 hg ci -Ama
12
13 hg qnew a.patch
14 echo a > a
15 hg add a
16 hg qrefresh
17
18 hg qnew b.patch
19 echo b > b
20 hg add b
21 hg qrefresh
22
23 hg qnew c.patch
24 echo c > c
25 hg add c
26 hg qrefresh
27
28 hg qpop -a
29
30 echo % should fail
31 hg qguard +fail
32
33 hg qpush
34 echo % should guard a.patch
35 hg qguard +a
36 echo % should print +a
37 hg qguard
38 hg qpop
39
40 hg qguard a.patch
41 echo % should push b.patch
42 hg qpush
43
44 hg qpop
45 hg qselect a
46 echo % should push a.patch
47 hg qpush
48
49 hg qguard c.patch -a
50 echo % should print -a
51 hg qguard c.patch
52
53 echo % should skip c.patch
54 hg qpush -a
55
56 hg qguard -n c.patch
57 echo % should push c.patch
58 hg qpush -a
59
60 hg qpop -a
61 hg qselect -n
62 hg qpush -a