hgbook

view en/examples/mq.tutorial @ 27:535e87792eb1

More MQ content and examples.
Note -f option to some commands.
Note -a option to qpush and qpop.
author Bryan O'Sullivan <bos@serpentine.com>
date Wed Jul 12 00:14:52 2006 -0700 (2006-07-12)
parents a25335b56825
children 5cee64874312
line source
1 echo '[extensions]' >> $HGRC
2 echo 'hgext.mq =' >> $HGRC
4 #$ name: qinit
6 hg init mq-sandbox
7 cd mq-sandbox
8 echo 'line 1' > file1
9 echo 'another line 1' > file2
10 hg add file1 file2
11 hg commit -m'first change'
13 hg qinit
15 #$ name: qnew
17 hg tip
18 hg qnew first.patch
19 hg tip
20 ls .hg/patches
22 #$ name: qrefresh
24 echo 'line 2' >> file1
25 hg diff
26 hg qrefresh
27 hg diff
28 hg tip --style=compact --patch
30 #$ name: qrefresh2
32 echo 'line 3' >> file1
33 hg status
34 hg qrefresh
35 hg tip --style=compact --patch
37 #$ name: qnew2
39 hg qnew second.patch
40 hg log --style=compact --limit=2
41 echo 'line 4' >> file1
42 hg qrefresh
43 hg tip --style=compact --patch
44 hg annotate file1
46 #$ name: qseries
48 hg qseries
49 hg qapplied
51 #$ name: qpop
53 hg qapplied
54 hg qpop
55 hg qseries
56 hg qapplied
57 cat file1
59 #$ name: qpush-a
61 hg qpush -a
62 cat file1
64 #$ name: add
66 echo 'file 3, line 1' >> file3
67 hg qnew add-file3.patch
68 hg qnew -f add-file3.patch