Page MenuHomeSoftware Heritage

test checkout of file lacking trailing \n over pserver protocol
ClosedPublic

Authored by stsp on Oct 27 2021, 4:20 PM.

Details

Summary

This test reproduces the bug fixed in
commit d3b3344bc26d90acb081fe827aed60257d931cfe where our custom cvs
client would fail to check out a file which lacks a trailing newline
from a remote CVS server.

The error triggered by the test without the fix in place is:

CVSProtocolError: Overlong response from CVS server:
b'delta with no trailing eolok\n'

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 D6566 (id=23859)

Rebasing onto 509ac801df...

Current branch diff-target is up to date.
Changes applied before test
commit beb7fc8a023a414d5d51cb2b77d39890a21ea290
Author: Stefan Sperling <stsp@stsp.name>
Date:   Wed Oct 27 13:04:20 2021 +0200

    test checkout of file lacking trailing \n over pserver protocol
    
    This test reproduces the bug fixed in
    commit d3b3344bc26d90acb081fe827aed60257d931cfe where our custom cvs
    client would fail to check out a file which lacks a trailing newline
    from a remote CVS server.
    
    The error triggered by the test without the fix in place is:
    
    CVSProtocolError: Overlong response from CVS server:
    b'delta with no trailing eolok\n'

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

stsp requested review of this revision.Oct 27 2021, 4:22 PM
ardumont added a subscriber: ardumont.

lgtm.

I'm assuming that dropping the fix from the commit mentioned in the description, this new test raises in some ways.

swh/loader/cvs/tests/test_loader.py
293

we tend to use f-strings now

This revision is now accepted and ready to land.Oct 27 2021, 5:24 PM
swh/loader/cvs/tests/test_loader.py
293

Nice. See https://forge.softwareheritage.org/D6585 which converts this and another instance of the same string into f-strings.