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

Re: [PATCH] '-p' shortcut to '--parents'

From: Karl Fogel <kfogel_at_red-bean.com>
Date: 2007-05-18 06:20:39 CEST

"Hyrum K. Wright" <hyrum_wright@mail.utexas.edu> writes:
> [Replying to your mail, but comments are general.]
> Jared Hardy wrote:
>> Don't let me stoke any fires here, but I wanted to mention that SVK
>> has "-p" as an equivalent to "--parents", in both the cp and mv
>> commands. It is so handy, I just scripted it in, so both commands use
>> this flag by default. Is there ever a situation where a user wouldn't
>> want non-existing parents to be created for them? It irks me that this
>> isn't a default for mkdir as well. I would rather that happen, than
>> see a useless error message any day. Perhaps the question should be
>> "what flag do we use to turn the create-parents feature off?"
>> In my opinion, design decisions that force the user to go through
>> manual steps, when they can be done automatically based on available
>> data, are obnoxious. I'm sure plenty of potential users are turned off
>> of many shells, just for this reason.
> Note that the functionality you describe now exists in trunk, it's just
> a question of whether or not to add '-p' as a shortcut for '--parents'.

I think the behavior Jared was describing was that the current
'--parents' behavior would be the default. If it were the default, we
wouldn't need the '--parents' flag at all. Unless we have its
opposite: a flag (I dunno, '--no-parents' maybe?) that suppresses the
parent-creating behavior, in which case if run-time config offered a
way to make '--no-parents' the default, then we'd still need
'--parents' to allow overriding it. But then the case for '-p' would
be pretty weak.

What do you think of Jared's proposal? I'm guardedly in favor; are
there cases where one *wouldn't* want the parent-creating behavior,
and if so, are they compelling enough to override the principle that
the intuitive thing should be the default?

I feel like if this is important enough to contemplate using up a
short option ('-p') on, then maybe it's important enough to just be
the default in the first place.


To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri May 18 06:20:47 2007

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