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

Advanced tab UI always shows checkout option as "unchecked"

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Component/s: bazaar-plugin
    • Labels:
    • Environment:
      Plugin development and Linux
    • Similar Issues:
      Show 5 results

      Description

      The checkbox for the checkout option under the advanced tab will always show "off". To test:
      1) Click "Configure" on a job
      2) Setup Bazaar as SCM
      3) Click "Advanced"
      4) Select "checkout" option
      5) Click "Save" at bottom of page
      6) Click "Configure" on the job again
      7) Click "Advanced"
      The checkout option is no longer shown as selected.

        Attachments

          Activity

          Hide
          brook Brook Stevens added a comment -

          I believe the below diff will fix this problem. Let me know if you want me to submit this a different way (presuming it is correct). All this does is rename the method useCheckout to isCheckout.

          diff --git a/src/main/java/hudson/plugins/bazaar/BazaarSCM.java b/src/main/java/hudson/plugins/bazaar/BazaarSCM.java
          index 0be8b98..4740c29 100644
          — a/src/main/java/hudson/plugins/bazaar/BazaarSCM.java
          +++ b/src/main/java/hudson/plugins/bazaar/BazaarSCM.java
          @@ -93,7 +93,7 @@ public class BazaarSCM extends SCM implements Serializable {

          • True if we want to use checkout --lightweight
          • @return
            */
          • public boolean useCheckout() {
            + public boolean isCheckout() { return checkout; }

          @@ -267,7 +267,7 @@ public class BazaarSCM extends SCM implements Serializable {
          private boolean pull(AbstractBuild<?, ?> build, Launcher launcher, FilePath workspace, BuildListener listener) throws InterruptedException {
          ArgumentListBuilder args = new ArgumentListBuilder();
          String verb = null;

          • if (useCheckout()) {
            + if (isCheckout()) {
            verb = "update";
            args.add(getDescriptor().getBzrExe(),
            verb,
            @@ -314,7 +314,7 @@ public class BazaarSCM extends SCM implements Serializable { return false; }
          • String verb = useCheckout() ? "checkout" : "branch";
            + String verb = isCheckout() ? "checkout" : "branch";
            ArgumentListBuilder args = new ArgumentListBuilder();
            args.add(getDescriptor().getBzrExe(),
            verb,
          Show
          brook Brook Stevens added a comment - I believe the below diff will fix this problem. Let me know if you want me to submit this a different way (presuming it is correct). All this does is rename the method useCheckout to isCheckout. diff --git a/src/main/java/hudson/plugins/bazaar/BazaarSCM.java b/src/main/java/hudson/plugins/bazaar/BazaarSCM.java index 0be8b98..4740c29 100644 — a/src/main/java/hudson/plugins/bazaar/BazaarSCM.java +++ b/src/main/java/hudson/plugins/bazaar/BazaarSCM.java @@ -93,7 +93,7 @@ public class BazaarSCM extends SCM implements Serializable { True if we want to use checkout --lightweight @return */ public boolean useCheckout() { + public boolean isCheckout() { return checkout; } @@ -267,7 +267,7 @@ public class BazaarSCM extends SCM implements Serializable { private boolean pull(AbstractBuild<?, ?> build, Launcher launcher, FilePath workspace, BuildListener listener) throws InterruptedException { ArgumentListBuilder args = new ArgumentListBuilder(); String verb = null; if (useCheckout()) { + if (isCheckout()) { verb = "update"; args.add(getDescriptor().getBzrExe(), verb, @@ -314,7 +314,7 @@ public class BazaarSCM extends SCM implements Serializable { return false; } String verb = useCheckout() ? "checkout" : "branch"; + String verb = isCheckout() ? "checkout" : "branch"; ArgumentListBuilder args = new ArgumentListBuilder(); args.add(getDescriptor().getBzrExe(), verb,
          Hide
          sdirector Monty Taylor added a comment -

          Awesome, and the patch makes sense. I'm applying and pushing it up right now.

          Show
          sdirector Monty Taylor added a comment - Awesome, and the patch makes sense. I'm applying and pushing it up right now.
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Brook Stevens
          Path:
          src/main/java/hudson/plugins/bazaar/BazaarSCM.java
          http://jenkins-ci.org/commit/bazaar-plugin/ddcd518098dea0b9044ec25940fd81b9fb45d4bb
          Log:
          [FIXED JENKINS-12261] UI fix for checkout option

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Brook Stevens Path: src/main/java/hudson/plugins/bazaar/BazaarSCM.java http://jenkins-ci.org/commit/bazaar-plugin/ddcd518098dea0b9044ec25940fd81b9fb45d4bb Log: [FIXED JENKINS-12261] UI fix for checkout option
          Hide
          dogfood dogfood added a comment -

          Integrated in plugins_bazaar #32
          [FIXED JENKINS-12261] UI fix for checkout option

          Monty Taylor :
          Files :

          • src/main/java/hudson/plugins/bazaar/BazaarSCM.java
          Show
          dogfood dogfood added a comment - Integrated in plugins_bazaar #32 [FIXED JENKINS-12261] UI fix for checkout option Monty Taylor : Files : src/main/java/hudson/plugins/bazaar/BazaarSCM.java

            People

            • Assignee:
              sdirector Monty Taylor
              Reporter:
              brook Brook Stevens
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: