[Top][All Lists]

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

RE: Strange dir behavior and Emptydir

From: Chris Cameron
Subject: RE: Strange dir behavior and Emptydir
Date: Fri, 29 Jun 2001 11:13:45 +1200

Emptydir is a placeholder used in CVS for when directories which may not
exist in the repository are created as part of the checkout process (if you
follow what I mean), such as a -d in the modules file or -d on the command
line.  CVS needs a Repository file and places Emptydir in there.  You are
not meant to be able to add any files to a directory created as a result of
this Emptydir behaviour.  HOWEVER, there was a bug in the code.  I submitted
a patch for this which I believe has now been added to 1.11 (Larry can
clarify this).  Basically the code prevented you from adding files to a
directory with an EmptyDir repository.  BUT there was no code to stop a
directory being added and once the directory was added, you could add files.
Either upgrade your CVS version, or apply my patch, which should be in the
archives somewhere.

Once you've managed to create files (and by necessity directories) in
EmptyDir in the repository, you're in the place of nightmares!  Behaviour
changes depending on what you actually do!  The person who did the adds,
will be able to use CVS etc. to control the files, but anyone else will not
be able to see them!  If you then manipulate the repository to put things
where they belong, the original culprit will get different behaviour to
everyone else until they do a clean checkout.

Before I made the patch, I had a commitinfo script which sent me a high
priority e-mail anytime anyone committed to EmptyDir!  Then I could sort
things out before it got too serious!

Chris Cameron                       Open Telecommunications Ltd
Product Manager                           IN Product Management
address@hidden                           P.O.Box 10-388
      +64 4 495 8403 (DDI)                          The Terrace
fax:  +64 4 495 8419                                 Wellington
cell: +64 21 650 680                                New Zealand
Life, don't talk to me about life ....(Marvin - HHGTTG)

> -----Original Message-----
> From: address@hidden [mailto:address@hidden Behalf Of
> Pyatt, Scott
> Sent: Friday, 29 June 2001 7:57 a.m.
> To: Info-Cvs (E-mail)
> Cc: Gupta, Neil
> Subject: Strange dir behavior and Emptydir
> When doing a checkout from the trunk, CVS creates directories in the
> workspace even if they are empty.  You can prevent empty directories from
> being created by using "-P" to prune empty directories or if "-r" or "-D"
> are specified.  Therefore, if you are checking out a branch using "-r
> branch", empty directories are pruned.  In the past when I've wanted to do
> perform some work to one of these empty directories, I simply do something
> like this:
>     cvs co -r theBranch theModule
>     cd parentDir
>     cvs up -d theDir
> I've never had a problem with this until today.  Today I do this and the
> "cvs up -d theDir" gives me the following message:
>     cvs server: nothing known about theDir
> Obviously "theDir" is not the real name of the directory, but will suffice
> to illustrate my problem.  The interesting thing is that "theDir"
> does exist
> in the repository (I checked to make sure) and there is active
> work in this
> directory on several other branches as well as on the trunk.  I tried the
> following:
>     cd parentDir
>     mkdir theDir
>     cvs add theDir
> For this example assume "parentDir" is "/dirA/dirB/dirC".  The command
> produced the following output.
>     Directory /cvsroot/CVSROOT/Emptydir/theDir added to the repository
> Why did CVS create "theDir" under "/cvsroot/CVSROOT/Emptydir" instead of
> under "/cvsroot/dirA/dirB/dirC" which is where I was expecting it to get
> created in the repository.  I've searched CVS documentation everywhere and
> can find no reference to "Emptydir".
> What is this "$CVSROOT/Emptydir"?  Is it possible that it is related to
> using an alias module defined in the "$CVSROOT/modules"?  How do
> I get back
> to the behavior I thought I knew before?
> TIA,
> -Scott
> ____________________________________
> Scott Pyatt
> Release Engineering Manager
> Selectica, Inc.
> 3 West Plumeria Drive
> San Jose CA 95134.2111
> Direct:       408.545.2669
> Main:         408.570.9700
> Fax:          408.570.2167
> See our Internet Selling Systems in action:
> _______________________________________________
> Info-cvs mailing list
> address@hidden

reply via email to

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