Page MenuHomeSoftware Heritage

replay: Use peg_rev parameter of client.export instead of rev
ClosedPublic

Authored by anlambert on Jan 21 2022, 4:42 PM.

Details

Summary

It exist cases where there is an ambiguity for subversion to export a path
from a given revision.

See https://edoras.sdsu.edu/doc/svn-book-html-chunk/svn.advanced.pegrevs.html
for more details.

To remove the ambiguity, the peg_rev parameter of the export operation must
be used instead of the rev one.

(swh) anlambert@carnavalet:/tmp$ svn export --help
export: Create an unversioned copy of a tree.
usage: 1. export [-r REV] URL[@PEGREV] [PATH]
       2. export [-r REV] PATH1[@PEGREV] [PATH2]

  1. Exports a clean directory tree from the repository specified by
     URL, at revision REV if it is given, otherwise at HEAD, into
     PATH. If PATH is omitted, the last component of the URL is used
     for the local directory name.

  2. Exports a clean directory tree from the working copy specified by
     PATH1, at revision REV if it is given, otherwise at WORKING, into
     PATH2.  If PATH2 is omitted, the last component of the PATH1 is used
     for the local directory name. If REV is not specified, all local
     changes will be preserved.  Files not under version control will
     not be copied.

  If specified, PEGREV determines in which revision the target is first
  looked up.

(swh) anlambert@carnavalet:/tmp$ svn export -r 796 https://svn.code.sf.net/p/openimscore/code/ser_ims/branches/13_pcc_fixing/modules/pcscf/bin_file.c
svn: E160013: '/p/openimscore/code/!svn/rvr/1198/ser_ims/branches/13_pcc_fixing/modules/pcscf/bin_file.c' path not found

(swh) anlambert@carnavalet:/tmp$ svn export https://svn.code.sf.net/p/openimscore/code/ser_ims/branches/13_pcc_fixing/modules/pcscf/bin_file.c@796
A    bin_file.c
Export complete.

Related to T3870

Fixes SWH-LOADER-SVN-4Y

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 D7015 (id=25431)

Rebasing onto e6e733005d...

Current branch diff-target is up to date.
Changes applied before test
commit eb34b0c059ea91d2a2d6a91194c3b70eb7bdc546
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Fri Jan 21 16:30:14 2022 +0100

    replay: Use peg_rev parameter of client.export instead of rev
    
    It exist cases where there is an ambiguity for subversion to export a path
    from a given revision.
    
    See https://edoras.sdsu.edu/doc/svn-book-html-chunk/svn.advanced.pegrevs.html
    for more details.
    
    To remove the ambiguity, the peg_rev parameter of the export operation must
    be used instead of the rev one.
    
    Related to T3870

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

This revision is now accepted and ready to land.Jan 21 2022, 6:21 PM