[rtems-tools commit] rtemstoolkit/version: Remove the tailing - with a clean git repo

Chris Johns chrisj at rtems.org
Wed Nov 28 23:20:23 UTC 2018


Module:    rtems-tools
Branch:    master
Commit:    3bc12bbd4cfed1487a2247cf3f8ca5331cff085a
Changeset: http://git.rtems.org/rtems-tools/commit/?id=3bc12bbd4cfed1487a2247cf3f8ca5331cff085a

Author:    Chris Johns <chrisj at rtems.org>
Date:      Thu Nov 29 09:18:48 2018 +1100

rtemstoolkit/version: Remove the tailing - with a clean git repo

---

 rtemstoolkit/version.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/rtemstoolkit/version.py b/rtemstoolkit/version.py
index f17a676..56cf97f 100644
--- a/rtemstoolkit/version.py
+++ b/rtemstoolkit/version.py
@@ -183,11 +183,13 @@ def _load_git_version():
         head = repo.head()
         if repo.dirty():
             modified = 'modified'
+            revision_sep = '-'
             sep = ' '
         else:
             modified = ''
+            revision_sep = ''
             sep = ''
-        _revision = '%s-%s' % (head[0:12], modified)
+        _revision = '%s%s%s' % (head[0:12], revision_sep, modified)
         _version_str = '%s (%s%s%s)' % (_version, head[0:12], sep, modified)
         _git = True
     return _git



More information about the vc mailing list