e3e8f6fdc3d7

hg: add pushunder
[view raw] [browse files]
author Steve Losh <steve@stevelosh.com>
date Thu, 26 Aug 2010 10:36:35 -0400
parents f14da576aebe
children be6bede7ce49
branches/tags (none)
files .hgrc

Changes

--- a/.hgrc	Thu Aug 26 10:29:42 2010 -0400
+++ b/.hgrc	Thu Aug 26 10:36:35 2010 -0400
@@ -159,6 +159,11 @@
            $HG qfinish temp-for-under && \
            $HG qpush $HG_CUR_PATCH
 
+pushunder = !HG_CUR_PATCH=`$HG qtop --color=never` && \
+             $HG qpop -a && \
+             $HG push $@ && \
+             $HG qpush --goto $HG_CUR_PATCH
+
 # Edit the current repo's hgrc file.
 erc = !$EDITOR `$HG root`/.hg/hgrc