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

Robert Scholte commented on SCM-783:
------------------------------------

Proposal:
{code:title=ScmManager.java}
/**
   * Verify if the tagName exists within the repository
   */
ExistsScmResult existsTag(ScmRepository repository, String tagName);
 
/**
   * Verify if the branchName exists within the repository
   */
ExistsScmResult existsBranch(ScmRepository repository, String branchName);
{code}

> Support existence check for tags and branches
> ---------------------------------------------
>
>                 Key: SCM-783
>                 URL: https://jira.codehaus.org/browse/SCM-783
>             Project: Maven SCM
>          Issue Type: New Feature
>          Components: maven-scm-api
>            Reporter: Robert Scholte
>
> The {{prepare}} goal of the maven-release-plugin does the following scm tasks:
> # commit the adjusted pom.xml with final versions and new 
> (developer)connection
> # tag 
> # commit the adjusted pom.xml for the next development cycle.
> If step 2 fails because the tag already exists, the pom is in a wrong status 
> at the trunk. A next attempt to do the {{prepare}} will fail. To prevent this 
> simple mistake is by checking the existence of the tag *before* step 1.
> The same should be done for branches.



--
This message was sent by Atlassian JIRA
(v6.1.6#6162)

Reply via email to