You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Oliver Klozoff <st...@fastmail.fm> on 2004/12/22 18:36:33 UTC

[PATCH] (issue 1776) partial svn mkdir -p foo/bar/baz support

Issue 1776 requests that svn cp and svn mkdir create intermediate
directories.

This patch partially implements this feature, by providing a '-p' option to
svn mkdir that behaves like the standard mkdir -p, but only for WC mkdirs.
URL mkdirs do not yet have this capability.

I gave it a shot, but I couldn't think of a way to make it work correctly
for mkdir_urls() without a lot of modifications.  I think the best way to do
it would be to add an add_directory2() to the RA interface, and provide a
'make_parents' boolean option to it.


Anyway, here's my log message:
----------------------------------------------

* subversion/libsvn_client/add.c
    (svn_client_mkdir):
      Changed to defer to svn_client_mkdir2.

    (svn_client__mksubdir): New.
      Used by svn_client_mkdir2 to create and add directories.

    (svn_client_mkdir2): New, from svn_client_mkdir.

* subversion/clients/cmdline/mkdir-cmd.c
    (svn_cl__mkdir):
      Changed to call svn_client_mkdir2, passing in
      opt_state->parents.

* subversion/clients/cmdline/cl.h

    (svn_cl__opt_state_t):
      Added 'parents' member.

* subversion/clients/cmdline/main.c
    (svn_cl__options):
      Added 'parents' ('p') option.

    (svn_cl__cmd_table):
      Added 'p' option to "mkdir" command.

    (main):
      Added case for 'p'.

* subversion/tests/clients/cmdline/basic_tests.py
    (basic_mkdir_missing_parent): New.
      Tests 'svn mkdir foo/bar' with no foo,
      expects failure.

    (basic_mkdir_missing_parent_p): New.
      Tests 'svn mkdir -p foo/bar' with no foo,
      expects 'foo' and 'bar' to both be added.
 
    (basic_mkdir_wcpath): New.
      Tests 'svn mkdir foo foo/bar', like 
      basic_mkdir_url but for the WC.

    (test_list): Inserted the three previously
      mention tests after the basic_mkdir_urls
      test.



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

Re: [PATCH] (issue 1776) partial svn mkdir -p foo/bar/baz support

Posted by Erik Huelsmann <eh...@gmail.com>.
On Wed, 22 Dec 2004 13:36:33 -0500, Oliver Klozoff <st...@fastmail.fm> wrote:
> 
> Issue 1776 requests that svn cp and svn mkdir create intermediate
> directories.
> 
> This patch partially implements this feature, by providing a '-p' option to
> svn mkdir that behaves like the standard mkdir -p, but only for WC mkdirs.
> URL mkdirs do not yet have this capability.
> 
> I gave it a shot, but I couldn't think of a way to make it work correctly
> for mkdir_urls() without a lot of modifications.  I think the best way to do
> it would be to add an add_directory2() to the RA interface, and provide a
> 'make_parents' boolean option to it.
> 
> Anyway, here's my log message:
> ----------------------------------------------

[ ... ]

maybe you want to add the patch itself too? :-)

bye,


Erik.

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

Re: [PATCH] (issue 1776) partial svn mkdir -p foo/bar/baz support

Posted by Max Bowsher <ma...@ukf.net>.
Oliver Klozoff wrote:
> This patch partially implements this feature, by providing a '-p' option 
> to
> svn mkdir that behaves like the standard mkdir -p, but only for WC mkdirs.
> URL mkdirs do not yet have this capability.
>
> I gave it a shot, but I couldn't think of a way to make it work correctly
> for mkdir_urls() without a lot of modifications.  I think the best way to 
> do
> it would be to add an add_directory2() to the RA interface, and provide a
> 'make_parents' boolean option to it.
>
>
> Anyway, here's my log message:
...

Thanks! Could you attach the patch to the issue, and paste the above 2 
paragraphs and the log message in as additional comments to the issue?
That way, it won't get lost.

Max.


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