hg2git.py: Allow for spaces in authorfile
authorRocco Rutte <pdmef@gmx.net>
Mon, 12 Mar 2007 10:26:46 +0000 (10:26 +0000)
committerRocco Rutte <pdmef@gmx.net>
Mon, 12 Mar 2007 10:26:46 +0000 (10:26 +0000)
By allowing spaces in keys we allow for (re-)mapping complete lines
like "Joe User <joe@host>" to be mapped to something else.

Signed-off-by: Rocco Rutte <pdmef@gmx.net>
hg2git.py

index e5991c1..bcef2e1 100644 (file)
--- a/hg2git.py
+++ b/hg2git.py
@@ -270,7 +270,7 @@ def load_authors(filename):
     return cache
   f=open(filename,'r')
   l=0
-  lre=re.compile('^([^= ]+)[ ]*=[ ]*(.+)$')
+  lre=re.compile('^([^=]+)[ ]*=[ ]*(.+)$')
   for line in f.readlines():
     l+=1
     m=lre.match(line)