maven-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Osipov <micha...@apache.org>
Subject Re: ScmProvider.list()
Date Sun, 01 Apr 2018 16:21:36 GMT
Am 2018-04-01 um 13:54 schrieb Stephen Connolly:
> On Fri 30 Mar 2018 at 10:20, Michael Osipov <michaelo@apache.org> wrote:
> 
>> Am 2018-03-30 um 10:47 schrieb Basin Ilya:
>>> Hi.
>>> We need your opinion on the following topic. While Svn and Cvs providers
>> perform the list() operation remotely and don't need a checkout directory,
>> Git and some others
>>> simply list the local files (generally, because their SCMs don't provide
>> a remote list method). Arguments passed to the list() method also have
>> different meanings for those
>>> providers.
>>>
>>>
>>> We should specify in the ScmProvider.list() javadoc that if the SCM does
>> not support remote listing, then the method should just fail and also
>> modify the existing
>>> ListCommand implementations.
>>
>> My opinion on this is that the ListCommand says remote repos. If some
>> SCM provider implements it wrong, it either has to be dropped or
>> corrected. I don't like the idea to checkout or clone to list files.
>>
>> The Git provider has been implemented incorrectly from the beginning. I
>> checked some other SCMs and they don't implement it at all.
>>
>> This needs to be fixed in 2.0.0.
> 
> 
> It depends, git being distributed, if you have the local checkout, you can
> list exactly without needing to go remote.

No, the docs say remote list. Not local list.

> But perhaps the thing here is to enhance the api to provide for both cases.

Likely, but you will end up in a split situation because not every SCM 
will implement your usercase.

> At the minimum, git could do an ls-remote and then list from local once the
> revision is confirmed present (which would meet a goal of being a “read
> only” operation)

ls-remote does *not* list any files remotely, it lists remote refs.

Michael


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Mime
View raw message