> "S.Ramaswamy" <ramaswamy@collab.net> writes:
>
>> > This patch breaks the following functionality:
>> >
>> > svn import -m "" empty-dir URL-OF-REPOS/new-dir
>> >
>> > As I mentioned in IRC yesterday, doing this right does not involve
>> > checking for empty directories -- it involves the import driver
>> > remembering (perhaps as a boolean in some context structure) if it
>> > ever actually did anything in the repository (probably as simple as
>> > remembering if "add_file" or "add_directory" was called), and if
>> > not, then call abort_edit() instead of close_edit().
>> >
>>
>> Mike, Thanks. Revised patch attached.
>>
>> ChangeLog:
>>
>> * subversion/include/svn_client.h
>> (svn_client_ctx_t) : Added a new boolean to this struct -
>> 'repos_changed',
>> to make libsvn_client remember if any changes were made to the
>> repository.
>
> 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.
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".
Thanks
Ramaswamy
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Apr 8 18:41:11 2005