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

Re: [PATCH] -cM-N command line syntax

From: Peter Samuelson <peter_at_p12n.org>
Date: Mon, 4 Oct 2010 11:43:11 -0500

[Paul Burba]
> FWIW diff/merge gained -c in 1.4 and log got it in 1.5.

Sounds right.

> > The following patch allows "-c" on the command line to use the same
> > range syntax as svn:mergeinfo.  Thus you can cut and paste those ranges
> > from 'svn diff' output, into commands such as 'svn log' and 'svn merge'.
>
> Your patch is against 1.6 right? Usually it's best to go against
> trunk, since that is where the change will be made.

Yes, but applies to trunk with no conflicts. I patched trunk
originally, then applied to 1.6 so I could test in my work environment
where I use 1.6, and I guess I posted the 1.6 patch to the list. It's
the same patch though.

> Unfortunately I can't apply this patch, I keep getting 'The chunk size
> did not match the number of added/removed lines' error...But doing the
> match everything looks correct. I'm using TortoiseMerge and I assume
> it doesn't like the timestamp in the diff's header and rather expects
> a revision number or "working copy" comment.

I bet somewhere in the pipeline (list software or whatever else),
trailing spaces are being stripped from blank lines (" \n"), so they
look like they're no longer part of the patch.

Just a guess.

> On Sat, Oct 2, 2010 at 9:34 PM, Peter Samuelson <peter_at_p12n.org> wrote:
> > Hmmm, in tests/cmdline/log_tests.py XFail(log_chanage_range), I see
> > Lieven thought -c might someday take ranges with ":" instead of "-".
> > But since the output uses "-", I'd argue the cut-and-paste utility of
> > sticking with that outweighs the consistency of ":". Unless perhaps we
> > should support both, which would be trivial.
>
> No objections to supporting both. Really all we are asking then is
> that users remember that -c'X-Y' is inclusive of X and '-cX:Y' is
> exclusive. Of course we may rapidly be approaching the point where -r
> and -c both support ':' and '-' and effectively become the same
> option.

Huh. I didn't interpret ":" to always imply an exclusive range. I
figured -c vs. -r was the overriding factor here. In Lieven's XFail
test, -c2:5 is inclusive, but that doesn't tell us much, it's a 'log'
test and 'log' is always inclusive.

So if we support '-c2-5', we can say that's always inclusive, but if
we (also) support '-c2:5' there's the question of whether it means the
same as '-c2-5' or the same as '-r2:5'.

I'm not wedded to -c2:5 anyway, as my use case is pasting svn:mergeinfo
onto the command line, but if we're gonna support it we should know
what it's supposed to mean. (:

Peter
Received on 2010-10-04 18:43:56 CEST

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.