Commit 55c640c3 authored by Milton Miller's avatar Milton Miller Committed by Michal Marek

setlocalversion: fix version for untaged nontip mercurial revs

The manpage for cut says it will return all lines without the delimiter
unless -s is specified.

When I backed up my mecurial tree to generate modules, I found that the
scm part of localversion was turning up blank.
Signed-off-by: default avatarMilton Miller <miltonm@bga.com>
Cc: Michal Marek <mmarek@suse.cz>
Cc: "Michał Górny" <gentoo@mgorny.alt.pl>
Signed-off-by: default avatarMichal Marek <mmarek@suse.cz>
parent 235caa23
...@@ -86,7 +86,7 @@ scm_version() ...@@ -86,7 +86,7 @@ scm_version()
# Check for mercurial and a mercurial repo. # Check for mercurial and a mercurial repo.
if hgid=`hg id 2>/dev/null`; then if hgid=`hg id 2>/dev/null`; then
tag=`printf '%s' "$hgid" | cut -d' ' -f2` tag=`printf '%s' "$hgid" | cut -s -d' ' -f2`
# Do we have an untagged version? # Do we have an untagged version?
if [ -z "$tag" -o "$tag" = tip ]; then if [ -z "$tag" -o "$tag" = tip ]; then
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment