info-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why only files are checked out and not the directories?


From: Zsolt Koppany
Subject: Re: Why only files are checked out and not the directories?
Date: Mon, 21 Aug 2006 20:38:43 +0200

Thank Mark, but as I descriped in my initial post, we need solution with 
cvs-1.11.

Zsolt

"Mark D. Baushke" <address@hidden> schrieb im Newsbeitrag 
news:address@hidden
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Zsolt Koppany <address@hidden> writes:

> Thank you Mark,
>
> but rlog will be recursive and I work on a large
> repository,

You said you needed to get all of the directories
on a cvs-1.11 system. Even the 'cvs rls' or 'cvs
ls' command will need to do the same number of
stat() and opendir() operations that the

    'cvs rlog -R'
or (if you have a checked out tree)
    'cvs log -R'

will take.

> thus this command would read the history of the
> entire repository (below the path) and would be
> very slow.

It will traverse all of the directories getting
the names of ,v files, but using the -R switch
will mean that it will NOT actually read those
files.

The trick I am providing is how the GUI clients
got the information before the 'ls' command was
introduced in cvs 1.12.x.

Feel free to move to cvs 1.12.x if you like it
better. :-)

-- Mark

> Zsolt
>
> "Mark D. Baushke" <address@hidden> schrieb im Newsbeitrag
> news:address@hidden
> Zsolt Koppany <address@hidden> writes:
>
> > I have a directory structure like below (an example):
> >
> > src/dir/sd1/1.c
> > src/dir/sd1/2.c
> > src/dir/sd2/a.c
> > src/dir/sd2/b.c
> > src/dir/readme
> >
> > checkout -d $CVSROOT (points to src) -l dir
> >
> > and I get ONLY readme. I would like also get
> > sd1 and sd2 (but not their content).
> >
> > What my goal is: I would like to get the list
> > of files and directories under src/dir. I need
> > a solution for cvs-1.11 thus I cannot use cvs
> > ls.
> >
> > Can somebody help?
>
> cvs rlog -R dir | xargs -n 1 dirname | sort -u
>
> Enjoy!
> -- Mark
>
> Here is the example output:
>
> % prefix=`cvs -n rlog -R CVSROOT/modules | sed s:CVSROOT/modules,v::`
> % cvs -Qn rlog -R dir | xargs -n 1 dirname | sort -u | sed "s,^$prefix,,"
> dir
> dir/sd1
> dir/sd2
> %
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.4 (FreeBSD)

iD8DBQFE6e8JCg7APGsDnFERAuvGAJ0fx36fzbbiNE0AX4d6+Mu+JSoR/ACg0XOI
TeTjCRPx+B07oSlEuwdSfiA=
=p4r+
-----END PGP SIGNATURE-----





reply via email to

[Prev in Thread] Current Thread [Next in Thread]