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

.hg/hgrc file not closed, resulting in undeletable directory

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Blocker
    • Resolution: Fixed
    • Component/s: mercurial-plugin
    • Labels:
      None
    • Environment:
      Platform: PC, OS: Windows XP
    • Similar Issues:

      Description

      the following error:

      ERROR: Failed to clean the workspace
      java.io.IOException: Unable to delete C:\home\duns\riscure\hg\riscure-hudson\jobs\riscure-
      inspector-drivers-3.0.x\workspace\.hg\hgrc
      at hudson.Util.deleteFile(Util.java:195)
      at hudson.Util.deleteRecursive(Util.java:226)
      at hudson.Util.deleteContentsRecursive(Util.java:161)
      at hudson.Util.deleteRecursive(Util.java:225)
      at hudson.Util.deleteContentsRecursive(Util.java:161)
      at hudson.Util.deleteRecursive(Util.java:225)
      at hudson.FilePath$6.invoke(FilePath.java:460)
      at hudson.FilePath$6.invoke(FilePath.java:458)
      at hudson.FilePath.act(FilePath.java:388)
      at hudson.FilePath.deleteRecursive(FilePath.java:458)
      at hudson.plugins.mercurial.MercurialSCM.clone(MercurialSCM.java:317)
      at hudson.plugins.mercurial.MercurialSCM.checkout(MercurialSCM.java:211)
      at hudson.model.AbstractProject.checkout(AbstractProject.java:664)
      at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:260)
      at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:234)
      at hudson.model.Run.run(Run.java:793)
      at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:205)
      at hudson.model.ResourceController.execute(ResourceController.java:70)
      at hudson.model.Executor.run(Executor.java:88)
      finished: FAILURE

      happens because the .hg/hgrc file is not closed, while Hudson is checking if the workspace
      can be updated or needs a clone. It happens on "branches" since these (probably) need to be
      re-checked out.

      Add a r.close() statement to the HrRc.java file, ctor: HgRc(Reader input, File hgrc)
      and things start to work.

        Attachments

          Issue Links

            Activity

            wiredduns wiredduns created issue -
            Hide
            wiredduns wiredduns added a comment -

            related to issue 912

            Show
            wiredduns wiredduns added a comment - related to issue 912
            wiredduns wiredduns made changes -
            Field Original Value New Value
            Link This issue is blocking JENKINS-912 [ JENKINS-912 ]
            Hide
            kohsuke Kohsuke Kawaguchi added a comment -
            Show
            kohsuke Kohsuke Kawaguchi added a comment - Applied a change in http://www.nabble.com/Mercurial-plugin-issue-2420-td23754682.html . Fixed in 1.16.
            kohsuke Kohsuke Kawaguchi made changes -
            Status Open [ 1 ] Resolved [ 5 ]
            Resolution Fixed [ 1 ]
            Hide
            jglick Jesse Glick added a comment -
                • Issue 912 has been marked as a duplicate of this issue. ***
            Show
            jglick Jesse Glick added a comment - Issue 912 has been marked as a duplicate of this issue. ***
            jglick Jesse Glick made changes -
            Link This issue is duplicated by JENKINS-912 [ JENKINS-912 ]
            abayer Andrew Bayer made changes -
            Status Resolved [ 5 ] Closed [ 6 ]
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 132493 ] JNJira + In-Review [ 201454 ]

              People

              • Assignee:
                kohsuke Kohsuke Kawaguchi
                Reporter:
                wiredduns wiredduns
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: