Don't show svnversion non-version response
svn: r21007
This commit is contained in:
parent
d5870ff1f4
commit
9b1ab12514
@ -37,6 +37,17 @@ def get_svn_revision(path=""):
|
||||
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||
(stdout, stderr) = p.communicate()
|
||||
except:
|
||||
pass
|
||||
return "-r" + cuni(stdout) if stdout else ""
|
||||
return "" # subprocess failed
|
||||
# subprocess worked
|
||||
if stdout: # has output
|
||||
stdout = cuni(stdout) # get a proper string
|
||||
if " " in stdout: # one of svnversion's non-version responses:
|
||||
# 'Unversioned directory'
|
||||
# 'Unversioned file'
|
||||
# 'Uncommitted local addition, copy or move'
|
||||
return ""
|
||||
else:
|
||||
return "-r" + stdout
|
||||
else: # no output from svnversion
|
||||
return ""
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user