Skip to content

Commit 6c62b0c

Browse files
committed
Adding useful hg functions.
--HG-- extra : rebase_source : 7f80844e02d6c430bf3b7a38a010d961fe95c179
1 parent 68dea66 commit 6c62b0c

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

bin/hg-functions

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# You always want to do rebase pulls.
2+
alias pull='hg pull --rebase'
3+
4+
# You always want to pull before pushing, to avoid spurious collisions.
5+
alias push='pull && hg push'
6+
7+
# Commits, and prepends the current directory name to the commit message.
8+
# Just pass it the commit message as an argument.
9+
function save {
10+
hg commit -m "[${PWD##*/}] ${1}"
11+
}
12+
13+
# Regens, commits, and pulls/pushes, all in one package.
14+
# Pass it the commit message as an argument.
15+
function rcommit {
16+
regenerate && save "${1}" . && push
17+
}

0 commit comments

Comments
 (0)