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

Re: [PATCH] --reverse option to invert -c/--change

From: Bart Robinson <lomew_at_pobox.com>
Date: 2006-01-13 18:39:37 CET

On 2006-1-13 Julian Foad <julianfoad@btopenworld.com> wrote:
> Bart Robinson wrote:
> > Hi,
> > Here is a patch to help flesh out the utility of the -c/--change
> > option.
> >
> > Some background in this thread:
> > http://svn.haxx.se/dev/archive-2005-10/1324.shtml
> > (should I put that in the commit message?)
> >
> > E.g.,
> > svn merge -c 100 --reverse URL
> > same as
> > svn merge -r100:99 URL
>
> It seems to me fairly certain that we want this ability to reverse the
> direction of a change.
>
> "--reverse" is perhaps too generic a name for the option: we
> might well want to reverse other things than the direction of
> a change, and it seems unlikely that it will make sense to
> share a common option name for reversing completely different
> things. We should consider a more specific option name like
> "--reverse-change".

I couldn't come up with ideas for any other options that
--reverse could modify, so it does feel too general to me as
well.

Actually, it *seems* more general to have this modifier idea,
but it could actually be seen as more restrictive: If there were
other reversible options and you wanted to use more than one in
one command, you wouldn't be able to reverse the sense of just
one of them (unless --reverse applied only to the arg next to
it, but that conflicts with svn's idea of 'put args in any
order' and would complicate arg parsing).

> If the switch will only apply to "-c" then we could make it
> an alternative to "-c" rather than an addition to it:
> e.g. "--reverse-change REVNUM" (possibly with a short name
> "-C REVNUM").

I agree that something else could be better, however
--reverse-change seems confusing when compared with --change
since one uses "change" as a verb/operation and the other like a
noun. Maybe --rchange/-C and --change/-c? Or make them both
verbs like --reverse-change and --use/add/apply-change (that
makes sense with "merge", which actually does stuff to your WC,
but is less natural with "diff", which just produces output).

-- bart

> Do we want the reversal switch to apply to "-r" as well?
> That is not necessary in the basic cases (such as "-r X:Y")
> but we might decide it is convenient and consistent. Indeed
> it might enable some desirable diffs that are not possible at
> present: like the reverse of a plain diff (WC against BASE ->
> BASE against WC). (Am I right about that? If so, a better
> solution to that particular problem might be to introduce a
> "WORKING" or "WC" revision-keyword.)
>
> Thoughts?

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Jan 13 19:12:04 2006

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.