Page MenuHomeSoftware Heritage

loader: Simplify the handing of parent revision
ClosedPublic

Authored by anlambert on Feb 9 2022, 4:46 PM.

Details

Summary

In the current loader implementation, a revision different from the
first one has a single parent revision corresponding to the previously
processed one.

In order to simplify the handling of the parent revision, remove
the use of the revision_parents dict and simply store the previously
processed revision id in a parents tuple variable while iterating on
the revisions log. In case of incremental loading, that tuple will be
initialized from the latest revision loaded into the archive.

This change is required to allow the loading of svn subprojects.

Related to T3896

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 D7137 (id=25874)

Rebasing onto b5769ef7d6...

Current branch diff-target is up to date.
Changes applied before test
commit ef2361838bc93df8b2649633e39a61f00565765b
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Wed Feb 9 16:05:35 2022 +0100

    loader: Simplify the handing of parent revision
    
    In the current loader implementation, a revision different from the
    first one has a single parent revision corresponding to the previously
    processed one.
    
    In order to simplify the handling of the parent revision, remove
    the use of the revision_parents dict and simply store the previously
    processed revision id in a parents tuple variable while iterating on
    the revisions log. In case of incremental loading, that tuple will be
    initialized from the latest revision loaded into the archive.
    
    This change is required to allow the loading of svn subprojects.
    
    Related to T3896

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

ardumont added a subscriber: ardumont.

sounds simpler indeed

This revision is now accepted and ready to land.Feb 9 2022, 5:03 PM

Build is green

Patch application report for D7137 (id=25961)

Rebasing onto e7c3fa08d9...

Current branch diff-target is up to date.
Changes applied before test
commit 10b8ce86411351b4af6a5759e6b05b582dcf2ce4
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Wed Feb 9 16:05:35 2022 +0100

    loader: Simplify the handing of parent revision
    
    In the current loader implementation, a revision different from the
    first one has a single parent revision corresponding to the previously
    processed one.
    
    In order to simplify the handling of the parent revision, remove
    the use of the revision_parents dict and simply store the previously
    processed revision id in a parents tuple variable while iterating on
    the revisions log. In case of incremental loading, that tuple will be
    initialized from the latest revision loaded into the archive.
    
    This change is required to allow the loading of svn subprojects.
    
    Related to T3896

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