Page MenuHomeSoftware Heritage

ra: Persist link flag in FileState when replaying revisions
ClosedPublic

Authored by anlambert on Nov 29 2021, 11:43 AM.

Details

Summary

When adding a svn link that will be exported as a symbolic link,
that information must be persisted across revisions replay.

Previously if a link was modified in another revision, like for
instance adding svn:eol-style property, this could lead to
removing the exported symbolic link while it should not.

Related to T3695

Diff Detail

Repository
rDLDSVN Subversion (SVN) 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 D6702 (id=24346)

Rebasing onto 4bae0f9315...

Current branch diff-target is up to date.
Changes applied before test
commit 7db5905e3970be65d47356607ce811b7bbb2371c
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Mon Nov 29 11:29:24 2021 +0100

    ra: Persist link flag in FileState when replaying revisions
    
    When adding a svn link that will be exported as a symbolic link,
    that information must be persisted across revisions replay.
    
    Previously if a link was modified in another revision, like for
    instance adding svn:eol-style property, this could lead to
    removing the exported symbolic link while it should not.
    
    Related to T3695

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

ardumont added inline comments.
swh/loader/svn/ra.py
277–284

?

swh/loader/svn/tests/test_loader.py
1729

is it enough a check?

I assume that yes and without the current implementation change, this breaks. Am I correct?

lgtm

One suggestion and one question inline though.m

swh/loader/svn/ra.py
277–284

right, I got lazy on this

swh/loader/svn/tests/test_loader.py
1729

Yes without the change, revision discrepancy got detected when loading the repository.

Use variable to store if path is a link

Build is green

Patch application report for D6702 (id=24352)

Rebasing onto 4bae0f9315...

Current branch diff-target is up to date.
Changes applied before test
commit c2c27f1de8470ca5fbb81936245395373140706f
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Mon Nov 29 11:29:24 2021 +0100

    ra: Persist link flag in FileState when replaying revisions
    
    When adding a svn link that will be exported as a symbolic link,
    that information must be persisted across revisions replay.
    
    Previously if a link was modified in another revision, like for
    instance adding svn:eol-style property, this could lead to
    removing the exported symbolic link while it should not.
    
    Related to T3695

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

This revision was not accepted when it landed; it landed in state Needs Review.Nov 29 2021, 1:21 PM
This revision was automatically updated to reflect the committed changes.