Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-18988

JGit in Git plugin 2.0 beta reports CheckoutConflictException, command line Git does not

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: git-plugin
    • Labels:
    • Environment:
      Jenkins 1.509.2 slave on Windows Server 2008 R2 wih JDK 1.7.0_25
    • Similar Issues:

      Description

      After several successful builds with the Git plugin 2.0 beta, one of my jobs failed to complete the checkout. It failed with a CheckoutConflictException and a stack trace.

      When I switched the job back to the command line git, with no intervening change to the central repository and with no change to the slave or its workspace, the job completed successfully.

      The console log shows:

      selected Git installation does not exists. Using Default
      Fetching changes from the remote Git repository
      Checking out Revision 3e9743ae51b0c098a3e484af09670c7b65801bff (origin/port-linux)
      FATAL: Could not checkout 3e9743ae51b0c098a3e484af09670c7b65801bff
      hudson.plugins.git.GitException: Could not checkout 3e9743ae51b0c098a3e484af09670c7b65801bff
      at org.jenkinsci.plugins.gitclient.JGitAPIImpl.checkout(JGitAPIImpl.java:164)
      at org.jenkinsci.plugins.gitclient.JGitAPIImpl.checkoutBranch(JGitAPIImpl.java:194)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at hudson.remoting.RemoteInvocationHandler$RPCRequest.perform(RemoteInvocationHandler.java:275)
      at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:256)
      at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:215)
      at hudson.remoting.UserRequest.perform(UserRequest.java:118)
      at hudson.remoting.UserRequest.perform(UserRequest.java:48)
      at hudson.remoting.Request$2.run(Request.java:326)
      at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
      at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
      at java.util.concurrent.FutureTask.run(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      at hudson.remoting.Engine$1$1.run(Engine.java:58)
      at java.lang.Thread.run(Unknown Source)
      Caused by: org.eclipse.jgit.api.errors.CheckoutConflictException: Checkout conflict with files:
      README-port-linux.org
      at org.eclipse.jgit.api.CheckoutCommand.call(CheckoutCommand.java:244)
      at org.jenkinsci.plugins.gitclient.JGitAPIImpl.checkout(JGitAPIImpl.java:162)
      ... 18 more
      Caused by: org.eclipse.jgit.errors.CheckoutConflictException: Checkout conflict with files:
      README-port-linux.org
      at org.eclipse.jgit.dircache.DirCacheCheckout.doCheckout(DirCacheCheckout.java:411)
      at org.eclipse.jgit.dircache.DirCacheCheckout.checkout(DirCacheCheckout.java:391)
      at org.eclipse.jgit.api.CheckoutCommand.call(CheckoutCommand.java:240)
      ... 19 more

        Attachments

          Activity

          Hide
          markewaite Mark Waite added a comment -

          The file mentioned in the message changes frequently in the central repository, but only changes in the slave workspace when the git plugin performs a pull (or a fetch + merge). There are no local changes in that file and no modifications made to it during the build.

          Show
          markewaite Mark Waite added a comment - The file mentioned in the message changes frequently in the central repository, but only changes in the slave workspace when the git plugin performs a pull (or a fetch + merge). There are no local changes in that file and no modifications made to it during the build.
          Hide
          kohsuke Kohsuke Kawaguchi added a comment -

          Fixed in 7001a2e7b38e0dec539ca39dc62c767a968d80dc

          Show
          kohsuke Kohsuke Kawaguchi added a comment - Fixed in 7001a2e7b38e0dec539ca39dc62c767a968d80dc
          Hide
          markewaite Mark Waite added a comment -

          Verified fixed in git plugin 2.0 with git client plugin 1.4.5 and 1.4.6

          Show
          markewaite Mark Waite added a comment - Verified fixed in git plugin 2.0 with git client plugin 1.4.5 and 1.4.6
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Kohsuke Kawaguchi
          Path:
          src/main/java/org/jenkinsci/plugins/gitclient/JGitAPIImpl.java
          src/test/java/org/jenkinsci/plugins/gitclient/GitAPITestCase.java
          http://jenkins-ci.org/commit/git-client-plugin/7001a2e7b38e0dec539ca39dc62c767a968d80dc
          Log:
          [FIXED JENKINS-18988]

          CGit's checkout --force is behaving differently from JGit's checkout --force, so handle the difference by ourselves

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Kohsuke Kawaguchi Path: src/main/java/org/jenkinsci/plugins/gitclient/JGitAPIImpl.java src/test/java/org/jenkinsci/plugins/gitclient/GitAPITestCase.java http://jenkins-ci.org/commit/git-client-plugin/7001a2e7b38e0dec539ca39dc62c767a968d80dc Log: [FIXED JENKINS-18988] CGit's checkout --force is behaving differently from JGit's checkout --force, so handle the difference by ourselves

            People

            • Assignee:
              kohsuke Kohsuke Kawaguchi
              Reporter:
              markewaite Mark Waite
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: