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

Olivier Lamy commented on SCM-621:
----------------------------------

This project has moved from Jira to GitHub Issues. This issue was migrated to 
[apache/maven-scm#829|https://github.com/apache/maven-scm/issues/829]. 

> Mercurial provider checkout should not default to tip
> -----------------------------------------------------
>
>                 Key: SCM-621
>                 URL: https://issues.apache.org/jira/browse/SCM-621
>             Project: Maven SCM (Moved to GitHub Issues)
>          Issue Type: Bug
>          Components: maven-scm-provider-mercurial (hg)
>    Affects Versions: 1.5
>            Reporter: Kevin Calcagno
>            Assignee: Olivier Lamy
>            Priority: Critical
>             Fix For: 1.6
>
>         Attachments: hg-checkout-no-tip.patch
>
>
> The checkout command for the Mercurial provider defaults to using "tip" as 
> the revision to clone if no explicit revision is specified, for example via 
> the scmVersion property when using the SCM plugin.
> This poses a problem for repositories with branches because tip always points 
> to the most recent changeset in the repository regardless of branch.  Thus 
> subsequent checkouts, even moments apart, using the same options could wind 
> up fetching completely different branches of code.
> A better option is to simply not pass a revision to Hg if no scmVersion is 
> specified.  This will cause Hg to resort to its default behavior: grab the 
> tip-most changeset from the default branch, or "tip" itself if the default 
> branch doesn't exist.
> One potential downside of this solution is that it will result in cloning the 
> entire repository rather than just tip and its required ancestors.  
> Predictable behavior is worth the cost, however, and users with large 
> repositories can work around that limitation by explicitly making "default" 
> their default value for scmVersion.  (Or "tip" if they want to preserve the 
> current behavior.)



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

Reply via email to