> "S.Ramaswamy" <firstname.lastname@example.org> 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
> 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
Yes, import_file() doesn't need to be modified. The current import doesn't
allow a file to be imported without a parent directory being created - so
checking if parent directories are getting added is sufficient when a
v3 of the patch attached.
(repos_change_baton_t) : New struct with a single boolean
member to remember if changes were made to the repository.
(import_dir) : Added an extra function parameter -
'repos_change_baton'. Set repos_changed in the baton to
true if parent directories are created and when directories
or files are added to the repository.
(import) : Abort an edit if no changes are made to the repository.
(basic_import_empty_dir) : New. Verify that empty revisions
cannot be created.
(test_list) : Added basic_empty_revision to list of tests.
Received on Mon Apr 11 17:19:59 2005
To unsubscribe, e-mail: email@example.com
For additional commands, e-mail: firstname.lastname@example.org