Page MenuHomeSoftware Heritage

Move visit date helper from hg loader to core
ClosedPublic

Authored by Alphare on Feb 8 2022, 10:06 AM.

Details

Summary

There will be a related patch for the hg and the bzr loaders

Diff Detail

Repository
rDLDBASE Generic VCS/Package 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 D7114 (id=25794)

Rebasing onto b3579ed07b...

Current branch diff-target is up to date.
Changes applied before test
commit 0184217e2dd3af6e5cd92f2cbb7ddca02a580581
Author: Raphaël Gomès <rgomes@octobus.net>
Date:   Tue Feb 8 10:03:09 2022 +0100

    Move visit date helper from hg loader to core
    
    There will be a related patch for the hg and the bzr loaders

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

Build is green

Patch application report for D7114 (id=25795)

Rebasing onto b3579ed07b...

Current branch diff-target is up to date.
Changes applied before test
commit 98ed83349c085eeb4bb6870106bbe8b9410bfaa5
Author: Raphaël Gomès <rgomes@octobus.net>
Date:   Tue Feb 8 10:03:09 2022 +0100

    Move visit date helper from hg loader to core
    
    There will be a related patch for the hg and the bzr loaders

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

I see this is used in swh/loader/mercurial/tasks.py. Why do we need to handle this many formats? The argument is be generated by us, so we should be able to make it consistent

I see this is used in swh/loader/mercurial/tasks.py. Why do we need to handle this many formats? The argument is be generated by us, so we should be able to make it consistent

This may be some leftover over-engineering, I'd be happy to drop it, but I have no real insight as to why this is/used to be necessary if at all.

ardumont added a subscriber: ardumont.

It must be related to the use of this kind of date though cli (when the initial code was within the scope of the loader but now it's no longer the case).

So this is highly possible the str and the "now" version can be dropped (since we don't use those kind of tasks through cli).

(I'm wondering whether this goes in swh-loader-core or swh-core though.)

Let's just land this as is for now.

This revision is now accepted and ready to land.Feb 8 2022, 10:35 AM