[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: Jared Hardy <jaredhardy_at_gmail.com>
Date: 2007-05-18 03:57:39 CEST

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.

:) Jred

On 5/17/07, Kamesh Jayachandran <kamesh@collab.net> wrote:
> C. Michael Pilato wrote:
> > Kamesh Jayachandran wrote:
> >
> >> [[[
> >>
> >> Provide '-p' shortcut for '--parents'.
> >>
> >> * subversion/svn/cl.h
> >> (svn_cl__longopt_t): Remove 'svn_cl__parents_opt'.
> >> * subversion/svn/main.c
> >> (svn_cl__options): Register '-p' shortcut for '--parents'.
> >> (svn_cl__cmd_table): Register '-p' to be the allowable parameter to 'add',
> >> 'copy', 'mkdir', 'move'.
> >> (main): Set 'opt_state.parents' for '-p' switch too.
> >>
> >> Patch by: kameshj
> >> ]]]
> >>
> >
> > I thought about submitting this same patch myself because of the obvious
> > 'mkdir -p'. But 'copy' also takes --parents, and 'cp -p' means something
> > totally different. Alas, I'm not sure this merits the consumption of a
> > short_opt.
> >
> >
> <snip from man cp>
> -p same as --preserve=mode,ownership,timestamps
> </snip>
> Subversion does not know ownership as such(left to external
> authorization modules).
> I am not sure copying timestamp(svn:date) makes sense?
> We support 'executable' mode via versioned property which is copied anyways.
>
> So expecting 'svn cp -p' to behave as 'cp -p' shows once ignorance about
> subversion.
>
> I think here the goal is user experience(All these days I used mkdir -p,
> and learnt the --parents equivalent only today.) not parity with
> existing tools especially when one is not possible.
>
> With regards
> Kamesh Jayachandran
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri May 18 03:57:48 2007

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