Skip to content

Instantly share code, notes, and snippets.

@troter
Created September 2, 2011 05:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save troter/1187980 to your computer and use it in GitHub Desktop.
Save troter/1187980 to your computer and use it in GitHub Desktop.
hg fix "fixed message" # (hg 1.8.x only)
# hgrc
[extensions]
mq =
hgshelve = $HOME/.mercurial/extensions/hgshelve/hgshelve.py
[alias]
# fix latest commit message (hg 1.8.x only)
fix = ! \
$HG shelve --all -n 'tmp.hg-fix' && \
if $HG qtop > /dev/null; then \
$HG qrefresh -m "$1"; \
else \
$HG qimport -r .; \
$HG qrefresh -m "$1"; \
$HG qfinish -a; \
fi; \
$HG unshelve -n 'tmp.hg-fix'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment