Skip to content

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.

(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 #3870 (closed)

Fixes SWH-LOADER-SVN-4Y


Migrated from D7015 (view on Phabricator)

Merge request reports