info-cvs
[Top][All Lists]
Advanced

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

Re: checking files out, not in a directory of <project name>, is it poss


From: Donald Sharp
Subject: Re: checking files out, not in a directory of <project name>, is it possible?
Date: Thu, 7 Dec 2000 07:41:10 -0500
User-agent: Mutt/1.2.4i

I'm re cc'ing info-cvs because someone else might have a better
answer for what is going wrong.

This is the relevant code in checkout.c.  Basically it is checking
to see if the "CVS" directory exists in the current working directory.
The isfile( CVSADM ) is returning 1 so we go into the else statement.
But if you had just created the directory I'm not sure why it is
returning true.  Without more code diving, this one has me stumped.

donald

        /* set up the repository (or make sure the old one matches) */
        if (!isfile (CVSADM))
        {
            FILE *fp;

            if (!noexec && argc > 1)
            {
                /* I'm not sure whether this check is redundant.  */
                if (!isdir (repository))
                    error (1, 0, "there is no repository %s", repository);

                Create_Admin (".", preload_update_dir, repository,
                              (char *) NULL, (char *) NULL, 0, 0,
                              m_type == CHECKOUT);
                fp = open_file (CVSADM_ENTSTAT, "w+");
                if (fclose(fp) == EOF)
                    error(1, errno, "cannot close %s", CVSADM_ENTSTAT);
#ifdef SERVER_SUPPORT
                if (server_active)
                    server_set_entstat (where, repository);
#endif
            }
            else
            {
                /* I'm not sure whether this check is redundant.  */
                if (!isdir (repository))
                    error (1, 0, "there is no repository %s", repository);

                Create_Admin (".", preload_update_dir, repository, tag, date,

                              /* FIXME?  This is a guess.  If it is important
                                 for nonbranch to be set correctly here I
                                 think we need to write it one way now and
                                 then rewrite it later via WriteTag, once
                                 we've had a chance to call RCS_nodeisbranch
                                 on each file.  */
                              0, 0, m_type == CHECKOUT);
            }
        }
        else
        {
            char *repos;

            if (m_type == EXPORT)
                error (1, 0, "cannot export into working directory");

            /* get the contents of the previously existing repository */
            repos = Name_Repository ((char *) NULL, preload_update_dir);
            if (fncmp (repository, repos) != 0)
            {
                error (0, 0, "existing repository %s does not match %s",
                       repos, repository);
                error (0, 0, "ignoring module %s", omodule);
                free (repos);
                err = 1;
                goto out;
            }
            free (repos);
        }
    }

On Thu, Dec 07, 2000 at 10:20:18AM +0900, Antony Stace wrote:
> Hi Donald.  
> 
> Thanks for the long reply.  I have done what you did in your email but
> it doesnt work on my box.  (I did the stright cvs co watermeter just to
> show my cvs is working for somethings), and as you can see from my
> output my cvs version is 1.10.8.
> 
> Cheers
> 
> Antony
> 
> address@hidden /tmp]$ mkdir wtr 
> address@hidden /tmp]$ cd  wtr
> address@hidden wtr]$ cvs co -d . watermeter
> cvs server: existing repository /usr/local/cvsroot does not match
> /usr/local/cvsroot/watermeter
> cvs server: ignoring module watermeter
> address@hidden wtr]$ cvs co watermeter
> cvs server: Updating watermeter
> U watermeter/Imakefile
> U watermeter/Makefile
> U watermeter/Makefile.am
> U watermeter/Makefile.in
> U watermeter/README
> U watermeter/wtridef.h
> U watermeter/wtrinc.h
> U watermeter/wtrinit.c
> U watermeter/wtrmain.c
> U watermeter/wtrsend.c
> U watermeter/tel.h
> address@hidden wtr]$ cvs --version
> 
> Concurrent Versions System (CVS) 1.10.8 (client/server)
> 
> Copyright (c) 1989-1998 Brian Berliner, david d `zoo' zuhn, 
>                         Jeff Polk, and other authors
> 
> CVS may be copied only under the terms of the GNU General Public
> License,
> a copy of which can be found with the CVS distribution kit.
> 
> Specify the --help option for further information about CVS
> address@hidden wtr]$ 
> Donald Sharp wrote:
> > 
> > Ok-
> > 
> > donsharp-u5:56> mkdir wtr
> > donsharp-u5:57> cd wtr
> > donsharp-u5:58> cvs co -d . a
> > cvs checkout: Updating .
> > U bar.c
> > U foo.c
> > donsharp-u5:59> cvs co a
> > cvs checkout: Updating a
> > U a/bar.c
> > U a/foo.c
> > donsharp-u5:60> ls
> > CVS    a      bar.c  foo.c
> > donsharp-u5:61> ls a
> > CVS    bar.c  foo.c
> > donsharp-u5:62>
> > 
> > What exactly are you doing? ( Could you please include output from
> > a sample run? )  What version of cvs are you using?
> > 
> > doanld
> > On Wed, Dec 06, 2000 at 02:17:24PM +0900, Antony Stace wrote:
> > > thanks once again for the reply Donald
> > >
> > > I am a little confussed.  The directory /tmp/wtr was empty inititially
> > > and it didnt work, is this correct?
> > >
> > >
> > > Donald Sharp wrote:
> > > >
> > > > The -d option doesn't work inside a already existing sandbox.
> > > >
> > > > donadl
> > > > On Wed, Dec 06, 2000 at 10:12:00AM +0900, Antony Stace wrote:
> > > > > I just tried
> > > > >
> > > > > cvs co -d . watermeter
> > > > >
> > > > > and got an error
> > > > >
> > > > > wtr005:/tmp/wtr> cvs co -d . watermeter
> > > > > cvs server: existing repository /usr/local/cvsroot does not match
> > > > > /usr/local/cvsroot/watermeter
> > > > > cvs server: ignoring module watermeter
> > > > >
> > > > > and to show cvs is infact working....
> > > > >
> > > > > wtr005:/tmp/wtr> cvs co  watermeter
> > > > > cvs server: Updating watermeter
> > > > > U watermeter/Imakefile
> > > > > U watermeter/Makefile
> > > > > U watermeter/Makefile.am
> > > > > U watermeter/Makefile.in
> > > > > U watermeter/README
> > > > > U watermeter/wtridef.h
> > > > > U watermeter/wtrinc.h
> > > > > U watermeter/wtrinit.c
> > > > > U watermeter/wtrmain.c
> > > > > U watermeter/wtrsend.c
> > > > > wtr005:/tmp/wtr>
> > > > >
> > > > > What am I doing wrong?
> > > > >
> > > > > Donald Sharp wrote:
> > > > > >
> > > > > > cvs co -d <dir> <project name>
> > > > > >
> > > > > > donald
> > > > > > On Fri, Dec 01, 2000 at 10:53:44AM +0900, Antony Stace wrote:
> > > > > > > Hi Folks
> > > > > > >
> > > > > > > When I check something out of CVS it always checks the files out 
> > > > > > > like
> > > > > > >
> > > > > > > <project name>/file1
> > > > > > > <project name>/file2
> > > > > > > <project name>/file3
> > > > > > > .
> > > > > > > .
> > > > > > > .
> > > > > > >
> > > > > > > with the files being inside a directory of the <project name>.  
> > > > > > > Is there
> > > > > > > anyway I can check them out like
> > > > > > >
> > > > > > > file1
> > > > > > > file2
> > > > > > > file3
> > > > > > > .
> > > > > > > .
> > > > > > > .
> > > > > > >
> > > > > > > without having the files inside the directory of the <project 
> > > > > > > name> ?
> > > > > > >
> > > > > > > Cheers
> > > > > > >
> > > > > > > Antony
> > > > > > >
> > > > > > > _______________________________________________
> > > > > > > Info-cvs mailing list
> > > > > > > address@hidden
> > > > > > > http://mail.gnu.org/mailman/listinfo/info-cvs
> > > > > >
> > > > > > _______________________________________________
> > > > > > Info-cvs mailing list
> > > > > > address@hidden
> > > > > > http://mail.gnu.org/mailman/listinfo/info-cvs
> > > >
> > > > _______________________________________________
> > > > Info-cvs mailing list
> > > > address@hidden
> > > > http://mail.gnu.org/mailman/listinfo/info-cvs



reply via email to

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