Changeset 17432


Ignore:
Timestamp:
2009-08-28T14:51:01+02:00 (7 years ago)
Author:
nbd
Message:

add hg support to getver.sh (patch from #5763)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/scripts/getver.sh

    r12380 r17432  
    2424} 
    2525 
    26 try_version || try_svn || try_git || REV="unknown" 
     26try_hg() { 
     27        [ -d .hg ] || return 1 
     28        REV="$(hg log -r-1 --template '{desc}' | awk '{print $2}' | sed 's/\].*//')" 
     29        REV="${REV:+$REV}" 
     30        [ -n "$REV" ] 
     31} 
     32 
     33try_version || try_svn || try_git || try_hg || REV="unknown" 
    2734echo "$REV" 
Note: See TracChangeset for help on using the changeset viewer.