view contrib/packagelib.sh @ 25691:5cda0ce05c42

wireproto: add config knob for http header length limit Well-behaved Mercurial clients will respect the httpheader capability by not sending http headers longer than the given limit in bytes. The limit is currently hard-coded at 1024 bytes, a safe value for any web server. Since parsing headers is a notable factor in web server performance, tuning header size can nontrivially improve performance for request-heavy operations (eg. obsolete marker negotiation). Exposing the maximum header length limit as a configuration setting is a simple way to enable such tuning.
author Mike Edgar <adgar@google.com>
date Mon, 29 Jun 2015 12:35:31 -0400
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
}