[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: cvs co -d <repository> prevention
From: |
Donald Sharp |
Subject: |
Re: cvs co -d <repository> prevention |
Date: |
Fri, 25 May 2001 12:20:19 -0400 |
User-agent: |
Mutt/1.2.4i |
On Fri, May 25, 2001 at 11:21:36AM -0400, Derek R. Price wrote:
> Donald Sharp wrote:
>
> > If the user has set his CVSROOT env variable and calls cvs in this
> > manner:
> >
> > cvs co -d <repository> <module>
> >
> > The current version will happily check the module out inside of
> > the repository.
> >
> > I've attached a patch that fixes this problem( It's not based on
> > the other checkout into the repository patch I got going at this
> > point in time. ). I've also included a sanity.sh modification
> > that shows tests this case ;)
> >
> > Please let me know if you have any suggestions/comments.
>
> Any particular reason you wrote this to fall back on CWD if it can't check
> the argument to '-d'? It strikes me that checking CWD in this case is still
> as pointless as it used ot be...
Well...
your right.
How about this:
if( where != NULL )
{
char *temp;
if( chdir( where ) != -1 )
{
where_location = xgetwd();
if( where_location == NULL )
error( 1, errno, "could not get working directory" );
if( chdir( current ) == -1 )
error( 1, errno, "Could not change directory" );
free( current );
current = where_location;
}
else
error( 1, errno, "Could not change directory into requested checkout
directory" );
}
This isn't right either. ;( I just ran the test suite with this
and it fails on basicb-cod-1. I'll look at it some more..
donald
>
> Derek
>
> --
> Derek Price CVS Solutions Architect ( http://CVSHome.org
> )
> mailto:dprice@collab.net CollabNet ( http://collab.net )
> --
> I am not deliciously saucy.
> I am not deliciously saucy.
> I am not deliciously saucy...
>
> - Bart Simpson on chalkboard, _The Simpsons_
>
>
>
- cvs co -d <repository> prevention, Donald Sharp, 2001/05/24
- Re: cvs co -d <repository> prevention, Derek R. Price, 2001/05/24
- Re: cvs co -d <repository> prevention, Derek R. Price, 2001/05/25
- Re: cvs co -d <repository> prevention,
Donald Sharp <=
- Re: cvs co -d <repository> prevention, Donald Sharp, 2001/05/25
- Re: cvs co -d <repository> prevention, Derek R. Price, 2001/05/25
- Re: cvs co -d <repository> prevention, Donald Sharp, 2001/05/25
- Re: cvs co -d <repository> prevention, Derek R. Price, 2001/05/25
- Re: cvs co -d <repository> prevention, Donald Sharp, 2001/05/25
- Re: cvs co -d <repository> prevention, Derek R. Price, 2001/05/29
- Re: cvs co -d <repository> prevention, Donald Sharp, 2001/05/30
- Re: cvs co -d <repository> prevention, Derek R. Price, 2001/05/30
- Re: cvs co -d <repository> prevention, Donald Sharp, 2001/05/30