hgBranch() { if [ -d .hg ]; then printf "$1" "$(hg branch)" fi } export PS1='${USER}@${HOSTNAME}:\w$(hgBranch " [\033[1;31m(%s)\033[0m]")$ '
Tag: Mercurial
How to move several commits between branches in Mercurial (from stackoverflow)
Enable mq extension
[extensions] mq=
Do next things
hg qimport -r 1:3 # convert revisions to patches hg qpop -a # remove all them from history hg branch new # start a new branch hg qpush -a # push them all back into history hg qfin -a # finalize the patches