From: Rocco Rutte Date: Mon, 12 Mar 2007 10:45:32 +0000 (+0000) Subject: hg2git.py: Remove leading/trailing spaces from authormap X-Git-Url: http://crossforests.com/gitweb?a=commitdiff_plain;h=cedbd0fb86e221755161fa80c8b04fdabb340308;p=python%2Ffast-export.git hg2git.py: Remove leading/trailing spaces from authormap The current regex may leave us with keys/values having trailing/leading spaces in all flavours which will break lookup. Solution: strip() key and value. Signed-off-by: Rocco Rutte --- diff --git a/hg2git.py b/hg2git.py index bcef2e1..9ac395b 100644 --- a/hg2git.py +++ b/hg2git.py @@ -278,7 +278,7 @@ def load_authors(filename): sys.stderr.write('Invalid file format in [%s], line %d\n' % (filename,l)) continue # put key:value in cache, key without ^: - cache[m.group(1)]=m.group(2) + cache[m.group(1).strip()]=m.group(2).strip() f.close() sys.stderr.write('Loaded %d authors\n' % l) return cache