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

Cannot use a single file name as module for retrieval in CVS Plugin version 2.5

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved (View Workflow)
    • Major
    • Resolution: Fixed
    • cvs-plugin
    • None

    Description

      CVS Plugin version 2.5
      Jenkins 1.475

      Cannot use a single file name as module for retrieval.
      "Module Name = install/mvbin/pkginfo" along with 2 more modules was tried.
      Here 'pkginfo' is a file.

      Works fine when i retrieve install/mvbin.

      The same used to work fine with CVS Plugin version 1.6

      Attachments

        Activity

          Deepak: please confirm what you're seeing when it doesn't work. I suspect the first checkout works, but subsequent updates checkout all other files at the same level, and any subdirectories. Is this correct?

          mc1arke Michael Clarke added a comment - Deepak: please confirm what you're seeing when it doesn't work. I suspect the first checkout works, but subsequent updates checkout all other files at the same level, and any subdirectories. Is this correct?
          deepak Deepak Mahale added a comment - - edited

          Michael:
          Thanks for prompt reply,

          I'm checking out from the following dir structure

          install
            mvbin pkginfo
              <file2>
              <file3>
              <file4>
              <file5>
              <file6>
           
            mvbinpro pkginfo
              <file2>
              <file3>
              <file4>
              <file5>
              <file6>
           
          <parent2>
            <child_dir> <grandchild_dir>

          Configuration which works fine has module's as follows

          CVS Plugin Version 1.6
          Module: install/mvbin/pkginfo install/mvbinpro/pkginfo <parent2>/<child_dir>/<grandchild_dir>
          NOTE: Whitespace separated list
          NOTE: It used to retrieve each pkginfo file in proper directory structure

          CVS Plugin Version 2.5
          Module 1: install/mvbin
          Module 2: install/mvbinpro
          Module 3: <parent2>/<child_dir>/<grandchild_dir>
          NOTE: Here 'Module 3' checks out properly
          NOTE: In place of pkginfo file, i see pkginfo directories created for 'Module 1' & 'Module 2'

          Configuration which doesn't work has module's as follows

          CVS Plugin Version 2.5
          Module 1: install/mvbin/pkginfo
          Module 2: install/mvbinpro/pkginfo
          Module 3: <parent2>/<child_dir>/<grandchild_dir>

          As the mvbin and mvbinpro directories contain only a few files in my case, it doesn't make a big difference to checkout the directories, so i've used that as a workaround.

          But if all i need is one file from a directory containing 2,000 files, then it'll be a big loss in terms of efficiency and time.

          Thanks again & Regards
          Deepak

          deepak Deepak Mahale added a comment - - edited Michael: Thanks for prompt reply, I'm checking out from the following dir structure install   mvbin pkginfo     <file2>     <file3>     <file4>     <file5>     <file6>     mvbinpro pkginfo     <file2>     <file3>     <file4>     <file5>     <file6>   <parent2>   <child_dir> <grandchild_dir> Configuration which works fine has module's as follows CVS Plugin Version 1.6 Module: install/mvbin/pkginfo install/mvbinpro/pkginfo <parent2>/<child_dir>/<grandchild_dir> NOTE: Whitespace separated list NOTE: It used to retrieve each pkginfo file in proper directory structure CVS Plugin Version 2.5 Module 1: install/mvbin Module 2: install/mvbinpro Module 3: <parent2>/<child_dir>/<grandchild_dir> NOTE: Here 'Module 3' checks out properly NOTE: In place of pkginfo file, i see pkginfo directories created for 'Module 1' & 'Module 2' Configuration which doesn't work has module's as follows CVS Plugin Version 2.5 Module 1: install/mvbin/pkginfo Module 2: install/mvbinpro/pkginfo Module 3: <parent2>/<child_dir>/<grandchild_dir> As the mvbin and mvbinpro directories contain only a few files in my case, it doesn't make a big difference to checkout the directories, so i've used that as a workaround. But if all i need is one file from a directory containing 2,000 files, then it'll be a big loss in terms of efficiency and time. Thanks again & Regards Deepak
          valeni Valentin Batz added a comment -

          I've the same issue when upgrading from a 1.x to any 2.x version of the plugin. We are building a lot multi module projects where we checkout just some files from modules. There is a workaround, when you put the directory name of the file as local name it works.

          valeni Valentin Batz added a comment - I've the same issue when upgrading from a 1.x to any 2.x version of the plugin. We are building a lot multi module projects where we checkout just some files from modules. There is a workaround, when you put the directory name of the file as local name it works.
          deepak Deepak Mahale added a comment -

          @Valentin Batz: Hi
          I tried that but in my case it made a duplicate directory structure inside the original
          e.g.
          dir1/dir2/dir1/dir2/file

          but it did checkout the file...

          So i used "$WORKSPACE/" in the Local name and it worked

          Thanks a lot

          deepak Deepak Mahale added a comment - @Valentin Batz: Hi I tried that but in my case it made a duplicate directory structure inside the original e.g. dir1/dir2/dir1/dir2/file but it did checkout the file... So i used "$WORKSPACE/" in the Local name and it worked Thanks a lot

          Code changed in jenkins
          User: Michael Clarke
          Path:
          src/main/java/hudson/scm/AbstractCvs.java
          src/main/java/hudson/scm/CvsModule.java
          http://jenkins-ci.org/commit/cvs-plugin/4822c4fbb2f1be2bcadd8853713f87d433ecbc84
          Log:
          [FIXED JENKINS-15132] Don't add '-d' flag on checkout if module name is not over-ridden

          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Michael Clarke Path: src/main/java/hudson/scm/AbstractCvs.java src/main/java/hudson/scm/CvsModule.java http://jenkins-ci.org/commit/cvs-plugin/4822c4fbb2f1be2bcadd8853713f87d433ecbc84 Log: [FIXED JENKINS-15132] Don't add '-d' flag on checkout if module name is not over-ridden

          This issue will still exist for the following situations due to the workings of CVS (i.e. there's not an easy way to fix them in CVS plugin):
          1. Checking out a single file into a workspace in non legacy mode - updates will checkout all sibling files and sub-modules (initial checkout will be ok)
          2. Checking out a single file into a workspace with the local name set the same as the remote name - checks-out out the file into a folder named the same as the file name (e.g. remote name of /path/to/file.txt would cause file to be checked out into /path/to/file.txt/file.txt). Work around this by setting the local name to only include the module directory names (e.g checking out /path/to/file.txt should set local name as /path/to)
          3. Checking out a single file with a remote name set - updates will checkout all sibling files and sub-modules.

          mc1arke Michael Clarke added a comment - This issue will still exist for the following situations due to the workings of CVS (i.e. there's not an easy way to fix them in CVS plugin): 1. Checking out a single file into a workspace in non legacy mode - updates will checkout all sibling files and sub-modules (initial checkout will be ok) 2. Checking out a single file into a workspace with the local name set the same as the remote name - checks-out out the file into a folder named the same as the file name (e.g. remote name of /path/to/file.txt would cause file to be checked out into /path/to/file.txt/file.txt). Work around this by setting the local name to only include the module directory names (e.g checking out /path/to/file.txt should set local name as /path/to) 3. Checking out a single file with a remote name set - updates will checkout all sibling files and sub-modules.

          People

            mc1arke Michael Clarke
            deepak Deepak Mahale
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: