[cvsnt] Re: Using Modules file in CVSROOT to remap directories on client side checkout

Oliver Giesen ogware at gmx.net
Wed Feb 9 09:38:50 GMT 2005


Community technical support mailing list was retired 2010 and replaced with a professional technical support team. For assistance please contact: Pre-sales Technical support via email to sales@march-hare.com.


Brian J. Davis wrote:

> The tree on the repository:
> +CVSROOT
> 
> +CVSTESTProject2
>     -prj2dir1level1File1.txt
>     -prj2dir1level1File2.txt
>     +prj2dir1level2
>         -prj2dir1level2File1.txt
>         -prj2dir1level2File2.txt
>     +prj2dir2level2
>         -prj2dir2level2File1.txt
>         -prj2dir2level2File2.txt
> 
> +CVSTestLibrary1
>     +lib1dir1level1
>         -lib1dir1level1file1.txt
>         -lib1dir1level1file1.txt
>         +lib1dir1level2
>             -lib1dir1level2file1.txt
> 
> 
> I would like to map a directory
> (CVSTestProject2/prj2dir1level1/prj2dir1level2) and a file
> (CVSTestProject2/prj2dir2level1/prj2dir1level2/prj2dir2level2File2.txt
> ) from CVSTESTProject2 and the entire libraries (CVSTestLibrary1)
> module to a hybrid project with the checkout name hybridproj using
> cvs co hybridproj (well actualy using CVSGUI for the checkout, but
> right now I will settle for the command prompt).  I am hoping to
> rename the project on checkout to AAHNew.
> 
> So the heiracrhy I expect on checkout is:
> 
> +AAHNew
>     +-Libraries
>         +lib1dir1level1
>             -lib1dir1level1file1.txt
>             -lib1dir1level1file1.txt
>             +lib1dir1level2
>                 -lib1dir1level2file1.txt
>     +-aaprjsrc
>         -prj2dir2level2File2.txt
>         +prj2dir2level2
>             -prj2dir2level2File1.txt
>             -prj2dir2level2File2.txt

Here's how I would probably do it:

# module to check out CVSTestLibrary1 to AAHNew/Libraries
AAHNewLibs -d AAHNew/Libraries CVSTestLibrary1

# module to check out the file prj2dir1level1File2.txt
# into AAHNew/aaprjsrc
AAHNewPrjFiles -d AAHNew/aaprjsrc CVSTESTProject2
prj2dir1level1File2.txt

# module to check out CVSTESTProject2/pr2dir2level2
# to AAHNew/aaprjsrc/prj2dir2level2
AAHNewPrj -d AAHNew/aaprjsrc/prj2dir2level2
CVSTESTProject2/pr2dir2level2

# module to use for the actual checkout of all components
hybridproj -a AAHNewLibs AAHNewPrjFiles AAHNewPrj


 
> So I am thinking my modules file should be:
> 
> Libraries CVSTestLibrary1
> 
> # Demonstrate aliasing and grabing of both a entire directory and
> individual file
> AliasModule -a CVSTestProject2/prj2dir1level1/prj2dir2level2 
> CVSTestProject2/prj2dir2level1/prj2dir2level1File1.txt
>
> aahprjsrc AliasModule

Hmm, I have no idea what this would do. Have you tried it? Does it
create an aahprjsrc top-level folder? Or does it bhave identically to
checking out AliasModule itself?


> hybridproj -d AAHNew Libraries aahprjsrc

You can only specify one source module with this construct. If you want
to checkout multiple modules in one go, use alias modules. That's what
they're really for.


> Can aliases be used for paths deep in the tree?  For instance say
> there is the CVSTestProject2/prj2dir1level1 directory in the
> CVSTestProject2.
> 
> Can I use:
> 
> anAlias -a CVSTestProject2/prj2dir1level1

You can use that but I'm not sure that's what you want. Using an alias
module is 100% identical to specifying whatever follows the -a on the
right hand side of a checkout command. IOW there would be absolutely no
difference between the results of the following two commands:

cvs checkout anAlias 
cvs checkout CVSTestProject2/prj2dir1level1
 
Hope this helps.

-- 
Oliver
----  ------------------
JID:  ogiesen at jabber.org
ICQ:  18777742	(http://wwp.icq.com/18777742)



More information about the cvsnt mailing list
Download the latest CVSNT, TortosieCVS, WinCVS etc. for Windows 8 etc.
@CVSNT on Twitter   CVSNT on Facebook