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

Re: [FEATURE REQUEST] svn mkdir -p, svn copy -p

From: S.Ramaswamy <ramaswamy_at_collab.net>
Date: 2004-12-22 07:08:50 CET

On Tue, 2004-12-21 at 14:30, Michael G Schwern wrote:
> This is a request for -p options to both mkdir and copy. I'm sure its not
> the first (Issue #1776 is similar) but I want to add to the pile of requests.
> I was quite astonished to find it not there.
>
> For mkdir it would act exactly like Unix's mkdir, all necessary parent
> directories will be necessary. For copy it would do the same, ensure all
> parent directories are created.
>
> Normally I'd assume the reasons would be obvious, but seeing as how SVN is
> up to 1.1.1 I guess its not. The simplest is "principle of least
> astonishment". SVN has a function called mkdir, therefore I expect it to
> have the same basic properties as the shell mkdir. One of these is -p.
> I'm sure there are clever ways to simulate mkdir -p but a user should not
> have to be clever. SVN should take advantage of existing idioms where
> possible to minimize what new idioms a user has to learn.
>
>
> Here's some examples of things I've done and wished I had -p. They are all
> at the level of "annoyance".
>
> * Creating a tag or branch for the first time.
>
> svn cp svn://project/trunk svn://project/tags/Some-Tag
>
> No tags directory. :( Now I have to...
>
> svn mkdir -m 'Directory for tags' svn://project/trunk svn://project/tags
> svn cp svn://project/trunk svn://project/tags/Some-Tag
>
> Annoying.
>
>
> * Creating several directories at once.
>
> This example comes from making a new Perl module distribution. You make a
> deep directory to hold your library files and a test directory.
>
> svn mkdir -p lib/Some/Module t
>
> Can't do that. Now instead of one command I have to do four.
>
> svn mkdir lib
> svn mkdir lib/Some
> svn mkdir lib/Some/Module
> svn mkdir t
>
> I'm sure there's some clever way to do this in two commands using "svn import"
> but this is not something I should have to think about nor know some trick
> to do.
>
>
> Thank you for your time and thank you for Subversion.
>
>
> PS It would be really nice if the issue tracker allowed readers to add
> comments to issues such as "I would find this useful, too". Part of issue
> tracking is knowing how important an issue is to the users. Right now
> you're losing this information.

Michael Pilato's update to issue #1776 seems to indicate that
intermediate directories should be created by 'svn mkdir', 'svn copy',
and 'svn move', when '-p' is used. That would take care of most of your
annoyances, when it is implemented. I started working on it , but never
got around to finishing it. The '-p' option should work with both URLs
and wc paths, Correct ?

>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Wed Dec 22 07:14:32 2004

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.