HomeSoftware Heritage

ra: Fix edge case in svn:eol-style property handling

Description

ra: Fix edge case in svn:eol-style property handling

In a subversion repository, files contained in a directory can have the
svn:eol-style property set in order to define which line endings should
be used when exporting a revision.

Nevertheless, the directory and its content can be removed in another
revision and added again in another one without setting the svn:eol-style
property this time.

The subversion loader already handles that property to ensure reconstructed
filesystem for a revision through the svn_ra API will be identical to the one
obtained by exporting that revision. But it did not handle properly the case
when a directory and its content are removed recursively, resulting in eol-style
mapping for the concerned files not cleared. This was leading to invalid
reconstructed filesystem when files get added again without the property
set as end of lines are replaced while they should not.

So ensure to properly handle the recursive removal of a directory and its
content by clearing the eol-style mapping for removed files.

Related to T3695