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

[TSVN] Re: tsvn 1.1.2 gives no warning when checking out to a directory that's not empty

From: Eric Hanchrow <offby1_at_blarg.net>
Date: 2005-01-12 18:03:49 CET

>>>>> "Roel" == Roel Harbers <roel@roelharbers.nl> writes:

    Roel> TSVN 1.1.2.2205 gives no warning when checking out to a
    Roel> directory that's not empty. Is this intended/expected?

    Roel> I would expect a checkout to be only allowed to an empty or
    Roel> new directory.

I honestly don't know what the developers intended in this case. But
I can think of one case when you would want to check out into a
non-empty directory. I'm going to describe it in terms of *nix, not
Windows (since that's the platform on which I've seen this done), but
I suspect the reasoning holds for Windows too.

The case is this: rather than versioning source code, you're
versioning configuration files. In particular, the "/etc" directory
on *nix systems holds all kinds of crucial stuff that controls the
machine (it's vaguely analogous to the Windows Registry). If you are
an administrator of a *nix box, you probably worry that you'll someday
tweak some important file in /etc, and accidentally screw things up
(at least, you _should_ be worried :-). So some people put all of
/etc into Subversion: that way they can undo mistaken changes, plus
get a nice history of changes.

Now, what does that have to do with your question? Well, typically
once you install *nix on a computer -- even before you install
Subversion -- its /etc directory is fully populated. Yet you want to
import that directory into the repository, at the same time turning it
into a working copy. You do it like this (this is essentially the
same as
http://subversion.tigris.org/project_faq.html#in-place-import):

* create an empty /etc directory in the repository (svn mkdir
  svn://repos/etc)

* check that empty directory out into /etc (cd /etc; svn co
  svn://repos/etc). This is the step that you want to fail.

* add the interesting files (svn add passwd ntp.conf crontab what-have
  you; svn ci)

Even though I've never heard of anyone doing this on Windows, I
suspect it would nonetheless be a useful technique -- and that's why I
hope Tortoisesvn never entirely prohibits checking out into a
non-empty directory.

    It might well _warn_ you, or have an option which disallows it,
    But an outright prohibition would be too strict.

-- 
There is such a thing as American-ness.  ... [H]ackers ... come
closest of any group I know to embodying it.  Closer, probably, than
the men running our government.
        -- Paul Graham
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: dev-help@tortoisesvn.tigris.org
Received on Wed Jan 12 18:37:14 2005

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