Skip to content

cvsclient: Retry pserver connection three times in case of failure

Connection to an existing pserver might sometimes fail (on SourceForge for instance), retrying the operation usally fixes the issue.

(swh) anlambert@carnavalet:/tmp/cvs_test$ swh loader -C ~/.config/swh/loader/cvs.yml run cvs pserver://anonymous@a.cvs.sourceforge.net/cvsroot/yazoo/help
INFO:swh.loader.cvs.loader.CvsLoader:Load origin 'pserver://anonymous@a.cvs.sourceforge.net/cvsroot/yazoo/help' with type 'cvs'
Request: BEGIN AUTH REQUEST
/cvsroot/yazoo
anonymous
A
END AUTH REQUEST


ERROR:swh.loader.cvs.loader.CvsLoader:Loading failure, updating to `not_found` status
Traceback (most recent call last):
  File "/home/anlambert/swh/swh-environment/swh-loader-core/swh/loader/core/loader.py", line 383, in load
    self.prepare()
  File "/home/anlambert/swh/swh-environment/swh-loader-cvs/swh/loader/cvs/loader.py", line 487, in prepare
    self.cvsclient = CVSClient(url)
  File "/home/anlambert/swh/swh-environment/swh-loader-cvs/swh/loader/cvs/cvsclient.py", line 227, in __init__
    self.connect_pserver(url.hostname, url.port, url.username, url.password)
  File "/home/anlambert/swh/swh-environment/swh-loader-cvs/swh/loader/cvs/cvsclient.py", line 115, in connect_pserver
    raise NotFound(
swh.loader.exception.NotFound: pserver authentication failed for a.cvs.sourceforge.net:2401: b'cvs pserver: cannot read /cvsroot/yazoo/CVSROOT/config: Operation not permitted\n'
{'status': 'uneventful'} for origin 'pserver://anonymous@a.cvs.sourceforge.net/cvsroot/yazoo/help'
(swh) anlambert@carnavalet:/tmp/cvs_test$ swh loader -C ~/.config/swh/loader/cvs.yml run cvs pserver://anonymous@a.cvs.sourceforge.net/cvsroot/yazoo/help
INFO:swh.loader.cvs.loader.CvsLoader:Load origin 'pserver://anonymous@a.cvs.sourceforge.net/cvsroot/yazoo/help' with type 'cvs'
Request: BEGIN AUTH REQUEST
/cvsroot/yazoo
anonymous
A
END AUTH REQUEST


{'status': 'eventful'} for origin 'pserver://anonymous@a.cvs.sourceforge.net/cvsroot/yazoo/help'

Migrated from D8006 (view on Phabricator)

Merge request reports