Page MenuHomeSoftware Heritage

replay: Also use revision parameter when calling client.info
ClosedPublic

Authored by anlambert on Jan 28 2022, 4:03 PM.

Details

Summary

It exist cases where the client.info command will fail if both
peg_revision and revision parameters are not provided.

Python 3.9.2 (default, Feb 28 2021, 17:03:44)
[GCC 10.2.1 20210110] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from subvertpy import SubversionException, client, properties
>>> from subvertpy.ra import Auth, RemoteAccess, get_username_provider
>>> auth = Auth([get_username_provider()])
>>> client = client.Client(auth=auth)
>>> client.info("http://svn.code.sf.net/p/phpbbproject/svn/trunk", peg_revision=260)
Traceback (most recent call last):   
  File "<stdin>", line 1, in <module>
subvertpy.SubversionException: ("Unable to find repository location for 'http://svn.code.sf.net/p/phpbbproject/svn/trunk' in revision 318", 195012)
>>> client.info("http://svn.code.sf.net/p/phpbbproject/svn/trunk", revision=260)
Traceback (most recent call last):   
  File "<stdin>", line 1, in <module>
subvertpy.SubversionException: ("Unable to find repository location for 'http://svn.code.sf.net/p/phpbbproject/svn/trunk' in revision 260", 195012)
>>> client.info("http://svn.code.sf.net/p/phpbbproject/svn/trunk", peg_revision=260, revision=260)
{'trunk': <client.Info object at 0x7f18d2a42eb0>}

Fixes SWH-LOADER-SVN-5K

Related to T611

Diff Detail

Event Timeline

Build is green

Patch application report for D7047 (id=25553)

Rebasing onto da1a81bbdb...

Current branch diff-target is up to date.
Changes applied before test
commit 87e98c14b301cfdd8cf58c2d5bd9b6228dee17e6
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Fri Jan 28 15:55:48 2022 +0100

    replay: Also use revision parameter when calling client.info
    
    It exist cases where the client.info command will fail if both
    peg_revision and revision parameters are not provided.
    
    Related to T611

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

This revision is now accepted and ready to land.Jan 28 2022, 4:05 PM