[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: S.Ramaswamy <ramaswamy_at_collab.net>
Date: 2005-04-08 17:54:34 CEST

> 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.

* subversion/libsvn_client/commit.c
  (import) : Abort an edit if no changes are made to the repository.

* subversion/tests/clients/cmdline/basic_tests.py
  (basic_import_empty_dir) : New. Verify that empty revisions cannot be
    created.

  (test_list) : Added basic_empty_revision to list of tests.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Received on Fri Apr 8 17:55:43 2005

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