Skip to content

loader: Fix SvnRepo parameters ordering

Looks like a mistake was missed in recent refactoring.

This makes the loader fail at each run, see below:

swh-loader_1                    | [2020-05-07 16:44:07,468: INFO/ForkPoolWorker-1] Processing revisions [1-9984] for {'swh-origin': '/tmp/swh.loader.svn.b5nm4bz2-68', 'remote_url': 'file:///tmp/tmpsh501dsm/swh.loader.svn.1bdcplkq-68/tmpkxp1x5tu', 'local_url': b'svn://scm.gforge.inria.fr/svn/simgrid/contrib/trunk/GTNetS/tmpkxp1x5tu', 'uuid': b'48e7efb5-ca39-0410-a469-dd3cf9ba447f'}
swh-loader_1                    | [2020-05-07 16:44:07,473: ERROR/ForkPoolWorker-1] [Errno 13] Permission denied: b'svn:'
swh-loader_1                    | Traceback (most recent call last):
swh-loader_1                    |   File "/srv/softwareheritage/venv/lib/python3.7/site-packages/swh/loader/svn/loader.py", line 520, in fetch_data
swh-loader_1                    |     data = next(self.swh_revision_gen)
swh-loader_1                    |   File "/srv/softwareheritage/venv/lib/python3.7/site-packages/swh/loader/svn/loader.py", line 426, in process_svn_revisions
swh-loader_1                    |     for rev, nextrev, commit, new_objects, root_directory in gen_revs:
swh-loader_1                    |   File "/srv/softwareheritage/venv/lib/python3.7/site-packages/swh/loader/svn/svn.py", line 224, in swh_hash_data_per_revision
swh-loader_1                    |     objects = self.swhreplay.compute_objects(rev)
swh-loader_1                    |   File "/srv/softwareheritage/venv/lib/python3.7/site-packages/swh/loader/svn/ra.py", line 456, in compute_objects
swh-loader_1                    |     self.replay(rev)
swh-loader_1                    |   File "/srv/softwareheritage/venv/lib/python3.7/site-packages/swh/loader/svn/ra.py", line 438, in replay
swh-loader_1                    |     self.conn.replay(rev, rev + 1, self.editor)
swh-loader_1                    |   File "/srv/softwareheritage/venv/lib/python3.7/site-packages/swh/loader/svn/ra.py", line 412, in open_root
swh-loader_1                    |     return DirEditor(self.directory, rootpath=self.rootpath)
swh-loader_1                    |   File "/srv/softwareheritage/venv/lib/python3.7/site-packages/swh/loader/svn/ra.py", line 283, in __init__
swh-loader_1                    |     os.makedirs(rootpath, exist_ok=True)
swh-loader_1                    |   File "/usr/local/lib/python3.7/os.py", line 213, in makedirs
swh-loader_1                    |     makedirs(head, exist_ok=exist_ok)
swh-loader_1                    |   File "/usr/local/lib/python3.7/os.py", line 213, in makedirs
swh-loader_1                    |     makedirs(head, exist_ok=exist_ok)
swh-loader_1                    |   File "/usr/local/lib/python3.7/os.py", line 213, in makedirs
swh-loader_1                    |     makedirs(head, exist_ok=exist_ok)
swh-loader_1                    |   [Previous line repeated 4 more times]
swh-loader_1                    |   File "/usr/local/lib/python3.7/os.py", line 223, in makedirs
swh-loader_1                    |     mkdir(name, mode)
swh-loader_1                    | PermissionError: [Errno 13] Permission denied: b'svn:'

Migrated from D3136 (view on Phabricator)

Merge request reports

Loading