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:[EMAIL PROTECTED]         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_
> 
> 
> 

_______________________________________________
Bug-cvs mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-cvs

Reply via email to