convert: Clean up authormap key=value splitting.
authorMarti Raudsepp <marti@juffo.org>
Thu, 28 Feb 2008 17:37:56 +0200
changeset 6186 aae4eb2f40b0
parent 6185 c48d778d7c23
child 6187 531f3e78c6f2
convert: Clean up authormap key=value splitting. Introduces a subtle parsing difference: dstauthor can now contain '=' characters.
hgext/convert/convcmd.py
--- a/hgext/convert/convcmd.py	Thu Feb 28 17:37:56 2008 +0200
+++ b/hgext/convert/convcmd.py	Thu Feb 28 17:37:56 2008 +0200
@@ -194,8 +194,9 @@
             if line.strip() == '':
                 continue
             try:
-                srcauthor = line.split('=')[0].strip()
-                dstauthor = line.split('=')[1].strip()
+                srcauthor, dstauthor = line.split('=', 1)
+                srcauthor = srcauthor.strip()
+                dstauthor = dstauthor.strip()
                 if srcauthor in self.authors and dstauthor != self.authors[srcauthor]:
                     self.ui.status(
                         'Overriding mapping for author %s, was %s, will be %s\n'