Mercurial > hgbook
annotate es/examples/mq.tutorial @ 746:d0160b0b1a9e
Merge with http://hg.serpentine.com/mercurial/book
author | Dongsheng Song <dongsheng.song@gmail.com> |
---|---|
date | Wed, 18 Mar 2009 20:32:37 +0800 |
parents | 04c08ad7e92e |
children |
rev | line source |
---|---|
432
04c08ad7e92e
Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff
changeset
|
1 #!/bin/bash |
04c08ad7e92e
Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff
changeset
|
2 |
04c08ad7e92e
Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff
changeset
|
3 echo '[extensions]' >> $HGRC |
04c08ad7e92e
Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff
changeset
|
4 echo 'hgext.mq =' >> $HGRC |
04c08ad7e92e
Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff
changeset
|
5 |
04c08ad7e92e
Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff
changeset
|
6 #$ name: qinit |
04c08ad7e92e
Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff
changeset
|
7 |
04c08ad7e92e
Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff
changeset
|
8 hg init mq-sandbox |
04c08ad7e92e
Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff
changeset
|
9 cd mq-sandbox |
04c08ad7e92e
Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff
changeset
|
10 echo 'line 1' > file1 |
04c08ad7e92e
Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff
changeset
|
11 echo 'another line 1' > file2 |
04c08ad7e92e
Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff
changeset
|
12 hg add file1 file2 |
04c08ad7e92e
Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff
changeset
|
13 hg commit -m'first change' |
04c08ad7e92e
Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff
changeset
|
14 |
04c08ad7e92e
Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff
changeset
|
15 hg qinit |
04c08ad7e92e
Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff
changeset
|
16 |
04c08ad7e92e
Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff
changeset
|
17 #$ name: qnew |
04c08ad7e92e
Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff
changeset
|
18 |
04c08ad7e92e
Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff
changeset
|
19 hg tip |
04c08ad7e92e
Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff
changeset
|
20 hg qnew first.patch |
04c08ad7e92e
Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff
changeset
|
21 hg tip |
04c08ad7e92e
Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff
changeset
|
22 ls .hg/patches |
04c08ad7e92e
Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff
changeset
|
23 |
04c08ad7e92e
Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff
changeset
|
24 #$ name: qrefresh |
04c08ad7e92e
Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff
changeset
|
25 #$ ignore: \s+200[78]-.* |
04c08ad7e92e
Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff
changeset
|
26 |
04c08ad7e92e
Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff
changeset
|
27 echo 'line 2' >> file1 |
04c08ad7e92e
Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff
changeset
|
28 hg diff |
04c08ad7e92e
Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff
changeset
|
29 hg qrefresh |
04c08ad7e92e
Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff
changeset
|
30 hg diff |
04c08ad7e92e
Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff
changeset
|
31 hg tip --style=compact --patch |
04c08ad7e92e
Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff
changeset
|
32 |
04c08ad7e92e
Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff
changeset
|
33 #$ name: qrefresh2 |
04c08ad7e92e
Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff
changeset
|
34 |
04c08ad7e92e
Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff
changeset
|
35 echo 'line 3' >> file1 |
04c08ad7e92e
Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff
changeset
|
36 hg status |
04c08ad7e92e
Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff
changeset
|
37 hg qrefresh |
04c08ad7e92e
Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff
changeset
|
38 hg tip --style=compact --patch |
04c08ad7e92e
Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff
changeset
|
39 |
04c08ad7e92e
Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff
changeset
|
40 #$ name: qnew2 |
04c08ad7e92e
Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff
changeset
|
41 |
04c08ad7e92e
Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff
changeset
|
42 hg qnew second.patch |
04c08ad7e92e
Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff
changeset
|
43 hg log --style=compact --limit=2 |
04c08ad7e92e
Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff
changeset
|
44 echo 'line 4' >> file1 |
04c08ad7e92e
Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff
changeset
|
45 hg qrefresh |
04c08ad7e92e
Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff
changeset
|
46 hg tip --style=compact --patch |
04c08ad7e92e
Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff
changeset
|
47 hg annotate file1 |
04c08ad7e92e
Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff
changeset
|
48 |
04c08ad7e92e
Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff
changeset
|
49 #$ name: qseries |
04c08ad7e92e
Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff
changeset
|
50 |
04c08ad7e92e
Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff
changeset
|
51 hg qseries |
04c08ad7e92e
Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff
changeset
|
52 hg qapplied |
04c08ad7e92e
Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff
changeset
|
53 |
04c08ad7e92e
Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff
changeset
|
54 #$ name: qpop |
04c08ad7e92e
Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff
changeset
|
55 |
04c08ad7e92e
Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff
changeset
|
56 hg qapplied |
04c08ad7e92e
Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff
changeset
|
57 hg qpop |
04c08ad7e92e
Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff
changeset
|
58 hg qseries |
04c08ad7e92e
Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff
changeset
|
59 hg qapplied |
04c08ad7e92e
Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff
changeset
|
60 cat file1 |
04c08ad7e92e
Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff
changeset
|
61 |
04c08ad7e92e
Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff
changeset
|
62 #$ name: qpush-a |
04c08ad7e92e
Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff
changeset
|
63 |
04c08ad7e92e
Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff
changeset
|
64 hg qpush -a |
04c08ad7e92e
Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff
changeset
|
65 cat file1 |
04c08ad7e92e
Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff
changeset
|
66 |
04c08ad7e92e
Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff
changeset
|
67 #$ name: add |
04c08ad7e92e
Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff
changeset
|
68 |
04c08ad7e92e
Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff
changeset
|
69 echo 'file 3, line 1' >> file3 |
04c08ad7e92e
Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff
changeset
|
70 hg qnew add-file3.patch |
04c08ad7e92e
Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff
changeset
|
71 hg qnew -f add-file3.patch |
04c08ad7e92e
Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff
changeset
|
72 |
04c08ad7e92e
Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff
changeset
|
73 #$ name: |
04c08ad7e92e
Translated svgs dummy .tex towards building
Igor TAmara <igor@tamarapatino.org>
parents:
diff
changeset
|
74 exit 0 |