You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Stephan Heilner (JIRA)" <ji...@codehaus.org> on 2006/12/12 17:44:46 UTC

[jira] Created: (MPSCM-93) scm:tag for subversion tagging from local version of code, not directly from repository

scm:tag for subversion tagging from local version of code, not directly from repository
---------------------------------------------------------------------------------------

                 Key: MPSCM-93
                 URL: http://jira.codehaus.org/browse/MPSCM-93
             Project: maven-scm-plugin
          Issue Type: Bug
            Reporter: Stephan Heilner


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

        

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

Posted by "Emmanuel Venisse (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/SCM-262?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Emmanuel Venisse updated SCM-262:
---------------------------------

    Fix Version/s: future

> 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
>            Reporter: Stephan Heilner
>             Fix For: future
>
>
> 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

        

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

Posted by "George Gastaldi (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/SCM-262?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=155599#action_155599 ] 

George Gastaldi commented on SCM-262:
-------------------------------------

If applied that patch, you could not solve the worst scenario: others may commit on trunk, so the tag created could not really be the one that you checked out and ran tests/packaged locally.

What do you think about it ?

> 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
>             Fix For: future
>
>
> 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

        

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

Posted by "Olivier Lamy (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/SCM-262?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Olivier Lamy updated SCM-262:
-----------------------------

         Assignee: Olivier Lamy
    Fix Version/s:     (was: future)
                   1.1.1

> 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

        

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

Posted by "Olivier Lamy (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/SCM-262?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Olivier Lamy closed SCM-262.
----------------------------

    Resolution: Fixed

I close this issue as it's now possible to tag remotely with svn provider (using  ScmTagParameters.remoteTagging)

> 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.2
>
>         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

        

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

Posted by "Olivier Lamy (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/SCM-262?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=169724#action_169724 ] 

Olivier Lamy commented on SCM-262:
----------------------------------

work started with [rev 754778[http://svn.apache.org/viewvc?rev=754778&view=rev]

> 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.2
>
>         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

        

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

Posted by "Yann Albou (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/SCM-262?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=150808#action_150808 ] 

Yann Albou commented on SCM-262:
--------------------------------

This issue could resolve issue SCM-406

> 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
>             Fix For: future
>
>
> 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

        

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

Posted by "George Gastaldi (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/SCM-262?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=169742#action_169742 ] 

George Gastaldi commented on SCM-262:
-------------------------------------

Olivier,

Yes, this is something that I could not figure out how to solve. 
I guess this is the right way.


> 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.2
>
>         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

        

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

Posted by "George Gastaldi (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/SCM-262?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=155903#action_155903 ] 

George Gastaldi commented on SCM-262:
-------------------------------------

Yann,

I may be wrong, but  I know that there are some OS (Windows, for instance) that do not allow locking in SVN. 
Also,locking the entire trunk would be overkill in a big team (take any apache project and you will see that).

> 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
>             Fix For: future
>
>
> 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

        

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

Posted by "Olivier Lamy (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/SCM-262?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=169738#action_169738 ] 

Olivier Lamy commented on SCM-262:
----------------------------------

After some tests with the release plugin this doesn't work as this (or so easily)
Story :
- before starting the release your current local rev is 2
- after committing the released pom the svn rev on the server is 3
- but your current local rev is always 2 !
- when we copy : svn cp -r 2 ... ..   we copy a non released pom (always SNAPSHOT version) to the tag path.

We have to get the new svn rev after committing the released pom and use it for the tag/copy operation.



> 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.2
>
>         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

        

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

Posted by "Chris Rudd (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/SCM-262?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chris Rudd updated SCM-262:
---------------------------

    Attachment: SvnTagCommand.patch

Here is a patch that I made against version 1.0. It uses the svn info command on the working directory to get the current revision (presumably the revision that was built) and passes the revision to the svn cp command. This works with svn 1.5.4 (have not tested other versions, but dont see any reason it wouldnt).

> 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
>             Fix For: future
>
>         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

        

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

Posted by "Vadim Strizhevsky (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/SCM-262?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_110500 ] 

Vadim Strizhevsky commented on SCM-262:
---------------------------------------

In my setup SVN repository is multiproject setup and tags/ directory can only be created in. It can't be modified.

I'm unable to use "svn release:prepare" due to it trying to do "svn copy . tag_url". I've made a patch that does "svn copy trunk_rul tag_url" and that makes it work fine. I think this is the right approach in general and is also more efficient from SVN perspective.  Is there any chance this issue will be addressed in next release?

Index: src/main/java/org/apache/maven/scm/provider/svn/svnexe/command/tag/SvnTagCommand.java
===================================================================
--- src/main/java/org/apache/maven/scm/provider/svn/svnexe/command/tag/SvnTagCommand.java (revision 586574)
+++ src/main/java/org/apache/maven/scm/provider/svn/svnexe/command/tag/SvnTagCommand.java  (working copy)
@@ -157,7 +157,8 @@

         cl.createArgument().setValue( messageFile.getAbsolutePath() );

-        cl.createArgument().setValue( "." );
+        String projectRoot = SvnTagBranchUtils.getProjectRoot(repository.getUrl());
+        cl.createArgument().setValue( projectRoot + "/trunk" );

         // Note: this currently assumes you have the tag base checked out too
         String tagUrl = SvnTagBranchUtils.resolveTagUrl( repository, new ScmTag
( tag ) );


> 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
>             Fix For: future
>
>
> 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

        

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

Posted by "Emmanuel Venisse (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/SCM-262?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Emmanuel Venisse updated SCM-262:
---------------------------------

    Component/s: maven-scm-provider-svn

> 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
>             Fix For: future
>
>
> 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

        

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

Posted by "Olivier Lamy (JIRA)" <ji...@codehaus.org>.
    [ 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

        

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

Posted by "Yann Albou (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/SCM-262?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=155881#action_155881 ] 

Yann Albou commented on SCM-262:
--------------------------------

Yes, I agree with you.
But this worst scenario is not the most common.

Another way, would be to get a svn lock and then release lock when the tag is done.

> 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
>             Fix For: future
>
>
> 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

        

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

Posted by "Nick Stolwijk (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/SCM-262?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=156408#action_156408 ] 

Nick Stolwijk commented on SCM-262:
-----------------------------------

Wouldn't it be possible to take the revision number at start of the release and give that to svn checkout and svn copy? Noone can change a revision so you will be save.

> 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
>             Fix For: future
>
>
> 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

        

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

Posted by "Yann Albou (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/SCM-262?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=156352#action_156352 ] 

Yann Albou commented on SCM-262:
--------------------------------

George,
It seems to work on Windows.
Yes I agree with you it is overkill. but either we resolve the worst scenario with this overkill solution or we use a lighter solution that doesn't cover all situations....
Personnally, I prefer the simple solution where we tag from the repository.


> 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
>             Fix For: future
>
>
> 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

        

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

Posted by "Karsten Sperling (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/SCM-262?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=167661#action_167661 ] 

Karsten Sperling commented on SCM-262:
--------------------------------------

Tagging from a fixed revision is only equivalent to tagging from a working copy if the working copy is at a consistent revision across all files, i.e. only if 'svn info -R | grep Revision' shows the same revision number for all files. Maven should enforce this at the same time as it checks for local modifications.

In fact, to be completely correct, maven would have to be even more paranoid during release:prepare
- Check that svn st -u shows neither local nor remote changes. The output will also contain the latest revision for the tree on the server, call it R1
- svn up -r $R1. This should not result in any changes
- Commit the POM update, call the revision this results in R2
- Check that no intervening changes were committed on the server: svn log -q -r $R1:$R2. This should only return the two revisions R1 and R2, but nothing in between
- Making a tag of R2 will now have the same content as the original working copy (+ POM change)


> 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
>             Fix For: future
>
>         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

        

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

Posted by "Olivier Lamy (JIRA)" <ji...@codehaus.org>.
    [ 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 4:16 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;
boolean 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
* 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"$
  
> 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

        

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

Posted by "Emmanuel Venisse (JIRA)" <ji...@codehaus.org>.
     [ http://jira.codehaus.org/browse/SCM-262?page=all ]

Emmanuel Venisse moved MPSCM-93 to SCM-262:
-------------------------------------------

    Complexity: Intermediate
      Workflow: Maven New  (was: jira)
           Key: SCM-262  (was: MPSCM-93)
       Project: Maven SCM  (was: maven-scm-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
>            Reporter: Stephan Heilner
>
> 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

        

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

Posted by "Chris Rudd (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/SCM-262?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=163763#action_163763 ] 

Chris Rudd commented on SCM-262:
--------------------------------

The svn command that fails is :

svn copy --file /tmp/maven-scm-297444897.commit . http://XXX/svn/project/tags/foo-1.0.0

Simply adding the explicit revision to copy from solves the problem 

svn copy --file /tmp/maven-scm-297444897.commit -r 599 . http://XXX/svn/project/tags/foo-1.0.0

So is there an easy way for the SvnTagCommand to get the revision of the local copy?


> 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
>             Fix For: future
>
>
> 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

        

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

Posted by "Olivier Lamy (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/SCM-262?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=169440#action_169440 ] 

Olivier Lamy commented on SCM-262:
----------------------------------

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