Skip to content

Commit

Permalink
setlocalversion: fix version for untaged nontip mercurial revs
Browse files Browse the repository at this point in the history
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 <[email protected]>
Cc: Michal Marek <[email protected]>
Cc: "Michał Górny" <[email protected]>
Signed-off-by: Michal Marek <[email protected]>
  • Loading branch information
Milton Miller authored and michal42 committed Aug 12, 2010
1 parent 235caa2 commit 55c640c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/setlocalversion
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ scm_version()

# Check for mercurial and a mercurial repo.
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?
if [ -z "$tag" -o "$tag" = tip ]; then
Expand Down

0 comments on commit 55c640c

Please sign in to comment.