You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Kevin Calcagno (JIRA)" <ji...@codehaus.org> on 2011/05/20 07:43:22 UTC

[jira] Created: (SCM-621) Mercurial provider checkout should not default to tip

Mercurial provider checkout should not default to tip
-----------------------------------------------------

                 Key: SCM-621
                 URL: http://jira.codehaus.org/browse/SCM-621
             Project: Maven SCM
          Issue Type: Bug
          Components: maven-scm-provider-mercurial (hg)
    Affects Versions: 1.5
            Reporter: Kevin Calcagno
            Priority: Critical
         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 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-621) Mercurial provider checkout should not default to tip

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

Kevin Calcagno updated SCM-621:
-------------------------------

    Attachment: hg-checkout-no-tip.patch

Patch for the proposed solution

> Mercurial provider checkout should not default to tip
> -----------------------------------------------------
>
>                 Key: SCM-621
>                 URL: http://jira.codehaus.org/browse/SCM-621
>             Project: Maven SCM
>          Issue Type: Bug
>          Components: maven-scm-provider-mercurial (hg)
>    Affects Versions: 1.5
>            Reporter: Kevin Calcagno
>            Priority: Critical
>         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 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-621) Mercurial provider checkout should not default to tip

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

Olivier Lamy closed SCM-621.
----------------------------

    Resolution: Fixed

fixed r1207266.
Thanks!

> Mercurial provider checkout should not default to tip
> -----------------------------------------------------
>
>                 Key: SCM-621
>                 URL: https://jira.codehaus.org/browse/SCM-621
>             Project: Maven SCM
>          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 is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] Updated: (SCM-621) Mercurial provider checkout should not default to tip

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

Olivier Lamy updated SCM-621:
-----------------------------

    Fix Version/s: 1.6
         Assignee: Olivier Lamy

> Mercurial provider checkout should not default to tip
> -----------------------------------------------------
>
>                 Key: SCM-621
>                 URL: http://jira.codehaus.org/browse/SCM-621
>             Project: Maven SCM
>          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 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