convert: handle new cvsps with Tags: and multiple tags.
authorEric Hopper <hopper@omnifarious.org>
Sun, 24 Jun 2007 07:22:58 -0700
changeset 4698 30e826bd8ed1
parent 4697 5b2d986de0f8
child 4699 a6b62584d0b2
convert: handle new cvsps with Tags: and multiple tags.
hgext/convert/cvs.py
--- a/hgext/convert/cvs.py	Sun Jun 24 09:47:54 2007 -0500
+++ b/hgext/convert/cvs.py	Sun Jun 24 07:22:58 2007 -0700
@@ -50,10 +50,11 @@
                         self.parent[id] = self.lastbranch[ancestor]
                     elif l.startswith("Author"):
                         author = self.recode(l[8:-1])
-                    elif l.startswith("Tag: "):
-                        t = l[5:-1].rstrip()
-                        if t != "(none)":
-                            self.tags[t] = id
+                    elif l.startswith("Tag:") or l.startswith("Tags:"):
+                        t = l[l.index(':')+1:]
+                        t = [ut.strip() for ut in t.split(',')]
+                        if (len(t) > 1) or (t[0] and (t[0] != "(none)")):
+                            self.tags.update(dict.fromkeys(t, id))
                     elif l.startswith("Log:"):
                         state = 1
                         log = ""