equal
deleted
inserted
replaced
|
1 #!/bin/sh |
|
2 |
|
3 HGRCPATH=$HGTMP/.hgrc; export HGRCPATH |
|
4 echo "[extensions]" >> $HGTMP/.hgrc |
|
5 echo "mq=" >> $HGTMP/.hgrc |
|
6 |
|
7 echo % help |
|
8 hg help mq |
|
9 |
|
10 hg init a |
|
11 cd a |
|
12 echo a > a |
|
13 mkdir b |
|
14 echo z > b/z |
|
15 hg ci -Ama |
|
16 |
|
17 echo % qinit |
|
18 |
|
19 hg qinit |
|
20 |
|
21 cd .. |
|
22 hg init b |
|
23 |
|
24 echo % -R qinit |
|
25 |
|
26 hg -R b qinit |
|
27 |
|
28 hg init c |
|
29 |
|
30 echo % qinit -c |
|
31 |
|
32 hg --cwd c qinit -c |
|
33 hg -R c/.hg/patches st |
|
34 |
|
35 echo % qnew implies add |
|
36 |
|
37 hg -R c qnew test.patch |
|
38 hg -R c/.hg/patches st |
|
39 |
|
40 cd a |
|
41 |
|
42 echo % qnew -m |
|
43 |
|
44 hg qnew -m 'foo bar' test.patch |
|
45 cat .hg/patches/test.patch |
|
46 |
|
47 echo % qrefresh |
|
48 |
|
49 echo a >> a |
|
50 hg qrefresh |
|
51 sed -e "s/\(^diff -r \)\([a-f0-9]* \)/\1 x/" \ |
|
52 -e "s/\(+++ [a-zA-Z0-9_/.-]*\).*/\1/" \ |
|
53 -e "s/\(--- [a-zA-Z0-9_/.-]*\).*/\1/" .hg/patches/test.patch |
|
54 |
|
55 echo % qpop |
|
56 |
|
57 hg qpop |
|
58 |
|
59 echo % qpush |
|
60 |
|
61 hg qpush |
|
62 |
|
63 cd .. |
|
64 |
|
65 echo % pop/push outside repo |
|
66 |
|
67 hg -R a qpop |
|
68 hg -R a qpush |
|
69 |
|
70 cd a |
|
71 hg qnew test2.patch |
|
72 |
|
73 echo % qrefresh in subdir |
|
74 |
|
75 cd b |
|
76 echo a > a |
|
77 hg add a |
|
78 hg qrefresh |
|
79 |
|
80 echo % pop/push -a in subdir |
|
81 |
|
82 hg qpop -a |
|
83 hg --traceback qpush -a |
|
84 |
|
85 echo % qseries |
|
86 hg qseries |
|
87 |
|
88 echo % qapplied |
|
89 hg qapplied |
|
90 |
|
91 echo % qtop |
|
92 hg qtop |
|
93 |
|
94 echo % qprev |
|
95 hg qprev |
|
96 |
|
97 echo % qnext |
|
98 hg qnext |
|
99 |
|
100 echo % pop, qnext, qprev, qapplied |
|
101 hg qpop |
|
102 hg qnext |
|
103 hg qprev |
|
104 hg qapplied |
|
105 |
|
106 echo % qunapplied |
|
107 hg qunapplied |
|
108 |
|
109 echo % strip |
|
110 cd ../../b |
|
111 echo x>x |
|
112 hg ci -Ama |
|
113 hg strip tip 2>&1 | sed 's/\(saving bundle to \).*/\1/' |
|
114 hg unbundle .hg/strip-backup/* |