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

Support option to omit cleaning

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Major Major
    • mercurial-plugin
    • None

      Currently there's an option "Clean Build" that does some extra cleaning

      // file: ./src/main/java/hudson/plugins/mercurial/MercurialSCM.java
              if(clean) {
                  if (hg.cleanAll().pwd(repository).join() != 0) {
                      listener.error("Failed to clean unversioned files");
                      throw new AbortException("Failed to clean unversioned files");
                  }
              }
      

      But if this option isn't checked the plugin still clean all local modifications cause it calls "hg update" with --clean option.

      // file: ./src/main/java/hudson/plugins/mercurial/MercurialSCM.java
      updateExitCode = hg.run("update", "--clean", "--rev", getBranch(env)).pwd(repository).join();
      

      It would be useful to have an option not cleaning local modifications. If it's possible to do so when "Clean Build" unchecked it looks pretty simple to implement. But I'm not sure it's a proper way to do that.

            kohsuke Kohsuke Kawaguchi
            soid Greg Temchenko
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated: