diff options
| author | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
|---|---|---|
| committer | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
| commit | c71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch) | |
| tree | ecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /scripts/setlocalversion | |
| parent | ea53c912f8a86a8567697115b6a0d8152beee5c8 (diff) | |
| parent | 6a00f206debf8a5c8899055726ad127dbeeed098 (diff) | |
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts:
litmus/sched_cedf.c
Diffstat (limited to 'scripts/setlocalversion')
| -rwxr-xr-x | scripts/setlocalversion | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/scripts/setlocalversion b/scripts/setlocalversion index 057b6b3c5dfb..4d403844e137 100755 --- a/scripts/setlocalversion +++ b/scripts/setlocalversion | |||
| @@ -86,12 +86,16 @@ scm_version() | |||
| 86 | 86 | ||
| 87 | # Check for mercurial and a mercurial repo. | 87 | # Check for mercurial and a mercurial repo. |
| 88 | if test -d .hg && hgid=`hg id 2>/dev/null`; then | 88 | if test -d .hg && hgid=`hg id 2>/dev/null`; then |
| 89 | tag=`printf '%s' "$hgid" | cut -s -d' ' -f2` | 89 | # Do we have an tagged version? If so, latesttagdistance == 1 |
| 90 | 90 | if [ "`hg log -r . --template '{latesttagdistance}'`" == "1" ]; then | |
| 91 | # Do we have an untagged version? | 91 | id=`hg log -r . --template '{latesttag}'` |
| 92 | if [ -z "$tag" -o "$tag" = tip ]; then | ||
| 93 | id=`printf '%s' "$hgid" | sed 's/[+ ].*//'` | ||
| 94 | printf '%s%s' -hg "$id" | 92 | printf '%s%s' -hg "$id" |
| 93 | else | ||
| 94 | tag=`printf '%s' "$hgid" | cut -d' ' -f2` | ||
| 95 | if [ -z "$tag" -o "$tag" = tip ]; then | ||
| 96 | id=`printf '%s' "$hgid" | sed 's/[+ ].*//'` | ||
| 97 | printf '%s%s' -hg "$id" | ||
| 98 | fi | ||
| 95 | fi | 99 | fi |
| 96 | 100 | ||
| 97 | # Are there uncommitted changes? | 101 | # Are there uncommitted changes? |
| @@ -160,8 +164,10 @@ if test "$CONFIG_LOCALVERSION_AUTO" = "y"; then | |||
| 160 | # full scm version string | 164 | # full scm version string |
| 161 | res="$res$(scm_version)" | 165 | res="$res$(scm_version)" |
| 162 | else | 166 | else |
| 163 | # apped a plus sign if the repository is not in a clean tagged | 167 | # append a plus sign if the repository is not in a clean |
| 164 | # state and LOCALVERSION= is not specified | 168 | # annotated or signed tagged state (as git describe only |
| 169 | # looks at signed or annotated tags - git tag -a/-s) and | ||
| 170 | # LOCALVERSION= is not specified | ||
| 165 | if test "${LOCALVERSION+set}" != "set"; then | 171 | if test "${LOCALVERSION+set}" != "set"; then |
| 166 | scm=$(scm_version --short) | 172 | scm=$(scm_version --short) |
| 167 | res="$res${scm:++}" | 173 | res="$res${scm:++}" |
