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

Re: [PATCH] Stop 'svn import' from importing empty paths

From: C. Michael Pilato <cmpilato_at_collab.net>
Date: 2005-04-08 20:57:55 CEST

"S.Ramaswamy" <ramaswamy@collab.net> writes:

> > Oh. Dude, when I said "some context structure", I meant one that was
> > private to the import operation. The svn_client_ctx_t is a very
> > inappropriate place for this new boolean.
>
> Yeah, I was feeling uneasy about changing a top level struct like
> svn_client_ctx_t that is used all over libsvn_client. The other option is to
> use a single member struct that only commit.c uses and add an extra
> parameter to import*() functions. If that sounds like a reasonable option, I
> can try that.

This is exactly what I was going to suggest as a follow-up to my last
mail before having to run AFK for a bit.

> Another option is a variant of the first patch - in addition to checking for
> an empty src dir, let's also check for an empty new_entries array (array of
> new parent directories to be created in the repo). That should take care of
> "svn import -m "" empty-dir URL-OF-REPOS/new-dir".

I thought of that, but there's another problem. 'svn import' will
skip over stuff in the global_ignores list, and skip over .svn
subdirs, etc. That means that you might have a non-empty directory
containing only stuff that import would skip, which would cause your
special-case checks not to fire, and still cause an empty commit.

The first solution is the better one.

(And I see that import_file() *always* calls add_file() in a
non-errorful situation, so it doesn't have to grow this parameter at
all -- it's caller can just know that if it calls import_file, the
server is being changed.)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Apr 8 21:02:23 2005

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.