maven-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Basin Ilya <>
Subject ScmProvider.list()
Date Fri, 30 Mar 2018 08:47:16 GMT
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

I think this is a problem for Scm provider clients unaware of the underlying SCM:
The most severe problem is the differing meaning of the fileSet.getBasedir() parameter. It
may mean the remote path or the local CWD.
Secondly, the clients sometimes need to create a temporary folder to run the list() operation
in, otherwise the files can be checked out in the process CWD.
And lastly, the clients expect the list operation to be fast, while it not always is.

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.

The clients desiring to quickly list the repository contents could try list() and if it fails,
fallback to ScmProvider.checkout() plus

On 30.03.2018 0:05, Michael Osipov (JIRA) wrote:
>     [
> Michael Osipov commented on SCM-869:
> ------------------------------------
> The {{list}} function has been introduced with SCM-183 12 years ago with b158cf35d05271942a10bbef564366ab6a3059ad.
I have checked few other providers. They have been incorrectly implemented also. The Git provider
has been incorrectly implemented eversince with {{git ls-files}}.
> I think this birth issue can only be properly resolved with 2.0.0.
> Can you actually raise this general issue on the dev mailing list? I'd be interested
in other devs opinion. I don't might incorrect code altogether or change the Javadoc if this
is a better way.
>> gitexe list() implemented incorrectly
>> -------------------------------------
>>                 Key: SCM-869
>>                 URL:
>>             Project: Maven SCM
>>          Issue Type: Bug
>>          Components: maven-scm-provider-gitexe
>>    Affects Versions: 1.9.5, 1.9.6
>>            Reporter: Ilya Basin
>>            Priority: Major
>> Taking the Svn implementation as a model, ScmProvider.list() should be implemented
as follows:
>>  * The command must directly query the remote repository for files
>>  * A local working copy is unnecessary and if it doesn't exist, the remote repository
must not be checked out.
>>  * fileSet.getBasedir() indicates where to run the scm binary. The recommended value
is ".".
>>  * fileSet.getFileList() indicates the files to list
>>  * repository indicates the repo URL
>> Git (among other SCMs) does not support listing remote files, so the command should
just fail.
>> For listing files in a working copy, users should call the ScmProvider.status() method
> --
> This message was sent by Atlassian JIRA
> (v7.6.3#76005)

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message