Moving from mq to hg-evolution
===============================
quick reference:
mq command equivalent
hg qseries hg log
hg qnew hg commit
hg qrefresh hg amend
hg qpop hg update
hg qpush hg graft or rebase
hg qrm hg kill
hg qfold hg collapse
hg qdiff hg diff
hg qfinish --
hg qimport --
hg qseries
-----------
All your work in progress are now real changeset all the time.
You can then use standard log to display them. You can use phase revset to
display unfinished business only and template to have the same kind of compact
output qseries have.
This will result in something like that
$ hg log -r 'not public()' --template='{rev}:{node|short} {description|firstline}\n'
[alias]
wip = log -r 'not public()' --template='{rev}:{node|short} {description|firstline}\n'
hg qnew
--------
With evolution you handle standard changeset without additional overlay.
Standard changeset are created using hg commit as usual.
$ hg commit
If you want to keep the "wip are not pushed" behavior, you are looking for
setting your changeset in the secret phase. This can be achieved with the following sequence:
$ hg phase --secret
$ hg commit
Note that you only need it for the first commit you want to be secret. Later
commit will inherit their parents phase.
If you always want your new commit to be in the secret phase, your should
consider updating your configuration:
[phases]
new-commit=secret
hg qref
--------
A new command from evolution will allow you to rewrite the changeset you are
current on. just invoc:
$ hg amend
This command takes the same option than commit plus useful switch '-e' (--edit)
Amend have also a -c switch which allow you to make and explicit amending
commit before rewriting a changeset.
$ hg record -m 'feature A'
# oups, I forget some stuff
$ hg record babar.py
$ hg amend -c .^ # .^ refer to "working directoy parent, here 'feature A'
note: refresh is an alias for amend
hg qpop
---------
If you need to go back to a previous state just:
$ hg update
hg qpush
--------
When you rewrite changeset, descendant of rewritten changeset are marked as
"out of sync". You new to rewrite them on top of the new version of their
ancestor.
The evolution extension add a command to rewrite the next changeset:
$ hg evolve
You can also decide to do it manually using
$ hg graft -O <old-version>
or
$ hg rebase -r <revset for old version> -d .
note: using graft allow you to pick the changeset you want next as the --move
option of qpush do.
hg qrm
-------
evolution introduce a new command to mark a changeset as "not wanted anymore".
$ hg kill <revset>
hg qfold
---------
$ hg collapse # XXX not implemented
$ hg rebase --collapse # XXX not tested
hg qdiff
---------
$ hg diff -r .^