Page MenuHomeSoftware Heritage

rlog: Skip rlog entry with missing header in RlogConv.parse_rlog
ClosedPublic

Authored by anlambert on Oct 14 2022, 1:51 PM.

Details

Reviewers
ardumont
Group Reviewers
Reviewers
Maniphest Tasks
Restricted Maniphest Task
Commits
rDLDCVS734207ba5847: rlog: Skip rlog entry with missing header in RlogConv.parse_rlog
Summary

CVS rlog for a given module sent by server is a concatenation of
rlog entries. Each entry has a header containing the path to a
RCS file plus other info.

M =============================================================================\n
M \n
M RCS file: /cvsroot/htdocs/donations/2009.xml,v\n
M head: 1.38\n
M branch:\n
M locks: strict\n
M access list:\n
M symbolic names:\n
M keyword substitution: kv\n
M total revisions: 38;\tselected revisions: 38\n
M description:\n
M ----------------------------\n
M revision 1.38\n
MT text date: \n
MT date 2018-02-13 12:11:32 +0000\n
MT text ;  author: \n
MT text christos\n
MT text ;  state: \n
MT text Exp\n
MT text ;\n
MT text   lines: +\n
MT text 3\n
MT text  -\n
MT text 3\n
MT text ;\n
MT text   commitid: \n
MT text vP6aR6nnFPCF7HqA\n
MT text ;\n
MT newline\n
M update url's for existing donations per donor's request.\n
M =============================================================================\n

It exist cases where a rlog entry header is empty which makes the
rlog parsing fail.

M =============================================================================\n
M ----------------------------\n
M revision 1.38\n
MT text date: \n
MT date 2018-02-13 12:11:32 +0000\n
MT text ;  author: \n
MT text christos\n
MT text ;  state: \n
MT text Exp\n
MT text ;\n
MT text   lines: +\n
MT text 3\n
MT text  -\n
MT text 3\n
MT text ;\n
MT text   commitid: \n
MT text vP6aR6nnFPCF7HqA\n
MT text ;\n
MT newline\n
M update url's for existing donations per donor's request.\n
M =============================================================================\n

So instead of stopping rlog parsing by raising an exception, prefer
to skip that entry and process the next one.

Closes T4629

Diff Detail

Repository
rDLDCVS CVS Loader
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Build is green

Patch application report for D8684 (id=31357)

Rebasing onto 965c3de498...

Current branch diff-target is up to date.
Changes applied before test
commit 65b4957687f7547051db92d26336c177b3794356
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Fri Oct 14 13:39:38 2022 +0200

    rlog: Skip rlog entry with missing header in RlogConv.parse_rlog
    
    CVS rlog for a given module sent by server is a concatenation of
    rlog entries. Each entry has a header containing the path to a
    RCS file plus other info.
    
    It exist cases where a rlog entry header is empty which makes the
    rlog parsing fail.
    
    So instead of stopping rlog parsing by raising an exception, prefer
    to skip that entry and process the next one.
    
    Closes T4629

See https://jenkins.softwareheritage.org/job/DLDCVS/job/tests-on-diff/133/ for more details.

This revision is now accepted and ready to land.Oct 14 2022, 6:58 PM

Build is green

Patch application report for D8684 (id=31367)

Rebasing onto cfe7507a73...

Current branch diff-target is up to date.
Changes applied before test
commit 734207ba5847a114d2ffe7d879be8ac54dbed4f6
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Fri Oct 14 13:39:38 2022 +0200

    rlog: Skip rlog entry with missing header in RlogConv.parse_rlog
    
    CVS rlog for a given module sent by server is a concatenation of
    rlog entries. Each entry has a header containing the path to a
    RCS file plus other info.
    
    It exist cases where a rlog entry header is empty which makes the
    rlog parsing fail.
    
    So instead of stopping rlog parsing by raising an exception, prefer
    to skip that entry and process the next one.
    
    Closes T4629

See https://jenkins.softwareheritage.org/job/DLDCVS/job/tests-on-diff/135/ for more details.