KeyError exceptions importing from CVS

Frank A. Kingswood frank at kingswood-consulting.co.uk
Sat Feb 9 03:18:52 CST 2008


Matt Mackall wrote:
> Ok, looks like we should trust Ancestor branch if nothing tells us
> otherwise. Try this:
> 
> diff -r 7d53ca113e35 hgext/convert/cvs.py
> --- a/hgext/convert/cvs.py	Wed Feb 06 20:44:25 2008 -0600
> +++ b/hgext/convert/cvs.py	Fri Feb 08 17:01:18 2008 -0600
> @@ -71,7 +71,7 @@
>                      elif l.startswith("Ancestor branch"):
>                          ancestor = l[17:-1]
>                          # figure out the parent later
> -                        self.parent[id] = None
> +                        self.parent[id] = lastbranch[ancestor]
                                              ^^^^^^
                                              self.lastbranch
>                      elif l.startswith("Author"):
>                          author = self.recode(l[8:-1])
>                      elif l.startswith("Tag:") or l.startswith("Tags:"):

With that one change it runs OK on my simple test case. I'll try it on 
something bigger and report later.

Frank


More information about the Mercurial-devel mailing list