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

Cannot check out alias modules from CVS



    • Bug
    • Resolution: Fixed
    • Major
    • cvs-plugin
    • None
    • Platform: All, OS: All


      If you use alias modules in CVS the CVS support in hudson will not work. I
      think this is an easy fix though--I'll suggest a couple of simple options below.

      Under these conditions:

      1. in CVSROOT/modules have an entry like

      WebApp -a components/app components/web

      (This is a module definition for 'WebApp' which is basically an alias for the
      two modules components/app and components/web. You can use it anywhere you
      would normally list those modules separately. It's a common mechanism for

      2. Update mode set to true or false--doesn't matter.

      3. Legacy mode set to true (so that 'components' path element appears and is not
      truncated just because it's got no repository files in it directly)

      The code gets checked out okay but hudson falls over calculating changes because
      it does a cvs log on "WebApp" but that's never going to work because there is no
      directory called WebApp. So here's the error in the console:

      $ computing changelog
      cvs log: cannot open CVS/Entries for reading: No such file or directory
      cvs [log aborted]: no repository

      ERROR: cvs exited with error code 1
      Command line was [Executing 'cvs' with arguments:

      This is related to another problem: If I use an alias module then I have to use
      legacy mode or I'll get a rather strange error because there's a mismatch
      between the module I'm checking out and the directory I'm creating. The error
      looks like this:

      cvs checkout: existing repository /usr/local/repository/maintree/components/app
      does not match /usr/local/repository/maintree/components/web
      cvs checkout: ignoring module componets/web

      It turns out both problems go away if I change the checkout of the code to use
      the -N option, like this:

      cvs co -Nd WebApp WebApp

      This forces directory WebApp to get created with one subdirectory, components.

      Now when you do the log on the 'WebApp' directory it will succeed.

      Other options:

      a) Since -N means don't shorten the path, maybe you don't want to change that
      behavior. So instead you could change the 'legacy' mode so that it uses -Nd
      instead of completely omitting -d. You get the full path checked out, but you
      also get a new directory component 'WebApp'. It may not be ideal but I suspect
      it's pretty much what you are trying to accomplish anyway...?

      b) Keep checkout and legacy mode as they are, but change your log command. You
      will get the same result whether or not you specify the cvs module in the log
      command. I did an experiment. If you omit the module from the log command, it
      runs on the code you have checked out anyway, and nothing more. So it's the
      same result, but in the case where the module is WebApp and there is no WebApp
      directory, it will still work (apparently).


        Issue Links



              manmohan manmohan negi
              bkayser bkayser
              5 Vote for this issue
              5 Start watching this issue