[ 
https://issues.apache.org/jira/browse/SCM-504?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17961830#comment-17961830
 ] 

ASF GitHub Bot commented on SCM-504:
------------------------------------

jira-importer opened a new issue, #718:
URL: https://github.com/apache/maven-scm/issues/718

   **[Paul 
Lissak](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=paullissak)**
 opened 
**[SCM-504](https://issues.apache.org/jira/browse/SCM-504?redirect=false)** and 
commented
   
   The CVS tag command is not checking the given ScmFileSet for individual 
files.  This code snippet attempts to apply a tag to just one file:
   
       public void applyTag(String tag, File projectFolder, String filename, 
ScmRepository scmRepository, ScmProvider scmProvider) {
           ScmFileSet fileSet = new ScmFileSet(projectFolder, new 
File(filename));
           scmProvider.tag(scmRepository, fileSet, tag);
       }
   
   Lets say the given tag is "TAG_NAME" and the filename is "Example.java", 
then this is what CVS command is generated:
   
       cvs -z3 -f -q tag -F -c TAG_NAME
   
   The correct CVS command should be:
   
       cvs -z3 -f -q tag -F -c TAG_NAME Example.java
   
   The problem appears to be in the following method:
   
       
org.apache.maven.scm.provider.cvslib.command.tag.AbstractCvsTagCommand.executeTagCommand(ScmProviderRepository,ScmFileSet,String,String)
   
   The method needs to call getFileList() on the ScmFileSet to see if any 
individual files are present and then add them to the generated CVS tag command.
   
   
   ---
   
   **Affects:** 1.1
   




> CVS Tag Command Not Respecting Single File in ScmFileSet
> --------------------------------------------------------
>
>                 Key: SCM-504
>                 URL: https://issues.apache.org/jira/browse/SCM-504
>             Project: Maven SCM (Moved to GitHub Issues)
>          Issue Type: Bug
>          Components: maven-scm-provider-cvs
>    Affects Versions: 1.1
>            Reporter: Paul Lissak
>            Priority: Major
>
> The CVS tag command is not checking the given ScmFileSet for individual 
> files.  This code snippet attempts to apply a tag to just one file:
>     public void applyTag(String tag, File projectFolder, String filename, 
> ScmRepository scmRepository, ScmProvider scmProvider) {
>         ScmFileSet fileSet = new ScmFileSet(projectFolder, new 
> File(filename));
>         scmProvider.tag(scmRepository, fileSet, tag);
>     }
> Lets say the given tag is "TAG_NAME" and the filename is "Example.java", then 
> this is what CVS command is generated:
>     cvs -z3 -f -q tag -F -c TAG_NAME
> The correct CVS command should be:
>     cvs -z3 -f -q tag -F -c TAG_NAME Example.java
> The problem appears to be in the following method:
>     
> org.apache.maven.scm.provider.cvslib.command.tag.AbstractCvsTagCommand.executeTagCommand(ScmProviderRepository,ScmFileSet,String,String)
> The method needs to call getFileList() on the ScmFileSet to see if any 
> individual files are present and then add them to the generated CVS tag 
> command.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to