• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • cvs-plugin
    • None
    • linux

      I create two cvs modules with the path

      lib/flac-1.2.1
      drv/linux/fuse

      when it check out, got the error:

      cvs checkout -P -D 29 Mar 2012 11:40:15 +0800 -d lib/flac-1.2.1 lib/flac-1.2.1
      cvs [checkout aborted]: could not change directory to requested checkout directory `lib': No such file or directory

          [JENKINS-13264] fail checkout 2 modules with different path

          Could you attached your job's config.xml?

          Michael Clarke added a comment - Could you attached your job's config.xml?

          Eric Co added a comment -

          <?xml version='1.0' encoding='UTF-8'?>
          <project>
          <actions/>
          <description></description>
          <keepDependencies>false</keepDependencies>
          <properties/>
          <scm class="hudson.scm.CVSSCM">
          <flatten>false</flatten>
          <repositories>
          <hudson.scm.CvsRepository>
          <cvsRoot>ericco@10.10.10.251:/home/cvsroot</cvsRoot>
          <modules>
          <hudson.scm.CvsModule>
          <localName></localName>
          <remoteName>lib/flac-1.2.1</remoteName>
          <moduleLocation class="hudson.scm.CvsModuleLocation$HeadModuleLocation">
          <locationType>HEAD</locationType>
          <useHeadIfNotFound>false</useHeadIfNotFound>
          </moduleLocation>
          </hudson.scm.CvsModule>
          <hudson.scm.CvsModule>
          <localName></localName>
          <remoteName>drv/linux/2.4/fuse</remoteName>
          <moduleLocation class="hudson.scm.CvsModuleLocation$HeadModuleLocation">
          <locationType>HEAD</locationType>
          <useHeadIfNotFound>false</useHeadIfNotFound>
          </moduleLocation>
          </hudson.scm.CvsModule>
          </modules>
          <compressionLevel>-1</compressionLevel>
          <excludedRegions>
          <hudson.scm.ExcludedRegion>
          <pattern></pattern>
          </hudson.scm.ExcludedRegion>
          </excludedRegions>
          <passwordRequired>false</passwordRequired>
          </hudson.scm.CvsRepository>
          </repositories>
          <canUseUpdate>true</canUseUpdate>
          <skipChangeLog>false</skipChangeLog>
          <pruneEmptyDirectories>true</pruneEmptyDirectories>
          <disableCvsQuiet>false</disableCvsQuiet>
          <cleanOnFailedUpdate>false</cleanOnFailedUpdate>
          </scm>
          <canRoam>true</canRoam>
          <disabled>false</disabled>
          <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
          <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
          <triggers class="vector"/>
          <concurrentBuild>false</concurrentBuild>
          <builders>
          <hudson.tasks.Shell>
          <command>true</command>
          </hudson.tasks.Shell>
          </builders>
          <publishers/>
          <buildWrappers/>
          </project>

          Eric Co added a comment - <?xml version='1.0' encoding='UTF-8'?> <project> <actions/> <description></description> <keepDependencies>false</keepDependencies> <properties/> <scm class="hudson.scm.CVSSCM"> <flatten>false</flatten> <repositories> <hudson.scm.CvsRepository> <cvsRoot>ericco@10.10.10.251:/home/cvsroot</cvsRoot> <modules> <hudson.scm.CvsModule> <localName></localName> <remoteName>lib/flac-1.2.1</remoteName> <moduleLocation class="hudson.scm.CvsModuleLocation$HeadModuleLocation"> <locationType>HEAD</locationType> <useHeadIfNotFound>false</useHeadIfNotFound> </moduleLocation> </hudson.scm.CvsModule> <hudson.scm.CvsModule> <localName></localName> <remoteName>drv/linux/2.4/fuse</remoteName> <moduleLocation class="hudson.scm.CvsModuleLocation$HeadModuleLocation"> <locationType>HEAD</locationType> <useHeadIfNotFound>false</useHeadIfNotFound> </moduleLocation> </hudson.scm.CvsModule> </modules> <compressionLevel>-1</compressionLevel> <excludedRegions> <hudson.scm.ExcludedRegion> <pattern></pattern> </hudson.scm.ExcludedRegion> </excludedRegions> <passwordRequired>false</passwordRequired> </hudson.scm.CvsRepository> </repositories> <canUseUpdate>true</canUseUpdate> <skipChangeLog>false</skipChangeLog> <pruneEmptyDirectories>true</pruneEmptyDirectories> <disableCvsQuiet>false</disableCvsQuiet> <cleanOnFailedUpdate>false</cleanOnFailedUpdate> </scm> <canRoam>true</canRoam> <disabled>false</disabled> <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding> <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding> <triggers class="vector"/> <concurrentBuild>false</concurrentBuild> <builders> <hudson.tasks.Shell> <command>true</command> </hudson.tasks.Shell> </builders> <publishers/> <buildWrappers/> </project>

          The issue is being caused by the CVS plugin trying to check out the files into a folder that matches the remote location name, but not creating the intermediate directories. If the module is called 'path/to/module' then the CVS plugin should create a directory called 'path' then another directory in there called 'to' before issuing the checkout command which will create 'module' inside these newly created directory.

          Michael Clarke added a comment - The issue is being caused by the CVS plugin trying to check out the files into a folder that matches the remote location name, but not creating the intermediate directories. If the module is called 'path/to/module' then the CVS plugin should create a directory called 'path' then another directory in there called 'to' before issuing the checkout command which will create 'module' inside these newly created directory.

          Can such an option be added? What would the difference be from what the "Legacy mode" option is supposed to do? I have the same issue as the OP except with one module with a bunch of legacy directories. The "Legacy mode" doesn't work with the 2.x CVS plug-in. And I get the same error as the OP if I try to set the "Local Name" to the same path as the "Remote Name". Thanks.

          James Gustafson added a comment - Can such an option be added? What would the difference be from what the "Legacy mode" option is supposed to do? I have the same issue as the OP except with one module with a bunch of legacy directories. The "Legacy mode" doesn't work with the 2.x CVS plug-in. And I get the same error as the OP if I try to set the "Local Name" to the same path as the "Remote Name". Thanks.

          dogfood added a comment -

          Integrated in plugins_cvs #28
          [FIXED JENKINS-13264] Create intermediary directories if they do not exist on module checkout (Revision d55b1f080f9ef8105956f216ca4c46718051fd02)
          [FIXED JENKINS-13264] Create intermediary directories if they do not exist on module checkout (Revision 6190adfc4f0847b4de2b8bff935a58db622c3d56)

          Result = SUCCESS
          unknown :
          Files :

          • src/main/java/hudson/scm/CVSSCM.java

          mc1arke :
          Files :

          • src/main/java/hudson/scm/CVSSCM.java

          dogfood added a comment - Integrated in plugins_cvs #28 [FIXED JENKINS-13264] Create intermediary directories if they do not exist on module checkout (Revision d55b1f080f9ef8105956f216ca4c46718051fd02) [FIXED JENKINS-13264] Create intermediary directories if they do not exist on module checkout (Revision 6190adfc4f0847b4de2b8bff935a58db622c3d56) Result = SUCCESS unknown : Files : src/main/java/hudson/scm/CVSSCM.java mc1arke : Files : src/main/java/hudson/scm/CVSSCM.java

          Fixed creating of intermediary directories in upcoming release.

          Michael Clarke added a comment - Fixed creating of intermediary directories in upcoming release.

          Eric Co added a comment -

          after update to version 2.4-SNAPSHOT (private-05/03/2012 01:35-jenkins)
          I still got the error:
          cvs checkout -P -D 08 May 2012 14:31:48 +0800 -d lib/flac-1.2.1 lib/flac-1.2.1
          cvs [checkout aborted]: could not change directory to requested checkout directory `lib': No such file or directory

          Eric Co added a comment - after update to version 2.4-SNAPSHOT (private-05/03/2012 01:35-jenkins) I still got the error: cvs checkout -P -D 08 May 2012 14:31:48 +0800 -d lib/flac-1.2.1 lib/flac-1.2.1 cvs [checkout aborted] : could not change directory to requested checkout directory `lib': No such file or directory

          With the 2.4-SNAPSHOT, I find a need to use a back-slash for the "Local Name", then it works. For example:

          Remote Name: lib/something
          Local Name: lib\something

          It properly puts the checkout to workspace/project/lib/something. If I set "Local Name" to be lib/something, I get that same error 'No such file or directory'... My build server is Windows 7 with the cygpath plug-in if that matters. Anyway, it is working for me this way. Thanks Michael.

          James Gustafson added a comment - With the 2.4-SNAPSHOT, I find a need to use a back-slash for the "Local Name", then it works. For example: Remote Name: lib/something Local Name: lib\something It properly puts the checkout to workspace/project/lib/something. If I set "Local Name" to be lib/something, I get that same error 'No such file or directory'... My build server is Windows 7 with the cygpath plug-in if that matters. Anyway, it is working for me this way. Thanks Michael.

          James: could you give some details as to what environment you're running in - is it Windows?

          Michael Clarke added a comment - James: could you give some details as to what environment you're running in - is it Windows?

          Yes, it is Windows 7 64-bit with Jenkins 1.464 installed as a service.

          James Gustafson added a comment - Yes, it is Windows 7 64-bit with Jenkins 1.464 installed as a service.

          Valentin Batz added a comment - - edited

          I've experienced the same issue and traced it down to a cvsnt inconvenience.
          I'll try to explain my findings.
          The -d argument gets passed to the server. The server process creates a local copy in a tmp dir for the checkout with that argument as name. It does not create the required subdirectories and thats why the checkout will fail. I assume your cvsnt/cvs server is running in a unix environment, because it works with backslashes for you. I've discovered the same workaround. It's working because backslashes are valid in unix filenames/directories, and the first level directory is created in the tmpdir.
          I suggest not to pass the -d argument to the server, when doing 'partial checkouts' with subdirs.
          I'd rather suggest to implement a client-side redirection of the files/directories.

          Valentin Batz added a comment - - edited I've experienced the same issue and traced it down to a cvsnt inconvenience. I'll try to explain my findings. The -d argument gets passed to the server. The server process creates a local copy in a tmp dir for the checkout with that argument as name. It does not create the required subdirectories and thats why the checkout will fail. I assume your cvsnt/cvs server is running in a unix environment, because it works with backslashes for you. I've discovered the same workaround. It's working because backslashes are valid in unix filenames/directories, and the first level directory is created in the tmpdir. I suggest not to pass the -d argument to the server, when doing 'partial checkouts' with subdirs. I'd rather suggest to implement a client-side redirection of the files/directories.

          Valentin: based in your comment, do you think changing the CVS command to contain backward slashes for the '-d' argument work in both Windows and Linux (i.e. cvs checkout -P -D 29 Mar 2012 11:40:15 +0800 -d lib\flac-1.2.1 lib/flac-1.2.1)? My test machine is Windows Client -> Windows Server so I can't replicate the defect properly.

          I reckon that changing to use client side redirection would cause CVS not to create CVS control files in the expected location so I'd have to fiddle about a bit, but may be an option if the backslashes 'quick fix' I've suggested doesn't work.

          Michael Clarke added a comment - Valentin: based in your comment, do you think changing the CVS command to contain backward slashes for the '-d' argument work in both Windows and Linux (i.e. cvs checkout -P -D 29 Mar 2012 11:40:15 +0800 -d lib\flac-1.2.1 lib/flac-1.2.1)? My test machine is Windows Client -> Windows Server so I can't replicate the defect properly. I reckon that changing to use client side redirection would cause CVS not to create CVS control files in the expected location so I'd have to fiddle about a bit, but may be an option if the backslashes 'quick fix' I've suggested doesn't work.

          Valentin Batz added a comment -

          Michael: I think the backslash trick works on windows client-side only, independend from the cvs-server platform. I haven't tried cvs on linux client yet. I don't recommend to change the CVS command to contain backslashes. I think you should ommit the -d option when the 'CVS Module' contains slashes. The chekckout-as feature does not work with partial checkouts. I'd prefer a working 'partial checkout' feature over the 'checkout-as' feature, since it worked out of the box with versions < 2.0 of the CVS Plugin.

          Valentin Batz added a comment - Michael: I think the backslash trick works on windows client-side only, independend from the cvs-server platform. I haven't tried cvs on linux client yet. I don't recommend to change the CVS command to contain backslashes. I think you should ommit the -d option when the 'CVS Module' contains slashes. The chekckout-as feature does not work with partial checkouts. I'd prefer a working 'partial checkout' feature over the 'checkout-as' feature, since it worked out of the box with versions < 2.0 of the CVS Plugin.

          Valentin Batz added a comment -

          I've just tried the -d argument on linux client with backslashes, it's not what you want. It creates the directory with the backslash in it.

          Valentin Batz added a comment - I've just tried the -d argument on linux client with backslashes, it's not what you want. It creates the directory with the backslash in it.

          Code changed in jenkins
          User: mc1arke
          Path:
          src/main/java/hudson/scm/CVSSCM.java
          http://jenkins-ci.org/commit/cvs-plugin/70a90ec03ace11a703747e2317a6a3ad6a7e4112
          Log:
          [FIXED JENKINS-13264] Allow checkout of submodules

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: mc1arke Path: src/main/java/hudson/scm/CVSSCM.java http://jenkins-ci.org/commit/cvs-plugin/70a90ec03ace11a703747e2317a6a3ad6a7e4112 Log: [FIXED JENKINS-13264] Allow checkout of submodules

            mc1arke Michael Clarke
            cofung Eric Co
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: