Last active
June 21, 2019 23:20
-
-
Save rpl/54aee2c5e64e95072c516c8f62134477 to your computer and use it in GitHub Desktop.
some useful mercurial aliases
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[revsetalias] | |
# pending commits (used in `hg lg` and `hg lgs aliases`) | |
pending = ancestors(.)&draft() | |
# recent bookmarks (used in `hg rbm` alias) | |
recent_bookmarks($1) = limit(reverse(sort(bookmark())), $1) | |
[alias] | |
# log only pendings commits | |
lg = log -r 'pending' | |
# log only pendings commits | |
lgs = log -r 'pending' --stat | |
# show pending commits including their content | |
lgp = log -pr 'pending' | |
# export all patches in a target dir (e.g. `hg ep ~/PATCHES/somedir/`) | |
ep = export -g -r 'pending' -o "$1/%n-%m.patch" | |
# just a shortcut for `hg bookmark` commands | |
bm = bookmark | |
# history edit shortcut | |
he = histedit -r 'pending' | |
# print stats on all the pending commits in the current bookmark | |
pending-stats = churn --diffstat -r 'pending' | |
# print the most recent N bookmarks (e.g. `hg rbm 10`) | |
rbm = log -r recent_bookmarks($1) -T bookmarks | |
# just a shortcut to get the last 5 active bookmarks | |
rbm5 = rbm 5 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment