Skip to content

Instantly share code, notes, and snippets.

@Gab-km
Forked from troter/hgrc
Created September 4, 2011 11:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Gab-km/1192688 to your computer and use it in GitHub Desktop.
Save Gab-km/1192688 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