mailr23366 - /trunk/version.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on May 23, 2014 - 09:18:
Author: bugman
Date: Fri May 23 09:18:34 2014
New Revision: 23366

URL: http://svn.gna.org/viewcvs/relax?rev=23366&view=rev
Log:
Another attempt at fixing bug #22071, the relax unit test and system test not 
functioning.

This is reported at https://gna.org/bugs/?22071.

This time the complicated shell command "cd %s; git svn find-rev $(git 
rev-parse HEAD)" has been
replaced with "cd %s; git svn info".

Modified:
    trunk/version.py

Modified: trunk/version.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/version.py?rev=23366&r1=23365&r2=23366&view=diff
==============================================================================
--- trunk/version.py    (original)
+++ trunk/version.py    Fri May 23 09:18:34 2014
@@ -71,7 +71,7 @@
                 return str(row[1])
 
     # Try git-svn, reading the output if there are no errors.
-    pipe = Popen('cd %s; git svn find-rev $(git rev-parse HEAD)' % 
status.install_path, shell=True, stdin=PIPE, stdout=PIPE, stderr=PIPE, 
close_fds=False)
+    pipe = Popen('cd %s; git svn info' % status.install_path, shell=True, 
stdin=PIPE, stdout=PIPE, stderr=PIPE, close_fds=False)
     if not pipe.stderr.readlines():
         # Loop over the output lines.
         for line in pipe.stdout.readlines():
@@ -79,9 +79,12 @@
             if hasattr(line, 'decode'):
                 line = line.decode()
 
+            # Split up the line.
+            row = line.split()
+
             # The revision.
-            if search('^[0-9]', line):
-                return str(line[:-1])
+            if len(row) and row[0] == 'Revision:':
+                return str(row[1])
 
 
 def url():




Related Messages


Powered by MHonArc, Updated Fri May 23 09:20:02 2014