hgbook / fr / examples / mq.tutorial


echo '[extensions]' >> $HGRC
echo ' =' >> $HGRC

#$ name: qinit

hg init mq-sandbox
cd mq-sandbox
echo 'line 1' > file1
echo 'another line 1' > file2
hg add file1 file2
hg commit -m'first change'

hg qinit

#$ name: qnew

hg tip
hg qnew first.patch
hg tip
ls .hg/patches

#$ name: qrefresh
#$ ignore: \s+200[78]-.*

echo 'line 2' >> file1
hg diff
hg qrefresh
hg diff
hg tip --style=compact --patch

#$ name: qrefresh2

echo 'line 3' >> file1
hg status
hg qrefresh
hg tip --style=compact --patch

#$ name: qnew2

hg qnew second.patch
hg log --style=compact --limit=2
echo 'line 4' >> file1
hg qrefresh
hg tip --style=compact --patch
hg annotate file1

#$ name: qseries

hg qseries
hg qapplied

#$ name: qpop

hg qapplied
hg qpop
hg qseries
hg qapplied
cat file1

#$ name: qpush-a

hg qpush -a
cat file1

#$ name: add

echo 'file 3, line 1' >> file3
hg qnew add-file3.patch
hg qnew -f add-file3.patch

#$ name:
exit 0
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.