[GRASS-SVN] r74156 - grass-addons/tools/svn2git

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Mar 5 06:45:13 PST 2019


Author: martinl
Date: 2019-03-05 06:45:13 -0800 (Tue, 05 Mar 2019)
New Revision: 74156

Modified:
   grass-addons/tools/svn2git/rewrite.py
Log:
svn2git: final rewrite messages tuning

Modified: grass-addons/tools/svn2git/rewrite.py
===================================================================
--- grass-addons/tools/svn2git/rewrite.py	2019-03-05 08:15:54 UTC (rev 74155)
+++ grass-addons/tools/svn2git/rewrite.py	2019-03-05 14:45:13 UTC (rev 74156)
@@ -115,13 +115,12 @@
 
 # Fix 'r1234'
 oldpos = 0
-old_msg = msg
 while True:
     newpos = msg.find('r', oldpos)
     if newpos >= 0:
         if newpos == len(msg) - 1:
             break
-        if (newpos > 0 and msg[newpos-1] != ' ') or \
+        if (newpos > 0 and msg[newpos-1] not in (' ', '(')) or \
            not(msg[newpos+1] >= '0' and msg[newpos+1] <= '9'):
             oldpos = newpos + 1
             continue
@@ -133,7 +132,7 @@
             num += msg[newpos+1]
             newpos += 1
 
-        if newpos+1 <= len(msg)-1 and msg[newpos+1] not in (' ', '\n', ')'):
+        if newpos+1 <= len(msg)-1 and msg[newpos+1] not in (' ', '\n', ')', ','):
              oldpos = newpos + 1
              continue
         



More information about the grass-commit mailing list