You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Daniel Strassenburg (JIRA)" <ji...@codehaus.org> on 2010/11/19 11:16:03 UTC

[jira] Created: (SCM-584) Checkout branch with Git uses unfamiliar command sequence which leads to errors during checkout

Checkout branch with Git uses unfamiliar command sequence which leads to errors during checkout
-----------------------------------------------------------------------------------------------

                 Key: SCM-584
                 URL: http://jira.codehaus.org/browse/SCM-584
             Project: Maven SCM
          Issue Type: Bug
          Components: maven-scm-provider-git
    Affects Versions: 1.4
            Reporter: Daniel Strassenburg
            Priority: Critical


I want to checkout a specific branch from my git repo using the maven-scm-plugin. The plugin first clones the repo and gets the default branch as selected in gitorious. After that the plugin executes git pull ... mybranch which works fine as long as there are no merge conflicts between current branch and branch to checkout. In the case of any conflict an error occurs.


The git checkout -b command should be used instead.


{noformat}
[INFO] Working directory: <a_dir>
[INFO] Executing: /bin/sh -c cd /home/maven-proj/target/deploy-workspace && git fetch git://gitorious/<...>/my-proj.git
[INFO] Working directory: <a_dir>
[INFO] Executing: /bin/sh -c cd  /home/maven-proj/target/deploy-workspace && git checkout HEAD
[INFO] Working directory: <a_dir>
[INFO] Executing: /bin/sh -c cd /home/maven-proj/target/deploy-workspace && git ls-files
[INFO] Working directory: <a_dir>
[INFO] 
[INFO] --- maven-scm-plugin:1.4:update (switch-branch) 
[INFO] Executing: /bin/sh -c cd /home/maven-proj/target/deploy-workspace && git pull git://gitorious/<..>/deploy.git mysql55

[WARNING] failed to update git, return code 1
[ERROR] Provider message:
[ERROR] The git-pull origin master command failed.
[ERROR] Command output:
[ERROR] From git://gitorious/<...>/deploy
 * branch            mysql55    -> FETCH_HEAD


{noformat}

-- 
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] (SCM-584) Checkout branch with Git uses unfamiliar command sequence which leads to errors during checkout

Posted by "Ancoron Luciferis (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/SCM-584?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=297200#comment-297200 ] 

Ancoron Luciferis commented on SCM-584:
---------------------------------------

Using the latest 1.7-SNAPSHOT I now see the same output as with the patch applied to 1.6.
                
> Checkout branch with Git uses unfamiliar command sequence which leads to errors during checkout
> -----------------------------------------------------------------------------------------------
>
>                 Key: SCM-584
>                 URL: https://jira.codehaus.org/browse/SCM-584
>             Project: Maven SCM
>          Issue Type: Bug
>          Components: maven-scm-provider-git
>    Affects Versions: 1.4
>            Reporter: Daniel Strassenburg
>            Priority: Critical
>         Attachments: SCM-584.patch, SCM-584-test-prj.zip
>
>
> I want to checkout a specific branch from my git repo using the maven-scm-plugin. The plugin first clones the repo and gets the default branch as selected in gitorious. After that the plugin executes git pull ... mybranch which works fine as long as there are no merge conflicts between current branch and branch to checkout. In the case of any conflict an error occurs.
> The git checkout -b command should be used instead.
> {noformat}
> [INFO] Working directory: <a_dir>
> [INFO] Executing: /bin/sh -c cd /home/maven-proj/target/deploy-workspace && git fetch git://gitorious/<...>/my-proj.git
> [INFO] Working directory: <a_dir>
> [INFO] Executing: /bin/sh -c cd  /home/maven-proj/target/deploy-workspace && git checkout HEAD
> [INFO] Working directory: <a_dir>
> [INFO] Executing: /bin/sh -c cd /home/maven-proj/target/deploy-workspace && git ls-files
> [INFO] Working directory: <a_dir>
> [INFO] 
> [INFO] --- maven-scm-plugin:1.4:update (switch-branch) 
> [INFO] Executing: /bin/sh -c cd /home/maven-proj/target/deploy-workspace && git pull git://gitorious/<..>/deploy.git mysql55
> [WARNING] failed to update git, return code 1
> [ERROR] Provider message:
> [ERROR] The git-pull origin master command failed.
> [ERROR] Command output:
> [ERROR] From git://gitorious/<...>/deploy
>  * branch            mysql55    -> FETCH_HEAD
> {noformat}

--
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

        

[jira] (SCM-584) Checkout branch with Git uses unfamiliar command sequence which leads to errors during checkout

Posted by "Ancoron Luciferis (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/SCM-584?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=296428#comment-296428 ] 

Ancoron Luciferis commented on SCM-584:
---------------------------------------

Patch availability for about 1,5 years and still not integrated... wow!

But furthermore it is really strange why this issue appeared in the first place. The initial developer(s) of the git provider must have been blind. How else can you explain that someone wanted to do a 'git pull' for switching to a branch?! As every documentation says 'git pull' is just a shortcut for 'git fetch' + 'git merge'.

>From the man page:
{quote}
[...] git pull runs git fetch with the given parameters and calls git merge to merge the retrieved branch heads into the current branch. [...]
{quote}

\\
Even if it worked for the developer in the first place then only by luck.
                
> Checkout branch with Git uses unfamiliar command sequence which leads to errors during checkout
> -----------------------------------------------------------------------------------------------
>
>                 Key: SCM-584
>                 URL: https://jira.codehaus.org/browse/SCM-584
>             Project: Maven SCM
>          Issue Type: Bug
>          Components: maven-scm-provider-git
>    Affects Versions: 1.4
>            Reporter: Daniel Strassenburg
>            Priority: Critical
>         Attachments: SCM-584.patch, SCM-584-test-prj.zip
>
>
> I want to checkout a specific branch from my git repo using the maven-scm-plugin. The plugin first clones the repo and gets the default branch as selected in gitorious. After that the plugin executes git pull ... mybranch which works fine as long as there are no merge conflicts between current branch and branch to checkout. In the case of any conflict an error occurs.
> The git checkout -b command should be used instead.
> {noformat}
> [INFO] Working directory: <a_dir>
> [INFO] Executing: /bin/sh -c cd /home/maven-proj/target/deploy-workspace && git fetch git://gitorious/<...>/my-proj.git
> [INFO] Working directory: <a_dir>
> [INFO] Executing: /bin/sh -c cd  /home/maven-proj/target/deploy-workspace && git checkout HEAD
> [INFO] Working directory: <a_dir>
> [INFO] Executing: /bin/sh -c cd /home/maven-proj/target/deploy-workspace && git ls-files
> [INFO] Working directory: <a_dir>
> [INFO] 
> [INFO] --- maven-scm-plugin:1.4:update (switch-branch) 
> [INFO] Executing: /bin/sh -c cd /home/maven-proj/target/deploy-workspace && git pull git://gitorious/<..>/deploy.git mysql55
> [WARNING] failed to update git, return code 1
> [ERROR] Provider message:
> [ERROR] The git-pull origin master command failed.
> [ERROR] Command output:
> [ERROR] From git://gitorious/<...>/deploy
>  * branch            mysql55    -> FETCH_HEAD
> {noformat}

--
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

        

[jira] (SCM-584) Checkout branch with Git uses unfamiliar command sequence which leads to errors during checkout

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

Olivier Lamy commented on SCM-584:
----------------------------------

Having a look at the code and that looks to be fixed (but issue not closed).
@Ancoron Luciferis: can you try with last SNAPSHOT ?
                
> Checkout branch with Git uses unfamiliar command sequence which leads to errors during checkout
> -----------------------------------------------------------------------------------------------
>
>                 Key: SCM-584
>                 URL: https://jira.codehaus.org/browse/SCM-584
>             Project: Maven SCM
>          Issue Type: Bug
>          Components: maven-scm-provider-git
>    Affects Versions: 1.4
>            Reporter: Daniel Strassenburg
>            Priority: Critical
>         Attachments: SCM-584.patch, SCM-584-test-prj.zip
>
>
> I want to checkout a specific branch from my git repo using the maven-scm-plugin. The plugin first clones the repo and gets the default branch as selected in gitorious. After that the plugin executes git pull ... mybranch which works fine as long as there are no merge conflicts between current branch and branch to checkout. In the case of any conflict an error occurs.
> The git checkout -b command should be used instead.
> {noformat}
> [INFO] Working directory: <a_dir>
> [INFO] Executing: /bin/sh -c cd /home/maven-proj/target/deploy-workspace && git fetch git://gitorious/<...>/my-proj.git
> [INFO] Working directory: <a_dir>
> [INFO] Executing: /bin/sh -c cd  /home/maven-proj/target/deploy-workspace && git checkout HEAD
> [INFO] Working directory: <a_dir>
> [INFO] Executing: /bin/sh -c cd /home/maven-proj/target/deploy-workspace && git ls-files
> [INFO] Working directory: <a_dir>
> [INFO] 
> [INFO] --- maven-scm-plugin:1.4:update (switch-branch) 
> [INFO] Executing: /bin/sh -c cd /home/maven-proj/target/deploy-workspace && git pull git://gitorious/<..>/deploy.git mysql55
> [WARNING] failed to update git, return code 1
> [ERROR] Provider message:
> [ERROR] The git-pull origin master command failed.
> [ERROR] Command output:
> [ERROR] From git://gitorious/<...>/deploy
>  * branch            mysql55    -> FETCH_HEAD
> {noformat}

--
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

        

[jira] (SCM-584) Checkout branch with Git uses unfamiliar command sequence which leads to errors during checkout

Posted by "Ancoron Luciferis (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/SCM-584?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=296435#comment-296435 ] 

Ancoron Luciferis commented on SCM-584:
---------------------------------------

OK, I can confirm that the patch indeed fixes this problem but then the command sequence still is awful:

{noformat}
[INFO] [scm:checkout {execution: export-inplace}]
[INFO] Removing /srv/dev/test/target/upstream-sources
[INFO] Executing: /bin/sh -c cd /srv/dev/test/target && git clone --branch develop http://git.myserver.localdomain/other.git /srv/dev/test/target/upstream-sources
[INFO] Working directory: /srv/dev/test/target
[INFO] Executing: /bin/sh -c cd /tmp && git ls-remote http://git.myserver.localdomain/other.git
[INFO] Working directory: /tmp
[INFO] Executing: /bin/sh -c cd /srv/dev/test/target/upstream-sources && git pull http://git.myserver.localdomain/other.git develop:develop
[INFO] Working directory: /srv/dev/test/target/upstream-sources
[INFO] Executing: /bin/sh -c cd /srv/dev/test/target/upstream-sources && git checkout develop
[INFO] Working directory: /srv/dev/test/target/upstream-sources
[INFO] Executing: /bin/sh -c cd /srv/dev/test/target/upstream-sources && git ls-files
[INFO] Working directory: /srv/dev/test/target/upstream-sources
{noformat}

\\
What I would expect is this:
{noformat}
[INFO] [scm:checkout {execution: export-inplace}]
[INFO] Removing /srv/dev/test/target/upstream-sources
[INFO] Executing: /bin/sh -c cd /srv/dev/test/target && git clone --branch develop http://git.myserver.localdomain/other.git /srv/dev/test/target/upstream-sources
[INFO] Working directory: /srv/dev/test/target
[INFO] Executing: /bin/sh -c cd /tmp && git ls-remote http://git.myserver.localdomain/other.git
[INFO] Working directory: /tmp
[INFO] Executing: /bin/sh -c cd /srv/dev/test/target/upstream-sources && git ls-files
[INFO] Working directory: /srv/dev/test/target/upstream-sources
{noformat}

\\
...so drop the additional pull and checkout - doesn't make any sense in git, really.
                
> Checkout branch with Git uses unfamiliar command sequence which leads to errors during checkout
> -----------------------------------------------------------------------------------------------
>
>                 Key: SCM-584
>                 URL: https://jira.codehaus.org/browse/SCM-584
>             Project: Maven SCM
>          Issue Type: Bug
>          Components: maven-scm-provider-git
>    Affects Versions: 1.4
>            Reporter: Daniel Strassenburg
>            Priority: Critical
>         Attachments: SCM-584.patch, SCM-584-test-prj.zip
>
>
> I want to checkout a specific branch from my git repo using the maven-scm-plugin. The plugin first clones the repo and gets the default branch as selected in gitorious. After that the plugin executes git pull ... mybranch which works fine as long as there are no merge conflicts between current branch and branch to checkout. In the case of any conflict an error occurs.
> The git checkout -b command should be used instead.
> {noformat}
> [INFO] Working directory: <a_dir>
> [INFO] Executing: /bin/sh -c cd /home/maven-proj/target/deploy-workspace && git fetch git://gitorious/<...>/my-proj.git
> [INFO] Working directory: <a_dir>
> [INFO] Executing: /bin/sh -c cd  /home/maven-proj/target/deploy-workspace && git checkout HEAD
> [INFO] Working directory: <a_dir>
> [INFO] Executing: /bin/sh -c cd /home/maven-proj/target/deploy-workspace && git ls-files
> [INFO] Working directory: <a_dir>
> [INFO] 
> [INFO] --- maven-scm-plugin:1.4:update (switch-branch) 
> [INFO] Executing: /bin/sh -c cd /home/maven-proj/target/deploy-workspace && git pull git://gitorious/<..>/deploy.git mysql55
> [WARNING] failed to update git, return code 1
> [ERROR] Provider message:
> [ERROR] The git-pull origin master command failed.
> [ERROR] Command output:
> [ERROR] From git://gitorious/<...>/deploy
>  * branch            mysql55    -> FETCH_HEAD
> {noformat}

--
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

        

[jira] Updated: (SCM-584) Checkout branch with Git uses unfamiliar command sequence which leads to errors during checkout

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

Sebastian Annies updated SCM-584:
---------------------------------

    Attachment: SCM-584.patch

Patches the problem by appending the --branch parameter to the git command in case the version is a branch. This makes sure that a subsequent pull does what intended!

> Checkout branch with Git uses unfamiliar command sequence which leads to errors during checkout
> -----------------------------------------------------------------------------------------------
>
>                 Key: SCM-584
>                 URL: http://jira.codehaus.org/browse/SCM-584
>             Project: Maven SCM
>          Issue Type: Bug
>          Components: maven-scm-provider-git
>    Affects Versions: 1.4
>            Reporter: Daniel Strassenburg
>            Priority: Critical
>         Attachments: SCM-584-test-prj.zip, SCM-584.patch
>
>
> I want to checkout a specific branch from my git repo using the maven-scm-plugin. The plugin first clones the repo and gets the default branch as selected in gitorious. After that the plugin executes git pull ... mybranch which works fine as long as there are no merge conflicts between current branch and branch to checkout. In the case of any conflict an error occurs.
> The git checkout -b command should be used instead.
> {noformat}
> [INFO] Working directory: <a_dir>
> [INFO] Executing: /bin/sh -c cd /home/maven-proj/target/deploy-workspace && git fetch git://gitorious/<...>/my-proj.git
> [INFO] Working directory: <a_dir>
> [INFO] Executing: /bin/sh -c cd  /home/maven-proj/target/deploy-workspace && git checkout HEAD
> [INFO] Working directory: <a_dir>
> [INFO] Executing: /bin/sh -c cd /home/maven-proj/target/deploy-workspace && git ls-files
> [INFO] Working directory: <a_dir>
> [INFO] 
> [INFO] --- maven-scm-plugin:1.4:update (switch-branch) 
> [INFO] Executing: /bin/sh -c cd /home/maven-proj/target/deploy-workspace && git pull git://gitorious/<..>/deploy.git mysql55
> [WARNING] failed to update git, return code 1
> [ERROR] Provider message:
> [ERROR] The git-pull origin master command failed.
> [ERROR] Command output:
> [ERROR] From git://gitorious/<...>/deploy
>  * branch            mysql55    -> FETCH_HEAD
> {noformat}

-- 
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] (SCM-584) Checkout branch with Git uses unfamiliar command sequence which leads to errors during checkout

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

Olivier Lamy updated SCM-584:
-----------------------------

    Fix Version/s: 1.7
         Assignee: Olivier Lamy
    
> Checkout branch with Git uses unfamiliar command sequence which leads to errors during checkout
> -----------------------------------------------------------------------------------------------
>
>                 Key: SCM-584
>                 URL: https://jira.codehaus.org/browse/SCM-584
>             Project: Maven SCM
>          Issue Type: Bug
>          Components: maven-scm-provider-git
>    Affects Versions: 1.4
>            Reporter: Daniel Strassenburg
>            Assignee: Olivier Lamy
>            Priority: Critical
>             Fix For: 1.7
>
>         Attachments: SCM-584.patch, SCM-584-test-prj.zip
>
>
> I want to checkout a specific branch from my git repo using the maven-scm-plugin. The plugin first clones the repo and gets the default branch as selected in gitorious. After that the plugin executes git pull ... mybranch which works fine as long as there are no merge conflicts between current branch and branch to checkout. In the case of any conflict an error occurs.
> The git checkout -b command should be used instead.
> {noformat}
> [INFO] Working directory: <a_dir>
> [INFO] Executing: /bin/sh -c cd /home/maven-proj/target/deploy-workspace && git fetch git://gitorious/<...>/my-proj.git
> [INFO] Working directory: <a_dir>
> [INFO] Executing: /bin/sh -c cd  /home/maven-proj/target/deploy-workspace && git checkout HEAD
> [INFO] Working directory: <a_dir>
> [INFO] Executing: /bin/sh -c cd /home/maven-proj/target/deploy-workspace && git ls-files
> [INFO] Working directory: <a_dir>
> [INFO] 
> [INFO] --- maven-scm-plugin:1.4:update (switch-branch) 
> [INFO] Executing: /bin/sh -c cd /home/maven-proj/target/deploy-workspace && git pull git://gitorious/<..>/deploy.git mysql55
> [WARNING] failed to update git, return code 1
> [ERROR] Provider message:
> [ERROR] The git-pull origin master command failed.
> [ERROR] Command output:
> [ERROR] From git://gitorious/<...>/deploy
>  * branch            mysql55    -> FETCH_HEAD
> {noformat}

--
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

        

[jira] (SCM-584) Checkout branch with Git uses unfamiliar command sequence which leads to errors during checkout

Posted by "Mark Struberg (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/SCM-584?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=290930#comment-290930 ] 

Mark Struberg commented on SCM-584:
-----------------------------------

patch looks good, thanks Sebastian!
                
> Checkout branch with Git uses unfamiliar command sequence which leads to errors during checkout
> -----------------------------------------------------------------------------------------------
>
>                 Key: SCM-584
>                 URL: https://jira.codehaus.org/browse/SCM-584
>             Project: Maven SCM
>          Issue Type: Bug
>          Components: maven-scm-provider-git
>    Affects Versions: 1.4
>            Reporter: Daniel Strassenburg
>            Priority: Critical
>         Attachments: SCM-584.patch, SCM-584-test-prj.zip
>
>
> I want to checkout a specific branch from my git repo using the maven-scm-plugin. The plugin first clones the repo and gets the default branch as selected in gitorious. After that the plugin executes git pull ... mybranch which works fine as long as there are no merge conflicts between current branch and branch to checkout. In the case of any conflict an error occurs.
> The git checkout -b command should be used instead.
> {noformat}
> [INFO] Working directory: <a_dir>
> [INFO] Executing: /bin/sh -c cd /home/maven-proj/target/deploy-workspace && git fetch git://gitorious/<...>/my-proj.git
> [INFO] Working directory: <a_dir>
> [INFO] Executing: /bin/sh -c cd  /home/maven-proj/target/deploy-workspace && git checkout HEAD
> [INFO] Working directory: <a_dir>
> [INFO] Executing: /bin/sh -c cd /home/maven-proj/target/deploy-workspace && git ls-files
> [INFO] Working directory: <a_dir>
> [INFO] 
> [INFO] --- maven-scm-plugin:1.4:update (switch-branch) 
> [INFO] Executing: /bin/sh -c cd /home/maven-proj/target/deploy-workspace && git pull git://gitorious/<..>/deploy.git mysql55
> [WARNING] failed to update git, return code 1
> [ERROR] Provider message:
> [ERROR] The git-pull origin master command failed.
> [ERROR] Command output:
> [ERROR] From git://gitorious/<...>/deploy
>  * branch            mysql55    -> FETCH_HEAD
> {noformat}

--
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

        

[jira] Commented: (SCM-584) Checkout branch with Git uses unfamiliar command sequence which leads to errors during checkout

Posted by "Daniel Strassenburg (JIRA)" <ji...@codehaus.org>.
    [ http://jira.codehaus.org/browse/SCM-584?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=243729#action_243729 ] 

Daniel Strassenburg commented on SCM-584:
-----------------------------------------

Before the git fetch listed above a git clone is performed:

{noformat}
Executing: /bin/sh -c cd <a_dir> && git clone git://gitorious/<...>/deploy.git/home/maven-proj/target/deploy-workspace
{noformat}

> Checkout branch with Git uses unfamiliar command sequence which leads to errors during checkout
> -----------------------------------------------------------------------------------------------
>
>                 Key: SCM-584
>                 URL: http://jira.codehaus.org/browse/SCM-584
>             Project: Maven SCM
>          Issue Type: Bug
>          Components: maven-scm-provider-git
>    Affects Versions: 1.4
>            Reporter: Daniel Strassenburg
>            Priority: Critical
>
> I want to checkout a specific branch from my git repo using the maven-scm-plugin. The plugin first clones the repo and gets the default branch as selected in gitorious. After that the plugin executes git pull ... mybranch which works fine as long as there are no merge conflicts between current branch and branch to checkout. In the case of any conflict an error occurs.
> The git checkout -b command should be used instead.
> {noformat}
> [INFO] Working directory: <a_dir>
> [INFO] Executing: /bin/sh -c cd /home/maven-proj/target/deploy-workspace && git fetch git://gitorious/<...>/my-proj.git
> [INFO] Working directory: <a_dir>
> [INFO] Executing: /bin/sh -c cd  /home/maven-proj/target/deploy-workspace && git checkout HEAD
> [INFO] Working directory: <a_dir>
> [INFO] Executing: /bin/sh -c cd /home/maven-proj/target/deploy-workspace && git ls-files
> [INFO] Working directory: <a_dir>
> [INFO] 
> [INFO] --- maven-scm-plugin:1.4:update (switch-branch) 
> [INFO] Executing: /bin/sh -c cd /home/maven-proj/target/deploy-workspace && git pull git://gitorious/<..>/deploy.git mysql55
> [WARNING] failed to update git, return code 1
> [ERROR] Provider message:
> [ERROR] The git-pull origin master command failed.
> [ERROR] Command output:
> [ERROR] From git://gitorious/<...>/deploy
>  * branch            mysql55    -> FETCH_HEAD
> {noformat}

-- 
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] (SCM-584) Checkout branch with Git uses unfamiliar command sequence which leads to errors during checkout

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

Olivier Lamy closed SCM-584.
----------------------------

    Resolution: Fixed
    
> Checkout branch with Git uses unfamiliar command sequence which leads to errors during checkout
> -----------------------------------------------------------------------------------------------
>
>                 Key: SCM-584
>                 URL: https://jira.codehaus.org/browse/SCM-584
>             Project: Maven SCM
>          Issue Type: Bug
>          Components: maven-scm-provider-git
>    Affects Versions: 1.4
>            Reporter: Daniel Strassenburg
>            Assignee: Olivier Lamy
>            Priority: Critical
>             Fix For: 1.7
>
>         Attachments: SCM-584.patch, SCM-584-test-prj.zip
>
>
> I want to checkout a specific branch from my git repo using the maven-scm-plugin. The plugin first clones the repo and gets the default branch as selected in gitorious. After that the plugin executes git pull ... mybranch which works fine as long as there are no merge conflicts between current branch and branch to checkout. In the case of any conflict an error occurs.
> The git checkout -b command should be used instead.
> {noformat}
> [INFO] Working directory: <a_dir>
> [INFO] Executing: /bin/sh -c cd /home/maven-proj/target/deploy-workspace && git fetch git://gitorious/<...>/my-proj.git
> [INFO] Working directory: <a_dir>
> [INFO] Executing: /bin/sh -c cd  /home/maven-proj/target/deploy-workspace && git checkout HEAD
> [INFO] Working directory: <a_dir>
> [INFO] Executing: /bin/sh -c cd /home/maven-proj/target/deploy-workspace && git ls-files
> [INFO] Working directory: <a_dir>
> [INFO] 
> [INFO] --- maven-scm-plugin:1.4:update (switch-branch) 
> [INFO] Executing: /bin/sh -c cd /home/maven-proj/target/deploy-workspace && git pull git://gitorious/<..>/deploy.git mysql55
> [WARNING] failed to update git, return code 1
> [ERROR] Provider message:
> [ERROR] The git-pull origin master command failed.
> [ERROR] Command output:
> [ERROR] From git://gitorious/<...>/deploy
>  * branch            mysql55    -> FETCH_HEAD
> {noformat}

--
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

        

[jira] Updated: (SCM-584) Checkout branch with Git uses unfamiliar command sequence which leads to errors during checkout

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

Sebastian Annies updated SCM-584:
---------------------------------

    Attachment: SCM-584-test-prj.zip

A little project showing the error. I would have written a regular test but I didn't understand the test framework. To see the error unzip and execute

{noformat}
mvn install
{noformat}

> Checkout branch with Git uses unfamiliar command sequence which leads to errors during checkout
> -----------------------------------------------------------------------------------------------
>
>                 Key: SCM-584
>                 URL: http://jira.codehaus.org/browse/SCM-584
>             Project: Maven SCM
>          Issue Type: Bug
>          Components: maven-scm-provider-git
>    Affects Versions: 1.4
>            Reporter: Daniel Strassenburg
>            Priority: Critical
>         Attachments: SCM-584-test-prj.zip
>
>
> I want to checkout a specific branch from my git repo using the maven-scm-plugin. The plugin first clones the repo and gets the default branch as selected in gitorious. After that the plugin executes git pull ... mybranch which works fine as long as there are no merge conflicts between current branch and branch to checkout. In the case of any conflict an error occurs.
> The git checkout -b command should be used instead.
> {noformat}
> [INFO] Working directory: <a_dir>
> [INFO] Executing: /bin/sh -c cd /home/maven-proj/target/deploy-workspace && git fetch git://gitorious/<...>/my-proj.git
> [INFO] Working directory: <a_dir>
> [INFO] Executing: /bin/sh -c cd  /home/maven-proj/target/deploy-workspace && git checkout HEAD
> [INFO] Working directory: <a_dir>
> [INFO] Executing: /bin/sh -c cd /home/maven-proj/target/deploy-workspace && git ls-files
> [INFO] Working directory: <a_dir>
> [INFO] 
> [INFO] --- maven-scm-plugin:1.4:update (switch-branch) 
> [INFO] Executing: /bin/sh -c cd /home/maven-proj/target/deploy-workspace && git pull git://gitorious/<..>/deploy.git mysql55
> [WARNING] failed to update git, return code 1
> [ERROR] Provider message:
> [ERROR] The git-pull origin master command failed.
> [ERROR] Command output:
> [ERROR] From git://gitorious/<...>/deploy
>  * branch            mysql55    -> FETCH_HEAD
> {noformat}

-- 
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