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

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

From: Oliver Klozoff <stevieoh_at_fastmail.fm>
Date: 2004-12-22 19:36:33 CET

Issue 1776 requests that svn cp and svn mkdir create intermediate

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
      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
      Changed to call svn_client_mkdir2, passing in

* subversion/clients/cmdline/cl.h

      Added 'parents' member.

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

      Added 'p' option to "mkdir" command.

      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

To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Dec 22 19:37:31 2004

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.