changeset 7968:43b70a964e0d

convert: handle comments starting with '#' in authormap files
author Marti Raudsepp <marti@juffo.org>
date Sat, 04 Apr 2009 18:04:38 +0200
parents c03f42159afa
children a969b1470987
files hgext/convert/convcmd.py tests/test-convert-authormap
diffstat 2 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/convert/convcmd.py	Sat Apr 04 17:55:52 2009 +0200
+++ b/hgext/convert/convcmd.py	Sat Apr 04 18:04:38 2009 +0200
@@ -198,7 +198,8 @@
         afile = open(authorfile, 'r')
         for line in afile:
 
-            if line.strip() == '':
+            line = line.strip()
+            if not line or line.startswith('#'):
                 continue
 
             try:
--- a/tests/test-convert-authormap	Sat Apr 04 17:55:52 2009 +0200
+++ b/tests/test-convert-authormap	Sat Apr 04 18:04:38 2009 +0200
@@ -16,6 +16,7 @@
 cat > authormap.txt <<EOF
 user name = Long User Name
 
+# comment
 this line is ignored
 EOF