You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Olivier Lamy (JIRA)" <ji...@codehaus.org> on 2009/03/14 18:10:13 UTC

[jira] Issue Comment Edited: (SCM-262) scm:tag for subversion tagging from local version of code, not directly from repository

    [ http://jira.codehaus.org/browse/SCM-262?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=169440#action_169440 ] 

Olivier Lamy edited comment on SCM-262 at 3/14/09 12:10 PM:
------------------------------------------------------------

My proposal is to use :
{code}
svn copy --file /tmp/maven-scm-297444897.commit -r 599 http://XXX/svn/project/trunk http://XXX/svn/project/tags/foo-1.0.0
{code}
BTW to preserve backward comp this won't be the default way, it will be activated though an option.
I propose to add a new method in ScmProvider :
{code:java}
    TagScmResult tag( ScmRepository repository, ScmFileSet fileSet, String tagName, TagParameters tagParameters)
        throws ScmException;
{code}
{code:title=TagParameters.java|borderStyle=solid}
String message;
String remoteTagging = false;
String scmRevision;
{code} 
In the new tag method :
{code}
// really pseudo code but maven style :-)
if (!remoteTagging) 
{
  use current tag command
}
if (remoteTagging && scmRevision != null) 
{
  // this can be usefull to tag a particular svn rev (ie releasing one build in ci tools)
  svn copy --file /tmp/maven-scm-297444897.commit -r ${scmRevision} http://XXX/svn/project/trunk http://XXX/svn/project/tags/foo-1.0.0
}
if (remoteTagging && scmRevision == null) 
{
  get the current svn with SvnInfoCommandResult;
  svn copy --file /tmp/maven-scm-297444897.commit -r ${scmRevision} http://XXX/svn/project/trunk http://XXX/svn/project/tags/foo-1.0.0
}
{code}
If no comments/objections I will implements this as it 
BTW :
* we will have to add some new mojo parameters in the maven-release-plugin to be able to use in the release plugin
* others scm implementations will use their current Tag command (if remote tag is configured a warning will say "this scm implementation doesn't support remote tagging"$

      was (Author: olamy):
    My proposal is to use :
{code}
svn copy --file /tmp/maven-scm-297444897.commit -r 599 http://XXX/svn/project/trunk http://XXX/svn/project/tags/foo-1.0.0
{code}
BTW to preserve backward comp this won't be the default way, it will be activated though an option.
I propose to add a new method in ScmProvider :
{code:java}
    TagScmResult tag( ScmRepository repository, ScmFileSet fileSet, String tagName, TagParameters tagParameters)
        throws ScmException;
{code}
{code:title=TagParameters.java|borderStyle=solid}
String message;
String remoteTagging = false;
String scmRevision;
{code} 
In the new tag method :
{code}
// really pseudo code but maven style :-)
if (!remoteTagging) 
{
  use current tag command
}
if (remoteTagging && scmRevision != null) 
{
  // this can be usefull to tag a particular svn rev (ie releasing one build in ci tools)
  svn copy --file /tmp/maven-scm-297444897.commit -r ${scmRevision} http://XXX/svn/project/trunk http://XXX/svn/project/tags/foo-1.0.0
}
if (remoteTagging && scmRevision == null) 
{
  get the current svn with SvnInfoCommandResult;
  svn copy --file /tmp/maven-scm-297444897.commit -r ${scmRevision} http://XXX/svn/project/trunk http://XXX/svn/project/tags/foo-1.0.0
}
{code}
If no comments/objections I will implements this as it 
BTW we will have to add some new mojo parameters in the maven-release-plugin to be able to use in the release plugin
  
> scm:tag for subversion tagging from local version of code, not directly from repository
> ---------------------------------------------------------------------------------------
>
>                 Key: SCM-262
>                 URL: http://jira.codehaus.org/browse/SCM-262
>             Project: Maven SCM
>          Issue Type: Bug
>          Components: maven-scm-provider-svn
>            Reporter: Stephan Heilner
>            Assignee: Olivier Lamy
>             Fix For: 1.1.1
>
>         Attachments: SvnTagCommand.patch
>
>
> In theory, you shouldn't tag or branch from a local and potentially different version of the code.  From what I can tell, the scm:tag imports your existing code into a new tag.  With subversion, tagging is very lightweight if you do a 'svn copy trunk_url tag_url'.  The way it currently works make sense for other repositories such as CVS but not for subversion.  

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira