hgbook
view en/examples/mq.tutorial @ 144:006bbad1f190
Add expected output files.
This makes it possible to spot changes in Mercurial's output and
behaviour over time.
This makes it possible to spot changes in Mercurial's output and
behaviour over time.
author | Bryan O'Sullivan <bos@serpentine.com> |
---|---|
date | Tue Mar 06 21:44:56 2007 -0800 (2007-03-06) |
parents | ceaca14e49f0 |
children |
line source
1 #!/bin/bash
3 echo '[extensions]' >> $HGRC
4 echo 'hgext.mq =' >> $HGRC
6 #$ name: qinit
8 hg init mq-sandbox
9 cd mq-sandbox
10 echo 'line 1' > file1
11 echo 'another line 1' > file2
12 hg add file1 file2
13 hg commit -m'first change'
15 hg qinit
17 #$ name: qnew
19 hg tip
20 hg qnew first.patch
21 hg tip
22 ls .hg/patches
24 #$ name: qrefresh
25 #$ ignore: \s+200[78]-.*
27 echo 'line 2' >> file1
28 hg diff
29 hg qrefresh
30 hg diff
31 hg tip --style=compact --patch
33 #$ name: qrefresh2
35 echo 'line 3' >> file1
36 hg status
37 hg qrefresh
38 hg tip --style=compact --patch
40 #$ name: qnew2
42 hg qnew second.patch
43 hg log --style=compact --limit=2
44 echo 'line 4' >> file1
45 hg qrefresh
46 hg tip --style=compact --patch
47 hg annotate file1
49 #$ name: qseries
51 hg qseries
52 hg qapplied
54 #$ name: qpop
56 hg qapplied
57 hg qpop
58 hg qseries
59 hg qapplied
60 cat file1
62 #$ name: qpush-a
64 hg qpush -a
65 cat file1
67 #$ name: add
69 echo 'file 3, line 1' >> file3
70 hg qnew add-file3.patch
71 hg qnew -f add-file3.patch
73 #$ name:
74 exit 0