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

Poor implementation of "clean build" feature for Hg-controlled workspaces

    XMLWordPrintable

    Details

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

      Description

      The current impl in MercurialSCM just does

      for( FilePath child : workspace.list((FileFilter)null) )

      { if(child.getName().equals(".hg")) continue; child.deleteRecursive(); }

      which deletes version-controlled files along with everything else, forcing a
      clean checkout the next time (much slower than a pull for a big repository), and
      fragmenting the disk.

      Better would be to run

      hg up -C .
      hg --config extensions.purge= clean --all

      which (1) reverts any accidental modifications made to source files by the
      previous build, (2) deletes all and only those files which are not listed in the
      Hg manifest for the current revision.

      I could implement the change if you agree.

        Attachments

          Issue Links

            Activity

            jglick Jesse Glick created issue -
            scm_issue_link SCM/JIRA link daemon made changes -
            Field Original Value New Value
            Status Open [ 1 ] Resolved [ 5 ]
            Resolution Fixed [ 1 ]
            abayer Andrew Bayer made changes -
            Status Resolved [ 5 ] Closed [ 6 ]
            elifarley Elifarley made changes -
            Link This issue is related to JENKINS-17385 [ JENKINS-17385 ]
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 132739 ] JNJira + In-Review [ 201630 ]

              People

              • Assignee:
                kohsuke Kohsuke Kawaguchi
                Reporter:
                jglick Jesse Glick
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: