[ 
https://jira.codehaus.org/browse/MRELEASE-723?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=297670#comment-297670
 ] 

Mark Struberg commented on MRELEASE-723:
----------------------------------------

I've now reviewed the patch and think we need to think a bit harder about this 
;)

a.) The ScmTranslator was a perfect starting point, but I think it's not yet 
full cycle.

You added the code:
    public String resolveTag( String tag )
    {
        if ( !"HEAD".equals( tag ) )
        {
            return tag;
        }
        else
        {
            return null;
        }
    }

but there is no special 'HEAD' tag in GIT nor hg. I assume you've copied that 
over from the CvsScmTranslator, right? So this doesn't suite for GIT and we 
should just return tag instead.


I like to try another route:
Currently we had to add a new ScmTranslator for all new SCMs, but that doesn't 
scale. 
I've now created a new DefaultScmTranslator which will get created if NO other 
(special) ScmTranslator gets picked up. This one just returns the unchanged 
URLs and the tag. 

The main change is that we now _allways_ rewrite the pom and set the tag!


PS:I've kept your unit tests (but didn't yet fix the code style).
PPS: We need to review the HEAD stuff in the other ScmTranslators as well (e.g. 
ClearCase).
PPPS: will upload the patch after fixing the tests
                
> DCVS tagging commands should store the tag-name (or hash) in the the 
> //project/scm/tag element.
> -----------------------------------------------------------------------------------------------
>
>                 Key: MRELEASE-723
>                 URL: https://jira.codehaus.org/browse/MRELEASE-723
>             Project: Maven 2.x Release Plugin
>          Issue Type: New Feature
>          Components: Git, Mercurial, Subversion
>         Environment: Apache Maven 3.0.4-RC3 (r1210461; 2011-12-05 
> 14:58:54+0100)
> Maven home: /usr/local/Cellar/maven/current/libexec
> Java version: 1.6.0_29, vendor: Apple Inc.
> Java home: 
> /Library/Java/JavaVirtualMachines/1.6.0_29-b11-402.jdk/Contents/Home
> Default locale: de_DE, platform encoding: MacRoman
> OS name: "mac os x", version: "10.7.2", arch: "x86_64", family: "mac"
>            Reporter: Mirko Friedenhagen
>            Assignee: Mark Struberg
>             Fix For: 2.4
>
>         Attachments: add-tag-to-release-poms-1329108.patch, 
> add-tag-to-release-poms.patch
>
>
> With SVN the developerConnection and connection are
> updated to the "real" release URL, that is when I invoke release:prepare with
> a URL like:
> https://SVNSERVER/svn/REPO/myproject/branches/release it will be
> replaced by https://SVNSERVER/svn/REPO/myproject/tags/myproject-1.0
> which is fine because now you know which revision to checkout for
> building the release.
> With git there is no such possibility to realize this with rewriting
> the URL AFAIK. So I would have expected however, that maybe the 
> //project/scm/tag
> element would be updated to reflect the fact, that the pom is the one
> of release, either to the "symbolic name" myproject-1.0 or to the hash
> of the tag.
> See http://markmail.org/thread/m77cvhqqq56krzzd as well.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to