Mercurial > hg
view contrib/packagelib.sh @ 25795:69145daacdfa
cmdutil: allow callers of cmdutil.dorecord to omit suggestion
Interactive committing under non-interactive mode shows command
suggestion, but sometimes it is meaningless.
command suggestion usability
------------ ---------- -----------
record commit
commit -i commit meaningless
qrecord qnew
qnew -i qnew meaningless
qrefersh -i qrefresh meaningless
shelve -i commit incorrect
------------ ---------- -----------
This patch allows callers of 'cmdutil.dorecord()' to omit meaningless
suggestion by passing None or so for 'cmdsuggest' argument of it.
This is a preparation for subsequent patches, which fix each
suggestion issues above.
author | FUJIWARA Katsunori <foozy@lares.dti.ne.jp> |
---|---|
date | Wed, 15 Jul 2015 03:43:16 +0900 |
parents | 56c64c91b429 |
children | 6474b64045fb |
line wrap: on
line source
gethgversion() { make clean make local || make local PURE=--pure HG="$PWD/hg" $HG version > /dev/null || { echo 'abort: hg version failed!'; exit 1 ; } hgversion=`$HG version | sed -ne 's/.*(version \(.*\))$/\1/p'` if echo $hgversion | grep -- '-' > /dev/null 2>&1; then # nightly build case, version is like 1.3.1+250-20b91f91f9ca version=`echo $hgversion | cut -d- -f1` release=`echo $hgversion | cut -d- -f2 | sed -e 's/+.*//'` else # official tag, version is like 1.3.1 version=`echo $hgversion | sed -e 's/+.*//'` release='0' fi }