simple notes of mercurial
For last two rev:
hg export rev1 rev2
or
hg diff -r tip~4:tip
for last 4 commits
Note: end commit rev no is not inclusive
or
hg export -r .^::.
.^
stands for the parent of the current commit or you can use rev no here
.
stands for the current commit
::
is an operator that says give me all commits between the two ends, both inclusive
check out hg help revsets
for more
hg export {multi}
will spit out multiple discrete patches
For example: To use purge without adding it ~/.hgrc
hg --config extensions.purge= purge