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

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

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

   **[Jared 
Bunting](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=deraj123)**
 opened 
**[SCM-643](https://issues.apache.org/jira/browse/SCM-643?redirect=false)** and 
commented
   
   When running release:branch with a mercurial repository, and having all 
properties set to defaults, I would expect the current version to be carried 
over to the new branch, and the new "developmentVersion" to be set on the 
original branch.  This is the behavior that I have always seen in the 
subversion provider (which is the only other one that I really have experience 
with), and what I believe the documentation states. However, that is not the 
behavior that I am seeing.  I see the branch created, then the new version set 
on the branch.
   
   I believe the issue is that HgBranchCommand not only creates a new branch, 
but updates the working copy to the new branch.  This seems to be counter to 
the behavior expected by maven-release-plugin, differs from the behavior in the 
subversion provider, and also seems to not be the behavior described in the 
ScmProvider interface.
   
   Since this "updating to the new branch" behavior is inherent to mercurial, 
I've written a patch that saves the original branch name prior to branching, 
and after branching is complete updates to the original branch.
   
   
   ---
   
   **Affects:** 1.5, 1.6
   
   **Attachments:**
   - 
[hg-scm-branch-fix.patch](https://issues.apache.org/jira/secure/attachment/12718902/hg-scm-branch-fix.patch)
 (_1.33 kB_)
   
   1 votes, 2 watchers
   




> release:branch in mercurial provider updates the version in the new branch
> --------------------------------------------------------------------------
>
>                 Key: SCM-643
>                 URL: https://issues.apache.org/jira/browse/SCM-643
>             Project: Maven SCM (Moved to GitHub Issues)
>          Issue Type: Bug
>          Components: maven-scm-provider-mercurial (hg)
>    Affects Versions: 1.5, 1.6
>            Reporter: Jared Bunting
>            Priority: Major
>         Attachments: hg-scm-branch-fix.patch
>
>
> When running release:branch with a mercurial repository, and having all 
> properties set to defaults, I would expect the current version to be carried 
> over to the new branch, and the new "developmentVersion" to be set on the 
> original branch.  This is the behavior that I have always seen in the 
> subversion provider (which is the only other one that I really have 
> experience with), and what I believe the documentation states. However, that 
> is not the behavior that I am seeing.  I see the branch created, then the new 
> version set on the branch.
> I believe the issue is that HgBranchCommand not only creates a new branch, 
> but updates the working copy to the new branch.  This seems to be counter to 
> the behavior expected by maven-release-plugin, differs from the behavior in 
> the subversion provider, and also seems to not be the behavior described in 
> the ScmProvider interface.
> Since this "updating to the new branch" behavior is inherent to mercurial, 
> I've written a patch that saves the original branch name prior to branching, 
> and after branching is complete updates to the original branch.



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

Reply via email to