Skip to content

Commit 55c640c

Browse files
Milton Millermichal42
authored andcommitted
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: Milton Miller <miltonm@bga.com> Cc: Michal Marek <mmarek@suse.cz> Cc: "Michał Górny" <gentoo@mgorny.alt.pl> Signed-off-by: Michal Marek <mmarek@suse.cz>
1 parent 235caa2 commit 55c640c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎scripts/setlocalversion‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ scm_version()
8686

8787
# Check for mercurial and a mercurial repo.
8888
if hgid=`hg id 2>/dev/null`; then
89-
tag=`printf '%s' "$hgid" | cut -d' ' -f2`
89+
tag=`printf '%s' "$hgid" | cut -s -d' ' -f2`
9090

9191
# Do we have an untagged version?
9292
if [ -z "$tag" -o "$tag" = tip ]; then

0 commit comments

Comments
 (0)