From 2828211c6a7ecafc5475d3430580f224f0a11e92 Mon Sep 17 00:00:00 2001 From: Paul Franklin Date: Mon, 4 Mar 2013 05:12:53 +0000 Subject: [PATCH] 6494: svn_revision module ignores translated SVN stdout value for "exported" svn: r21547 --- gramps/gen/svn_revision.py | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/gramps/gen/svn_revision.py b/gramps/gen/svn_revision.py index 3fba46a54..9415b6f93 100644 --- a/gramps/gen/svn_revision.py +++ b/gramps/gen/svn_revision.py @@ -39,18 +39,12 @@ def get_svn_revision(path=""): except: return "" # subprocess failed # subprocess worked - if stdout: # has output + if stdout and len(stdout) > 0: # has output stdout = cuni(stdout) # get a proper string - if (" " in stdout) or (stdout == "exported"): - # one of svnversion's 1.7 non-version responses: - # 'Unversioned directory' - # 'Unversioned file' - # 'Uncommitted local addition, copy or move' - # svnversion's 1.6 non-version response: - # 'exported' - return "" - else: + if stdout[0].isdigit(): return "-r" + stdout + else: + return "" else: # no output from svnversion return ""