changeset 4698:30e826bd8ed1

convert: handle new cvsps with Tags: and multiple tags.
author Eric Hopper <hopper@omnifarious.org>
date Sun, 24 Jun 2007 07:22:58 -0700
parents 5b2d986de0f8
children a6b62584d0b2
files hgext/convert/cvs.py
diffstat 1 files changed, 5 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/convert/cvs.py
+++ b/hgext/convert/cvs.py
@@ -50,10 +50,11 @@ class convert_cvs(converter_source):
                         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 = ""