git: fixed an issue determining the git version number.

Thu, 20 Sep 2018 19:36:15 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Thu, 20 Sep 2018 19:36:15 +0200
changeset 6508
51897256fc83
parent 6507
54054456ca58
child 6509
884182bfd25c

git: fixed an issue determining the git version number.

Plugins/VcsPlugins/vcsGit/git.py file | annotate | diff | comparison | revisions
diff -r 54054456ca58 -r 51897256fc83 Plugins/VcsPlugins/vcsGit/git.py
--- a/Plugins/VcsPlugins/vcsGit/git.py	Wed Sep 19 19:50:10 2018 +0200
+++ b/Plugins/VcsPlugins/vcsGit/git.py	Thu Sep 20 19:36:15 2018 +0200
@@ -190,9 +190,9 @@
             if finished and process.exitCode() == 0:
                 output = str(process.readAllStandardOutput(),
                              ioEncoding, 'replace')
-                self.versionStr = output.splitlines()[0].split()[-1]
+                versionLine = output.splitlines()[0]
                 v = list(re.match(r'.*?(\d+)\.(\d+)\.?(\d+)?\.?(\d+)?',
-                                  self.versionStr).groups())
+                                  versionLine).groups())
                 for i in range(4):
                     try:
                         v[i] = int(v[i])
@@ -201,6 +201,7 @@
                     except IndexError:
                         v.append(0)
                 self.version = tuple(v)
+                self.versionStr = '.'.join([str(v) for v in self.version])
                 return True, errMsg
             else:
                 if finished:

eric ide

mercurial