[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: add dir, add file, commit file?

From: Ben Collins-Sussman <sussman_at_collab.net>
Date: 2001-05-17 05:08:43 CEST

Kevin Pilch-Bisson <kevin@pilch-bisson.net> writes:

> --St7VIuEGZ6dlpu13
> Content-Type: text/plain; charset=us-ascii
> Content-Disposition: inline
> Content-Transfer-Encoding: quoted-printable
>
> What is our expected behaviour if a user types:
>
> $ mkdir foo
> $ svn add foo
> $ echo "Hello" > foo/bar
> $ svn add foo/bar
> $ svn ci foo/bar
>
> In cvs this would be no problem, since the dir would be created in the
> repository at add time, but with svn, we are trying to add a file to a
> directory that is not under version control yet. Should we assume that
> we also commit the directory in this case, or should we barf?

We barf. The repository will say "sorry, there's no such directory
'foo'." As it should now.

I think the majority of us are in agreement that CVS's behavior of
instantly adding a repository directory when you 'add' it is a bogus
behavior. CVS doesn't version directories; this is something it has
to do to compensate. Subversion *does* version directories, so we
stick to a higher law of conformity: "nothing goes to the server
until you commit."

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 21 14:36:30 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.