[JIRA] (JENKINS-13883) Support option to omit cleaning

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[JIRA] (JENKINS-13883) Support option to omit cleaning

JIRA noreply@jenkins-ci.org
Greg Temchenko created JENKINS-13883:
----------------------------------------

             Summary: Support option to omit cleaning
                 Key: JENKINS-13883
                 URL: https://issues.jenkins-ci.org/browse/JENKINS-13883
             Project: Jenkins
          Issue Type: Improvement
          Components: mercurial
            Reporter: Greg Temchenko
            Assignee: Kohsuke Kawaguchi


Currently there's an option "Clean Build" that does some extra cleaning
{code:java}
// 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");
            }
        }
{code}

But if this option isn't checked the plugin still clean all local modifications cause it calls "hg update" with --clean option.
{code}
// file: ./src/main/java/hudson/plugins/mercurial/MercurialSCM.java
updateExitCode = hg.run("update", "--clean", "--rev", getBranch(env)).pwd(repository).join();
{code}

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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jenkins-ci.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira