Mercurial > public > mercurial-scm > hg
diff hgext/convert/cvsps.py @ 8171:4e5bd9b97bb3
cvsps: fix crash when log message refers to non-existent branch (issue1615).
author | Greg Ward <greg-hg@gerg.ca> |
---|---|
date | Sun, 19 Apr 2009 13:12:20 -0400 |
parents | 19229b0b292d |
children | a1a5a57efe90 |
line wrap: on
line diff
--- a/hgext/convert/cvsps.py Sun Apr 19 12:20:39 2009 -0400 +++ b/hgext/convert/cvsps.py Sun Apr 19 13:12:20 2009 -0400 @@ -637,7 +637,12 @@ m = m.group(1) if m == 'HEAD': m = None - candidate = changesets[branches[m]] + try: + candidate = changesets[branches[m]] + except KeyError: + ui.warn(_("warning: CVS commit message references " + "non-existent branch %r:\n%s\n") + % (m, c.comment)) if m in branches and c.branch != m and not candidate.synthetic: c.parents.append(candidate)