generate_blobs.py: Be careful if deleting revision 1.1.
commitcd65c3b0fe3525fd9a6201c4246cab7d76813ee6
authormhagger <mhagger@be7e6eca-30d4-0310-a8e5-ac0d63af7087>
Sun, 14 Oct 2012 06:24:12 +0000 (14 06:24 +0000)
committermhagger <mhagger@be7e6eca-30d4-0310-a8e5-ac0d63af7087>
Sun, 14 Oct 2012 06:24:12 +0000 (14 06:24 +0000)
tree6347b3189e936d8cfd1b2e0cd976dceca2ee43c9
parent1b00fb07d2017c1a0a1131094228ce51a570ddee
generate_blobs.py: Be careful if deleting revision 1.1.

It is possible that *no* revisions will be needed from an RCS file.
For example, if there was never a commit on the main branch (so
revision 1.1 is dead), and all branches revisions are excluded from
the conversion, then no revisions will be needed from the file.

This situation led to a problem in WriteBlobSink.tree_completed(),
namely that when deleting revision 1.1, it tried to adjust the
is_needed() status of its "base" revision.  Since revision 1.1 doesn't
have a base revision, the lookup failed with a KeyError.

So, if the base revision of the revision being deleted is None, then
skip further processing.

Problem reported by: Sam Hanes <sam@maltera.com> (in a wonderfully
thorough bug report).

git-svn-id: http://cvs2svn.tigris.org/svn/cvs2svn/trunk@5405 be7e6eca-30d4-0310-a8e5-ac0d63af7087
CHANGES
cvs2svn_lib/generate_blobs.py