You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by "C. Michael Pilato" <cm...@collab.net> on 2005/08/04 14:51:10 UTC
'svn merge -rX' UI annoyance.
I'm constantly frustrated that passing -rX (instead of -rX:Y) as the
operative range for merge operations doesn't default to -rX:X-1
behavior. Like, I wanna say "cherry pick a merge of revision 14" and
I run 'svn merge -r14 ...' only to get bounced for not having
specified a full revision range.
What would others think about relaxing the 'svn merge' UI such that
passing a single revision means, "merge that one revision"?
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: 'svn merge -rX' UI annoyance.
Posted by Mark Phippard <Ma...@softlanding.com>.
news <ne...@sea.gmane.org> wrote on 08/04/2005 11:38:40 AM:
> in svk, we use merge -c to say merge that change, to avoid confuse
> people with revision being sometimes referring to a tree but sometimes
> a change.
>
> So you can also merge -c -12, which means to -r12:11 for rolling things
> back.
Thanks. That is exactly what I was implying in my suggestion of --revs. A
new option that indicates a cherry-picked revision.
While I would also be in favor of cmpilato's suggestion, I do think that
one could reasonably argue that by making this change you might just be
creating more confusion once the user gets around to merging a range of
revisions. It just bring up the whole X-1 argument again.
Mark
_____________________________________________________________________________
Scanned for SoftLanding Systems, Inc. by IBM Email Security Management Services powered by MessageLabs.
_____________________________________________________________________________
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: 'svn merge -rX' UI annoyance.
Posted by Chia-liang Kao <cl...@clkao.org>.
C. Michael Pilato <cmpilato <at> collab.net> writes:
>
> I'm constantly frustrated that passing -rX (instead of -rX:Y) as the
> operative range for merge operations doesn't default to -rX:X-1
> behavior. Like, I wanna say "cherry pick a merge of revision 14" and
> I run 'svn merge -r14 ...' only to get bounced for not having
> specified a full revision range.
>
> What would others think about relaxing the 'svn merge' UI such that
> passing a single revision means, "merge that one revision"?
in svk, we use merge -c to say merge that change, to avoid confuse
people with revision being sometimes referring to a tree but sometimes
a change.
So you can also merge -c -12, which means to -r12:11 for rolling things
back.
Cheers,
CLK
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: 'svn merge -rX' UI annoyance.
Posted by Marc Sherman <ms...@projectile.ca>.
C. Michael Pilato wrote:
> I'm constantly frustrated that passing -rX (instead of -rX:Y) as the
> operative range for merge operations doesn't default to -rX:X-1
> behavior. Like, I wanna say "cherry pick a merge of revision 14" and
> I run 'svn merge -r14 ...' only to get bounced for not having
> specified a full revision range.
Um... -rX-1:X, I think. :)
> What would others think about relaxing the 'svn merge' UI such that
> passing a single revision means, "merge that one revision"?
I'm not a dev, and get no vote, but I think it's a great idea.
- Marc
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: 'svn merge -rX' UI annoyance.
Posted by "C. Michael Pilato" <cm...@collab.net>.
kfogel@collab.net writes:
> "C. Michael Pilato" <cm...@collab.net> writes:
> > > -r PRIOR:N would work, or we could opt for something more magic, like
> > > -r :N or -c N or some such. Nothing really jumps out at me as superior.
> >
> > Check my patch -- it adds underlying support for exactly such a
> > keyword. All that it lacks is the parsing of some text (like "PRIOR")
> > into the new svn_opt_revision_range_prev "kind" I created.
>
> I really like the empty string solution ("-r:N") Greg proposed. It's
> essentially just as easy to type, but doesn't overload the current
> meaning of -rX, and thus could DTRT for diff as well as merge.
>
> Could we just support that, and leave -rX alone?
Works for me.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: 'svn merge -rX' UI annoyance.
Posted by "C. Michael Pilato" <cm...@collab.net>.
Julian Foad <ju...@btopenworld.com> writes:
> kfogel@collab.net wrote:
> > "C. Michael Pilato" <cm...@collab.net> writes:
> >
> >>>-r PRIOR:N would work, or we could opt for something more magic, like
> >>>-r :N or -c N or some such. Nothing really jumps out at me as superior.
> >>
> >>Check my patch -- it adds underlying support for exactly such a
> >>keyword. All that it lacks is the parsing of some text (like "PRIOR")
> >>into the new svn_opt_revision_range_prev "kind" I created.
> > I really like the empty string solution ("-r:N") Greg proposed. It's
> > essentially just as easy to type, but doesn't overload the current
> > meaning of -rX, and thus could DTRT for diff as well as merge.
> > Could we just support that, and leave -rX alone?
>
> Karl, really! Far too ambiguous. No. Somebody earlier this year
> tried hard to persuade me to accept a patch making ":N" mean "0:N" and
> "N:" mean "N:HEAD". You see what I mean?
Oh, yeah. Good point. Being a Pythonic kind of guy, if I saw syntax
like :N or N:, I would assume the same (0:N, N:HEAD).
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: 'svn merge -rX' UI annoyance.
Posted by Christopher Ness <ch...@nesser.org>.
On Fri, 2005-08-05 at 19:14 +0100, Julian Foad wrote:
> Peter Samuelson wrote:
> > [Christopher Ness]
> >
> >>The user could enter `-r100+1:100` and the left revision would be
> >>evaluated to 101. Or -r100:2*100-1 where the right right revision
> >>evaluates to (2*100)-1 = 199
> >
> > '+' and '-' I can see. What is the use case for '*'?
>
> Stop! Please don't discuss revision arithmetic in this thread.
Ok, revision arithmetic seems interesting, I'll read up on the archives
after vacation and start a new thread after some more leg work.
Sorry about the thread branch. ;)
The relative keywords are still valid to this conversation though.
Cheers,
Chris
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: 'svn merge -rX' UI annoyance.
Posted by Julian Foad <ju...@btopenworld.com>.
Peter Samuelson wrote:
> [Christopher Ness]
>
>>The user could enter `-r100+1:100` and the left revision would be
>>evaluated to 101. Or -r100:2*100-1 where the right right revision
>>evaluates to (2*100)-1 = 199
>
> '+' and '-' I can see. What is the use case for '*'?
Stop! Please don't discuss revision arithmetic in this thread.
This thread is about a simple way of specifying "-r(X-1):X". Only.
If you are interested in revision arithmetic, first read the archived
discussions on it (basic summary: something like it would be useful, but
probably adding and subtracting a given number of actual changes to a specified
item, rather than just the global revision numbers; no concrete proposals have
been made for such a feature)...
... and then start a new mail thread if you want to discuss it.
- Julian
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: 'svn merge -rX' UI annoyance.
Posted by Peter Samuelson <pe...@p12n.org>.
[Christopher Ness]
> The user could enter `-r100+1:100` and the left revision would be
> evaluated to 101. Or -r100:2*100-1 where the right right revision
> evaluates to (2*100)-1 = 199
'+' and '-' I can see. What is the use case for '*'?
Peter
Re: 'svn merge -rX' UI annoyance.
Posted by Christopher Ness <ch...@nesser.org>.
On Thu, 2005-08-04 at 12:59 -0500, kfogel@collab.net wrote:
> Julian Foad <ju...@btopenworld.com> writes:
> > When I said "ambiguous" I didn't mean syntactically ambiguous for
> > parsing, but too confusing for the user to learn in the context of
> > what we already have, which includes "-rX" means "-rX:WC" for "svn
> > diff WC" or "-rX:HEAD" for "svn diff URL".
>
> Perhaps a new special word (such as PRIOR) would be better than.
The keywords currently in use for {log,merge,diff} are:
NUMBER revision number
"{" DATE "}" revision at start of the date
"HEAD" latest in repository
"BASE" base rev of item's working copy
"COMMITTED" last commit at or before BASE
"PREV" revision just before COMMITTED
But these are statically based on the repository or working copy.
Perhaps some RELATIVE keywords are needed based on the other argument in
a revision range, like -rX:Y
For example prefix the relative keyworkds with 'R' only operate for a
range such as
RPREV = N-1 s.t. N > 0
RCOMMITTED = last commit at or before other range number
RNEXT = N+1 s.t. N < HEAD
-r100:RPREV = 100:99 or switching it
-rRPREV:100 = 99:100
-rRPREV = UNDEFINED or perhaps PREV
The BASE and HEAD keywords don't make much sense in a relative term.
I'd also suggest a new keyword one RNEXT.
NEW THOUGHT:
When I was reading this thread I thought it would be nice if svn allowed
a mathematical revision number.
The user could enter `-r100+1:100` and the left revision would be
evaluated to 101. Or -r100:2*100-1 where the right right revision
evaluates to (2*100)-1 = 199
Bracketing would need to be required for proper syntax of order of
operations making the implementation more difficult.
Thoughts? I'm off to vacation for two weeks so I won't be around, but
hopefully someone will take the ball and run with it.
Cheers,
Chris
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: 'svn merge -rX' UI annoyance.
Posted by kf...@collab.net.
Julian Foad <ju...@btopenworld.com> writes:
> Er, but I _am_ also opposed to "-rX" for "svn merge"! Did I imply otherwise?
Heh! No, you didn't imply otherwise, I just didn't realize that, sorry.
> When I said "ambiguous" I didn't mean syntactically ambiguous for
> parsing, but too confusing for the user to learn in the context of
> what we already have, which includes "-rX" means "-rX:WC" for "svn
> diff WC" or "-rX:HEAD" for "svn diff URL".
Perhaps a new special word (such as PRIOR) would be better than.
-K
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: 'svn merge -rX' UI annoyance.
Posted by Julian Foad <ju...@btopenworld.com>.
kfogel@collab.net wrote:
> Julian Foad <ju...@btopenworld.com> writes:
>
>>Karl, really! Far too ambiguous. No. Somebody earlier this year
>>tried hard to persuade me to accept a patch making ":N" mean "0:N" and
>>"N:" mean "N:HEAD". You see what I mean?
>
> It is no more or less ambiguous than -rX, which, after all, also says
> nothing about the implied revision.
[...]
> I can understand being opposed to ambiguousness in general. But I
> can't understand being opposed to -r:X on the grounds of
> ambiguousness, yet not to -rX :-).
Er, but I _am_ also opposed to "-rX" for "svn merge"! Did I imply otherwise?
When I said "ambiguous" I didn't mean syntactically ambiguous for parsing, but
too confusing for the user to learn in the context of what we already have,
which includes "-rX" means "-rX:WC" for "svn diff WC" or "-rX:HEAD" for "svn
diff URL".
I'd be very glad to get rid of at least the implied ":HEAD" for diff of a URL,
and might propose that for Subversion v2.
- Julian
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: 'svn merge -rX' UI annoyance.
Posted by Ben Collins-Sussman <su...@collab.net>.
On Aug 5, 2005, at 11:54 AM, Greg Hudson wrote:
> On Fri, 2005-08-05 at 11:37 -0500, Ben Collins-Sussman wrote:
>
>> 'svn merge' may have flexible syntax, but merge *always* compares two
>> revisions in the repository. In that sense, it's always equivalent
>> to the 3rd case of 'svn diff'.
>>
>
> Oh, I see. Merge only uses wc paths to identify URLs; you can't
> use wc
> contents as merge sources.
>
> Anyway, the point is more that diff, as well as merge, could benefit
> from an abbreviated form of -rX-1:X, but isn't in a position to
> redefine
> -rX. Also, that if people learn that -rX behaves a certain way in
> merge, they might start expect it to behave that way in other
> commands,
> particularly in the analagous case of diff.
>
> I'm not -1 on making merge -rX do what CMike wants, particularly if we
> can't find an acceptable syntax for abbreviating -rX-1:X. But I think
> extending the revision-range syntax is more appropriate than Keloizing
> "svn merge -rX".
>
Yeah, I actually kinda like the '-c X' changeset syntax that svk uses.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: 'svn merge -rX' UI annoyance.
Posted by Greg Hudson <gh...@MIT.EDU>.
On Fri, 2005-08-05 at 11:37 -0500, Ben Collins-Sussman wrote:
> 'svn merge' may have flexible syntax, but merge *always* compares two
> revisions in the repository. In that sense, it's always equivalent
> to the 3rd case of 'svn diff'.
Oh, I see. Merge only uses wc paths to identify URLs; you can't use wc
contents as merge sources.
Anyway, the point is more that diff, as well as merge, could benefit
from an abbreviated form of -rX-1:X, but isn't in a position to redefine
-rX. Also, that if people learn that -rX behaves a certain way in
merge, they might start expect it to behave that way in other commands,
particularly in the analagous case of diff.
I'm not -1 on making merge -rX do what CMike wants, particularly if we
can't find an acceptable syntax for abbreviating -rX-1:X. But I think
extending the revision-range syntax is more appropriate than Keloizing
"svn merge -rX".
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: 'svn merge -rX' UI annoyance.
Posted by Ben Collins-Sussman <su...@collab.net>.
On Aug 5, 2005, at 11:32 AM, Greg Hudson wrote:
> On Fri, 2005-08-05 at 08:33 -0500, Ben Collins-Sussman wrote:
>
>> The diff command has three distinct abilities:
>>
>> * compare working to text-base
>> * compare working to repository
>> * compare repository to repository.
>>
>> Of these three use-cases, *only* the third one is similar to 'svn
>> merge'.
>>
>
> Take a look at "svn help merge". I think you have an overly
> restrictive
> notion of what our merge command can do.
>
'svn merge' may have flexible syntax, but merge *always* compares two
revisions in the repository. In that sense, it's always equivalent
to the 3rd case of 'svn diff'.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: 'svn merge -rX' UI annoyance.
Posted by Greg Hudson <gh...@MIT.EDU>.
On Fri, 2005-08-05 at 08:33 -0500, Ben Collins-Sussman wrote:
> The diff command has three distinct abilities:
>
> * compare working to text-base
> * compare working to repository
> * compare repository to repository.
>
> Of these three use-cases, *only* the third one is similar to 'svn
> merge'.
Take a look at "svn help merge". I think you have an overly restrictive
notion of what our merge command can do.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: 'svn merge -rX' UI annoyance.
Posted by Julian Foad <ju...@btopenworld.com>.
Ben Collins-Sussman wrote:
>
> On Aug 5, 2005, at 11:45 AM, Julian Foad wrote:
>
>> Ben Collins-Sussman wrote:
>>
>>> I've heard both kfogel and ghudson say that they think 'diff' and
>>> 'merge' should behave consistently, but I think this is a
>>> potentially dangerous goal.
>>> The diff command has three distinct abilities:
>>> * compare working to text-base
>>> * compare working to repository
>>> * compare repository to repository.
>>>
>>
>> That's not an accurate categorisation of "svn diff"'s abilities. For
>> example, it can also compare text-base to repository ("diff - rBASE:23
>> WC-PATH") and working to working ("diff --old=WC1 -- new=WC2").
>
> Yep, --old and --new seem to allow a whole bunch of possibilities. But
> if you actually try anything beyond those three cases above, you'll get
> an 'unsupported' error. They're the only codepaths that exist, I'm
> pretty sure.
Negative. You try it, or watch me try it:
$ svn diff -rBASE:23 t
Index: t
[...]
- Julian
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: 'svn merge -rX' UI annoyance.
Posted by Ben Collins-Sussman <su...@collab.net>.
On Aug 5, 2005, at 11:45 AM, Julian Foad wrote:
> Ben Collins-Sussman wrote:
>
>> I've heard both kfogel and ghudson say that they think 'diff' and
>> 'merge' should behave consistently, but I think this is a
>> potentially dangerous goal.
>> The diff command has three distinct abilities:
>> * compare working to text-base
>> * compare working to repository
>> * compare repository to repository.
>>
>
> That's not an accurate categorisation of "svn diff"'s abilities.
> For example, it can also compare text-base to repository ("diff -
> rBASE:23 WC-PATH") and working to working ("diff --old=WC1 --
> new=WC2").
Yep, --old and --new seem to allow a whole bunch of possibilities.
But if you actually try anything beyond those three cases above,
you'll get an 'unsupported' error. They're the only codepaths that
exist, I'm pretty sure.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: 'svn merge -rX' UI annoyance.
Posted by Julian Foad <ju...@btopenworld.com>.
Ben Collins-Sussman wrote:
>
> I've heard both kfogel and ghudson say that they think 'diff' and
> 'merge' should behave consistently, but I think this is a potentially
> dangerous goal.
>
> The diff command has three distinct abilities:
>
> * compare working to text-base
> * compare working to repository
> * compare repository to repository.
That's not an accurate categorisation of "svn diff"'s abilities. For example,
it can also compare text-base to repository ("diff -rBASE:23 WC-PATH") and
working to working ("diff --old=WC1 --new=WC2"). The abilities could be
categorised as:
* For each specified versioned item, show the difference between how it was
at revision X and how it was at revision Y.
* Show the difference between (optionally specified pathnames within) two
separate trees.
> Of these three use-cases, *only* the third one is similar to 'svn merge'.
Indeed, but that's really only because it happens not to support a way to
specify the working copy as a pseudo-revision. There's no semantic reason why
it shouldn't, as far as I'm aware.
Of my two categories, both are similar to "svn merge". (One obvious difference
is that "merge" only operates on one item rather than an arbitrary list.)
> We've gone through hell trying to come up with an understandable 'svn
> diff' syntax that covers the three use-cases. I'm wary of starting to
> tweak 'svn diff' syntax just so that the 3rd use-case behaves in
> special ways that make it behave more like 'svn merge'. 'svn diff'
> syntax already complex, bordering on confusing.
I hear you. It's good to be wary.
> I guess I'm not entirely clear on what's being proposed, though. It
> sounds like people are asking for 'svn merge [some new syntax of X]
> URL' to mean "merge revision X-1:X of URL".
Correct.
> I'm afraid that if we
> introduce the new syntax to 'svn diff', it will have to somehow be
> restricted to *only* the affect 3rd use-case, and done in such a way so
> as not to interfere with the other two use-cases. Is this really
> possible?
I'd imagine it is not only possible but inevitable. If the user specified
something meaning "-r(X-1):X" then he can't possibly be requesting a WC diff,
so where's the problem?
- Julian
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: 'svn merge -rX' UI annoyance.
Posted by Ben Collins-Sussman <su...@collab.net>.
On Aug 4, 2005, at 12:20 PM, kfogel@collab.net wrote:
>
> The advantage of -r:X is that it allows us to make the same behavior
> for diff and merge, which are two commands we've been trying to keep
> consistent.
I've heard both kfogel and ghudson say that they think 'diff' and
'merge' should behave consistently, but I think this is a potentially
dangerous goal.
The diff command has three distinct abilities:
* compare working to text-base
* compare working to repository
* compare repository to repository.
Of these three use-cases, *only* the third one is similar to 'svn
merge'.
We've gone through hell trying to come up with an understandable 'svn
diff' syntax that covers the three use-cases. I'm wary of starting
to tweak 'svn diff' syntax just so that the 3rd use-case behaves in
special ways that make it behave more like 'svn merge'. 'svn diff'
syntax already complex, bordering on confusing.
I guess I'm not entirely clear on what's being proposed, though. It
sounds like people are asking for 'svn merge [some new syntax of X]
URL' to mean "merge revision X-1:X of URL". I'm afraid that if we
introduce the new syntax to 'svn diff', it will have to somehow be
restricted to *only* the affect 3rd use-case, and done in such a way
so as not to interfere with the other two use-cases. Is this really
possible? Is it worth treading there?
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: 'svn merge -rX' UI annoyance.
Posted by kf...@collab.net.
Julian Foad <ju...@btopenworld.com> writes:
> Karl, really! Far too ambiguous. No. Somebody earlier this year
> tried hard to persuade me to accept a patch making ":N" mean "0:N" and
> "N:" mean "N:HEAD". You see what I mean?
It is no more or less ambiguous than -rX, which, after all, also says
nothing about the implied revision.
The advantage of -r:X is that it allows us to make the same behavior
for diff and merge, which are two commands we've been trying to keep
consistent. Whereas if we use -rX, then we can't do that, because -rX
already means something else for diff (something we wouldn't want it
to mean for merge).
I can understand being opposed to ambiguousness in general. But I
can't understand being opposed to -r:X on the grounds of
ambiguousness, yet not to -rX :-).
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: 'svn merge -rX' UI annoyance.
Posted by Julian Foad <ju...@btopenworld.com>.
kfogel@collab.net wrote:
> "C. Michael Pilato" <cm...@collab.net> writes:
>
>>>-r PRIOR:N would work, or we could opt for something more magic, like
>>>-r :N or -c N or some such. Nothing really jumps out at me as superior.
>>
>>Check my patch -- it adds underlying support for exactly such a
>>keyword. All that it lacks is the parsing of some text (like "PRIOR")
>>into the new svn_opt_revision_range_prev "kind" I created.
>
> I really like the empty string solution ("-r:N") Greg proposed. It's
> essentially just as easy to type, but doesn't overload the current
> meaning of -rX, and thus could DTRT for diff as well as merge.
>
> Could we just support that, and leave -rX alone?
Karl, really! Far too ambiguous. No. Somebody earlier this year tried hard
to persuade me to accept a patch making ":N" mean "0:N" and "N:" mean "N:HEAD".
You see what I mean?
- Julian
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: 'svn merge -rX' UI annoyance.
Posted by kf...@collab.net.
"C. Michael Pilato" <cm...@collab.net> writes:
> > -r PRIOR:N would work, or we could opt for something more magic, like
> > -r :N or -c N or some such. Nothing really jumps out at me as superior.
>
> Check my patch -- it adds underlying support for exactly such a
> keyword. All that it lacks is the parsing of some text (like "PRIOR")
> into the new svn_opt_revision_range_prev "kind" I created.
I really like the empty string solution ("-r:N") Greg proposed. It's
essentially just as easy to type, but doesn't overload the current
meaning of -rX, and thus could DTRT for diff as well as merge.
Could we just support that, and leave -rX alone?
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: 'svn merge -rX' UI annoyance.
Posted by "C. Michael Pilato" <cm...@collab.net>.
Greg Hudson <gh...@MIT.EDU> writes:
> On Thu, 2005-08-04 at 18:22 +0100, Julian Foad wrote:
> > Though it would be more difficult to implement, I think the proposal to accept
> > a revision keyword which means "the other revision minus one" is a better
> > strategy because it can be unambiguous, uniform across different commands, and
> > extensible in a backward-compatible way.
>
> Yeah, I'm coming to a similar conclusion. Some way of writing -r N-1:N
> which applies to all commands seems more appropriate than special-casing
> "svn merge -rN" simply because that currently has no meaning.
>
> (I'm a little surprised that "svn merge -rN URL" doesn't do the same
> thing as "svn diff -rN URL", which is N:HEAD. That's probably not a
> terribly common desire, but it would be consistent.)
>
> -r PRIOR:N would work, or we could opt for something more magic, like
> -r :N or -c N or some such. Nothing really jumps out at me as superior.
Check my patch -- it adds underlying support for exactly such a
keyword. All that it lacks is the parsing of some text (like "PRIOR")
into the new svn_opt_revision_range_prev "kind" I created.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: 'svn merge -rX' UI annoyance.
Posted by John Szakmeister <jo...@szakmeister.net>.
On Thursday 04 August 2005 13:29, Greg Hudson wrote:
> On Thu, 2005-08-04 at 18:22 +0100, Julian Foad wrote:
> > Though it would be more difficult to implement, I think the proposal to
> > accept a revision keyword which means "the other revision minus one" is a
> > better strategy because it can be unambiguous, uniform across different
> > commands, and extensible in a backward-compatible way.
>
> Yeah, I'm coming to a similar conclusion. Some way of writing -r N-1:N
> which applies to all commands seems more appropriate than special-casing
> "svn merge -rN" simply because that currently has no meaning.
>
> (I'm a little surprised that "svn merge -rN URL" doesn't do the same
> thing as "svn diff -rN URL", which is N:HEAD. That's probably not a
> terribly common desire, but it would be consistent.)
>
> -r PRIOR:N would work, or we could opt for something more magic, like
> -r :N or -c N or some such. Nothing really jumps out at me as superior.
I just wanted to point out that svk is using '-c N' to represent a changeset.
I'd vote for that notation as well.
-John
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: 'svn merge -rX' UI annoyance.
Posted by Peter Samuelson <pe...@p12n.org>.
[Greg Hudson]
> -r PRIOR:N would work, or we could opt for something more magic, like
> -r :N or -c N or some such. Nothing really jumps out at me as superior.
This non-developer would vote for some -cN which is a synonym for
-rN-1:N in all contexts. Which option letters do not conflict with any
existing or proposed options for commands that uses -r is something I
have not deeply considered. Perhaps -R.
Peter
Re: 'svn merge -rX' UI annoyance.
Posted by Mark Phippard <Ma...@softlanding.com>.
cmpilato@localhost.localdomain wrote on 08/04/2005 01:45:48 PM:
> Mark Phippard <Ma...@softlanding.com> writes:
>
> > 2) Last change, let's call this PRIOR. Meaning an item could be
changed
> > in revision 14, 25, and 30. The value of PREV:30 would be 29:30. The
> > value of PRIOR:30 would be 25:30. Likewise, a value of 30:PRIOR would
be
> > 30:25 etc...
>
> Is there a meaningful difference between PREV and PRIOR, understanding
> that for an item that changes in 25 and 30, it looks the same in
> 26-30?
Probably not. Good point. So what is really needed is just the new N-1
behavior, I would agree that leaving PREV alone and calling this PRIOR
makes sense.
Mark
_____________________________________________________________________________
Scanned for SoftLanding Systems, Inc. by IBM Email Security Management Services powered by MessageLabs.
_____________________________________________________________________________
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: 'svn merge -rX' UI annoyance.
Posted by "C. Michael Pilato" <cm...@collab.net>.
Mark Phippard <Ma...@softlanding.com> writes:
> 2) Last change, let's call this PRIOR. Meaning an item could be changed
> in revision 14, 25, and 30. The value of PREV:30 would be 29:30. The
> value of PRIOR:30 would be 25:30. Likewise, a value of 30:PRIOR would be
> 30:25 etc...
Is there a meaningful difference between PREV and PRIOR, understanding
that for an item that changes in 25 and 30, it looks the same in
26-30?
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: 'svn merge -rX' UI annoyance.
Posted by Mark Phippard <Ma...@softlanding.com>.
Greg Hudson <gh...@MIT.EDU> wrote on 08/04/2005 01:29:30 PM:
> On Thu, 2005-08-04 at 18:22 +0100, Julian Foad wrote:
> > Though it would be more difficult to implement, I think the proposal
to accept
> > a revision keyword which means "the other revision minus one" is a
better
> > strategy because it can be unambiguous, uniform across different
commands, and
> > extensible in a backward-compatible way.
>
> Yeah, I'm coming to a similar conclusion. Some way of writing -r N-1:N
> which applies to all commands seems more appropriate than special-casing
> "svn merge -rN" simply because that currently has no meaning.
>
> (I'm a little surprised that "svn merge -rN URL" doesn't do the same
> thing as "svn diff -rN URL", which is N:HEAD. That's probably not a
> terribly common desire, but it would be consistent.)
>
> -r PRIOR:N would work, or we could opt for something more magic, like
> -r :N or -c N or some such. Nothing really jumps out at me as superior.
I think that svn could use two new revision keywords.
1) N-1, where N is just the other revision argument (left or right).
Personally, I think that PREV should be changed to have this meaning.
2) Last change, let's call this PRIOR. Meaning an item could be changed
in revision 14, 25, and 30. The value of PREV:30 would be 29:30. The
value of PRIOR:30 would be 25:30. Likewise, a value of 30:PRIOR would be
30:25 etc...
Mark
_____________________________________________________________________________
Scanned for SoftLanding Systems, Inc. by IBM Email Security Management Services powered by MessageLabs.
_____________________________________________________________________________
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: 'svn merge -rX' UI annoyance.
Posted by Greg Hudson <gh...@MIT.EDU>.
On Thu, 2005-08-04 at 18:22 +0100, Julian Foad wrote:
> Though it would be more difficult to implement, I think the proposal to accept
> a revision keyword which means "the other revision minus one" is a better
> strategy because it can be unambiguous, uniform across different commands, and
> extensible in a backward-compatible way.
Yeah, I'm coming to a similar conclusion. Some way of writing -r N-1:N
which applies to all commands seems more appropriate than special-casing
"svn merge -rN" simply because that currently has no meaning.
(I'm a little surprised that "svn merge -rN URL" doesn't do the same
thing as "svn diff -rN URL", which is N:HEAD. That's probably not a
terribly common desire, but it would be consistent.)
-r PRIOR:N would work, or we could opt for something more magic, like
-r :N or -c N or some such. Nothing really jumps out at me as superior.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: 'svn merge -rX' UI annoyance.
Posted by Julian Foad <ju...@btopenworld.com>.
C. Michael Pilato wrote:
> I'm constantly frustrated that passing -rX (instead of -rX:Y) as the
> operative range for merge operations doesn't default to -rX:X-1
> behavior. Like, I wanna say "cherry pick a merge of revision 14" and
> I run 'svn merge -r14 ...' only to get bounced for not having
> specified a full revision range.
>
> What would others think about relaxing the 'svn merge' UI such that
> passing a single revision means, "merge that one revision"?
I'd think that is just the sort of useful default we should have. It avoids
the user having to specify something that the program could work out easily but
which is not trivial for the user or a script to work out. (That is, it's not
a simple constant like "." or "HEAD".)
Of course, for symmetry, "svn diff" should do the same. The trouble is, we've
painted ourselves into a corner by providing some less useful defaults already
in the "diff" syntax, where ":Y" defaults to ":HEAD" for URLs.
In the same vein, WCPATH defaulting to "." is not the greatest decision we have
made. For very often used commands like "status", it's handy, but for less
common and data-changing commands like "commit" and "merge", it perhaps causes
more trouble than it saves, especially if we come later to wish we could assign
a less trivial but still useful default.
So, I don't know. Should "rX" means "rX-1:X" for "merge" but something
completely different, "-rX:HEAD", for "diff" with URLs? I don't much like that.
Though it would be more difficult to implement, I think the proposal to accept
a revision keyword which means "the other revision minus one" is a better
strategy because it can be unambiguous, uniform across different commands, and
extensible in a backward-compatible way.
- Julian
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: 'svn merge -rX' UI annoyance.
Posted by "Øyvind A. Holm" <su...@sunbase.org>.
On 2005-08-04 09:51:10 C. Michael Pilato wrote:
> I'm constantly frustrated that passing -rX (instead of -rX:Y) as the
> operative range for merge operations doesn't default to -rX:X-1
> behavior. Like, I wanna say "cherry pick a merge of revision 14" and
> I run 'svn merge -r14 ...' only to get bounced for not having
> specified a full revision range.
>
> What would others think about relaxing the 'svn merge' UI such that
> passing a single revision means, "merge that one revision"?
I have been thinking about the exact same thing, and I fully agree. I
don’t think it would break anything if svn merge interprets -r90 as
-r89:90. Especially as there’s always the possibility to override it
with a revision range.
Mvh,
Øyvind A. Holm
--
#!/bin/bash
for f in 1 2 3; do
PREF=http://musthave.sunbase.org/Stallman/stallman${f}c
wget $PREF.sub ; mplayer -cache 8192 -sub stallman${f}c.sub $PREF.mpeg
done
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: 'svn merge -rX' UI annoyance.
Posted by "Øyvind A. Holm" <su...@sunbase.org>.
On 2005-08-04 11:14:20 C. Michael Pilato wrote:
> kfogel@collab.net writes:
> > "C. Michael Pilato" <cm...@collab.net> writes:
> > > I'm constantly frustrated that passing -rX (instead of -rX:Y) as
> > > the operative range for merge operations doesn't default to
> > > -rX:X-1 behavior. Like, I wanna say "cherry pick a merge of
> > > revision 14" and I run 'svn merge -r14 ...' only to get bounced
> > > for not having specified a full revision range.
> > >
> > > What would others think about relaxing the 'svn merge' UI such
> > > that passing a single revision means, "merge that one revision"?
> >
> > +1 Love the idea!
> >
> > I hope you meant it for both 'svn diff' and 'svn merge'?
>
> Diff already has a meaning for -rN, so, no, I didn't mean it for diff,
> too. Not sure if the current 'svn diff -rN' behavior is better than
> this new proposal ... haven't thought it through.
After looking at my usage pattern of the svn client, it would be way
more keyboard-friendly. In 95% of the cases I want to find out “what
happened in that revision” instead of “what has happened between BASE
and revision X”. But I suppose it’s too late to change it now anyway.
-- sunny256
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: 'svn merge -rX' UI annoyance.
Posted by "C. Michael Pilato" <cm...@collab.net>.
kfogel@collab.net writes:
> "C. Michael Pilato" <cm...@collab.net> writes:
> > I'm constantly frustrated that passing -rX (instead of -rX:Y) as the
> > operative range for merge operations doesn't default to -rX:X-1
> > behavior. Like, I wanna say "cherry pick a merge of revision 14" and
> > I run 'svn merge -r14 ...' only to get bounced for not having
> > specified a full revision range.
> >
> > What would others think about relaxing the 'svn merge' UI such that
> > passing a single revision means, "merge that one revision"?
>
> +1 Love the idea!
>
> I hope you meant it for both 'svn diff' and 'svn merge'?
Diff already has a meaning for -rN, so, no, I didn't mean it for diff,
too. Not sure if the current 'svn diff -rN' behavior is better than
this new proposal ... haven't thought it through.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: 'svn merge -rX' UI annoyance.
Posted by Chia-liang Kao <cl...@clkao.org>.
<kfogel <at> collab.net> writes:
> I hope you meant it for both 'svn diff' and 'svn merge'?
>
> I agree with you that we should this incremental improvement by
> itself, and not do "X,Y,Z" thing until we've had a chance to work out
> the details.
On diff it can be ambigious.
diff -rX wcentry, does this mean diff wcentry@X with wcentry?
or wcentry@X-1 with wcentry@X?
If the sematic of -r depends on the argument being wcentry or url,
it's inconsistent and confusing.
Cheers,
CLK
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: 'svn merge -rX' UI annoyance.
Posted by kf...@collab.net.
Malcolm Rowe <ma...@farside.org.uk> writes:
> Doesn't 'svn diff -rX' already mean the same thing as 'svn diff -rX:BASE'?
I forgot about that, thanks.
But what if the target is a URL?
> [who has now worked out the 'list reply' function of his mail client; sorry,
> Karl, for the duplicate message.]
No problem; ignore my earlier response to you saying please follow up
to the whole list :-).
-Karl
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: 'svn merge -rX' UI annoyance.
Posted by Malcolm Rowe <ma...@farside.org.uk>.
On Thu, Aug 04, 2005 at 10:13:33AM -0500, kfogel@collab.net wrote:
> > I'm constantly frustrated that passing -rX (instead of -rX:Y) as the
> > operative range for merge operations doesn't default to -rX:X-1
> > What would others think about relaxing the 'svn merge' UI such that
> > passing a single revision means, "merge that one revision"?
> I hope you meant it for both 'svn diff' and 'svn merge'?
Doesn't 'svn diff -rX' already mean the same thing as 'svn diff -rX:BASE'?
I know I've used it to answer "what's changed in the last month?", for
example.
Regards,
Malcolm
[who has now worked out the 'list reply' function of his mail client; sorry,
Karl, for the duplicate message.]
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: 'svn merge -rX' UI annoyance.
Posted by kf...@collab.net.
"C. Michael Pilato" <cm...@collab.net> writes:
> I'm constantly frustrated that passing -rX (instead of -rX:Y) as the
> operative range for merge operations doesn't default to -rX:X-1
> behavior. Like, I wanna say "cherry pick a merge of revision 14" and
> I run 'svn merge -r14 ...' only to get bounced for not having
> specified a full revision range.
>
> What would others think about relaxing the 'svn merge' UI such that
> passing a single revision means, "merge that one revision"?
+1 Love the idea!
I hope you meant it for both 'svn diff' and 'svn merge'?
I agree with you that we should this incremental improvement by
itself, and not do "X,Y,Z" thing until we've had a chance to work out
the details.
-K
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: 'svn merge -rX' UI annoyance.
Posted by "C. Michael Pilato" <cm...@collab.net>.
Øyvind A. Holm <su...@sunbase.org> writes:
> On 2005-08-04 10:59:49 Mark Phippard wrote:
> > cmpilato@localhost.localdomain wrote on 08/04/2005 10:51:10 AM:
> > > I'm constantly frustrated that passing -rX (instead of -rX:Y) as the
> > > operative range for merge operations doesn't default to -rX:X-1
> > > behavior. Like, I wanna say "cherry pick a merge of revision 14"
> > > and I run 'svn merge -r14 ...' only to get bounced for not having
> > > specified a full revision range.
> > >
> > > What would others think about relaxing the 'svn merge' UI such that
> > > passing a single revision means, "merge that one revision"?
> >
> > [...]
> >
> > How about a new "cherry-pick" syntax like: --revs 14,17,21 that would
> > merge those specific revisions?
>
> Ooooo.... NICE! Yes, one of those, please. And maybe it could be
> extended to "-r14,17,21:29,35" ?
Mmm... that *is* nice. But I wouldn't give +1 to it until we worked
out the failure case.
And I *absolutely, positively* don't want a massive design discussion
launched about such a UI extension to prevent mass acceptance of my
tiny little UI change request. :-)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: 'svn merge -rX' UI annoyance.
Posted by "Øyvind A. Holm" <su...@sunbase.org>.
On 2005-08-04 18:07:49 Marc Haisenko wrote:
> Interesting... but would you rather do the merges one after another or
> all at once ? And if one merge produces a conflict, would you like all
> others to be reverted, or left in places ? What about the merges after
> the one that conflicted ? What to do if two merges contradict each
> other ?
One straightforward way to look at this, is as a serial line of patches,
so if the first merge doesn’t succeed, the file stays in conflict and
the other merges goes into those conflicted files, just as it would’ve
been on the commandline when merging several times.
> I don't like to say this is a bad feature, it's certainly useful, but
> I think this feature would be quite hard to design correctly and my
> impression is that only few people would gain from it...
But when you really need it, it’s a powerful feature usable for a range
of things.
Cheers,
sunny256
--
#!/bin/bash
for f in 1 2 3; do
PREF=http://musthave.sunbase.org/Stallman/stallman${f}c
wget $PREF.sub ; mplayer -cache 8192 -sub stallman${f}c.sub $PREF.mpeg
done
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: 'svn merge -rX' UI annoyance.
Posted by Marc Haisenko <ha...@webport.de>.
On Thursday 04 August 2005 17:56, Daniel L. Rall wrote:
> On Thu, 2005-08-04 at 17:39 +0200, Marc Haisenko wrote:
> > Just some user feedback...
> >
> > How often have you wished you could do something like that ? O_o I don't
> > see any real-world value here, at least I am very careful when merging
> > stuff and rather do it step by step and would never ever do something
> > like this... but of course I can see the geek value here ;-)
>
> I need to do this quite often when working with multiple branches (a
> state which I continually find myself in). In fact, just yesterday I
> left a change sitting in the 1.2.x branch's STATUS file rather than
> merging it because it consisted of so many revisions:
>
> * r14008, r14458, r14587, r14632, r15329, r15340
> Fixes to svnmerge.
> Justification:
> It would be good to have contrib code be the latest and fixed
> version. We don't guarantee that this code works, but it would
> be good to have known fixes released. This fixes four issues.
> Blair has used the code in trunk in a production environment and
> it works great.
>
> Being able to practically cut and pate that first line to my
> command-line client would've been a significant speed-up, and an overall
> usability plus.
Interesting... but would you rather do the merges one after another or all at
once ? And if one merge produces a conflict, would you like all others to be
reverted, or left in places ? What about the merges after the one that
conflicted ? What to do if two merges contradict each other ?
I don't like to say this is a bad feature, it's certainly useful, but I think
this feature would be quite hard to design correctly and my impression is
that only few people would gain from it...
--
Marc Haisenko
Systemspezialist
Webport IT-Services GmbH
mailto: haisenko@webport.de
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: 'svn merge -rX' UI annoyance.
Posted by "Daniel L. Rall" <dl...@finemaltcoding.com>.
On Thu, 2005-08-04 at 17:39 +0200, Marc Haisenko wrote:
> On Thursday 04 August 2005 17:09, Øyvind A. Holm wrote:
> > On 2005-08-04 10:59:49 Mark Phippard wrote:
> > > cmpilato@localhost.localdomain wrote on 08/04/2005 10:51:10 AM:
> > > How about a new "cherry-pick" syntax like: --revs 14,17,21 that would
> > > merge those specific revisions?
> >
> > Ooooo.... NICE! Yes, one of those, please. And maybe it could be
> > extended to "-r14,17,21:29,35" ?
> >
> > Cheers,
> > Øyvind A. Holm
>
> Just some user feedback...
>
> How often have you wished you could do something like that ? O_o I don't see
> any real-world value here, at least I am very careful when merging stuff and
> rather do it step by step and would never ever do something like this... but
> of course I can see the geek value here ;-)
I need to do this quite often when working with multiple branches (a
state which I continually find myself in). In fact, just yesterday I
left a change sitting in the 1.2.x branch's STATUS file rather than
merging it because it consisted of so many revisions:
* r14008, r14458, r14587, r14632, r15329, r15340
Fixes to svnmerge.
Justification:
It would be good to have contrib code be the latest and fixed
version. We don't guarantee that this code works, but it would
be good to have known fixes released. This fixes four issues.
Blair has used the code in trunk in a production environment and
it works great.
Being able to practically cut and pate that first line to my
command-line client would've been a significant speed-up, and an overall
usability plus.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: 'svn merge -rX' UI annoyance.
Posted by Marc Haisenko <ha...@webport.de>.
On Thursday 04 August 2005 17:09, Øyvind A. Holm wrote:
> On 2005-08-04 10:59:49 Mark Phippard wrote:
> > cmpilato@localhost.localdomain wrote on 08/04/2005 10:51:10 AM:
> > How about a new "cherry-pick" syntax like: --revs 14,17,21 that would
> > merge those specific revisions?
>
> Ooooo.... NICE! Yes, one of those, please. And maybe it could be
> extended to "-r14,17,21:29,35" ?
>
> Cheers,
> Øyvind A. Holm
Just some user feedback...
How often have you wished you could do something like that ? O_o I don't see
any real-world value here, at least I am very careful when merging stuff and
rather do it step by step and would never ever do something like this... but
of course I can see the geek value here ;-)
Or to say it in another way: is the work for (correctly) designing and
implementing this really worth the hassle ?
C'ya,
Marc
--
Marc Haisenko
Systemspezialist
Webport IT-Services GmbH
mailto: haisenko@webport.de
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: 'svn merge -rX' UI annoyance.
Posted by "Øyvind A. Holm" <su...@sunbase.org>.
On 2005-08-04 10:59:49 Mark Phippard wrote:
> cmpilato@localhost.localdomain wrote on 08/04/2005 10:51:10 AM:
> > I'm constantly frustrated that passing -rX (instead of -rX:Y) as the
> > operative range for merge operations doesn't default to -rX:X-1
> > behavior. Like, I wanna say "cherry pick a merge of revision 14"
> > and I run 'svn merge -r14 ...' only to get bounced for not having
> > specified a full revision range.
> >
> > What would others think about relaxing the 'svn merge' UI such that
> > passing a single revision means, "merge that one revision"?
>
> [...]
>
> How about a new "cherry-pick" syntax like: --revs 14,17,21 that would
> merge those specific revisions?
Ooooo.... NICE! Yes, one of those, please. And maybe it could be
extended to "-r14,17,21:29,35" ?
Cheers,
Øyvind A. Holm
--
#!/bin/bash
for f in 1 2 3; do
PREF=http://musthave.sunbase.org/Stallman/stallman${f}c
wget $PREF.sub ; mplayer -cache 8192 -sub stallman${f}c.sub $PREF.mpeg
done
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
[PATCH] 'svn merge -rX' UI annoyance.
Posted by "C. Michael Pilato" <cm...@collab.net>.
"Daniel L. Rall" <dl...@finemaltcoding.com> writes:
> On Thu, 2005-08-04 at 10:03 -0500, C. Michael Pilato wrote:
> > Mark Phippard <Ma...@softlanding.com> writes:
> >
> > > cmpilato@localhost.localdomain wrote on 08/04/2005 10:51:10 AM:
> > >
> > > > I'm constantly frustrated that passing -rX (instead of -rX:Y) as the
> > > > operative range for merge operations doesn't default to -rX:X-1
> > > > behavior. Like, I wanna say "cherry pick a merge of revision 14" and
> > > > I run 'svn merge -r14 ...' only to get bounced for not having
> > > > specified a full revision range.
> > > >
> > > > What would others think about relaxing the 'svn merge' UI such that
> > > > passing a single revision means, "merge that one revision"?
> > >
> > > I assume you meant does not default to -rX-1:X?
> >
> > Oops! Yeah, you're right. Sorry. -rX-1:X.
>
> +1!!!!!
In the spirit of Open Source, I offer my hopefully welcome patch. It
seems to work, but I haven't run it through regression tests yet.
===========================================================================
Teach 'svn merge' how to deal with -rN input (instead of -rN:M) by
treating -rN as -rN-1:N.
* * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* THIS PATCH HAS NOT UNDERGONE REGRESSION TESTING. *
* *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* subversion/include/svn_opt.h
(svn_opt_revision_range_prev): New revision specifier kind.
* subversion/libsvn_client/ra.c
(svn_client__repos_locations): Learn to handle svn_opt_revision_range_prev.
* subversion/clients/cmdline/main.c
(svn_cl__cmd_table): Update the 'merge' command usage message to
reflect that the first revision range item is optional, and if
omitted, is "second-range-revision minus one".
* subversion/clients/cmdline/merge-cmd.c
(svn_cl__merge): If the end revision isn't specified, don't error --
just turn (effectively) -rN into -rN-1:N under the hood.
Index: subversion/include/svn_opt.h
===================================================================
--- subversion/include/svn_opt.h (revision 15561)
+++ subversion/include/svn_opt.h (working copy)
@@ -198,7 +198,10 @@
svn_opt_revision_working,
/** repository youngest */
- svn_opt_revision_head
+ svn_opt_revision_head,
+
+ /** (rev of "the other half of the operative range") - 1 */
+ svn_opt_revision_range_prev
};
Index: subversion/libsvn_client/ra.c
===================================================================
--- subversion/libsvn_client/ra.c (revision 15561)
+++ subversion/libsvn_client/ra.c (working copy)
@@ -702,6 +702,14 @@
|| start->kind == svn_opt_revision_unspecified)
return svn_error_create (SVN_ERR_CLIENT_BAD_REVISION, NULL, NULL);
+ /* If one of the operative range revisions is relative to the other,
+ but the other isn't specified, we're heading toward trouble. */
+ if (((end->kind == svn_opt_revision_unspecified)
+ && (start->kind == svn_opt_revision_range_prev))
+ || ((end->kind == svn_opt_revision_unspecified)
+ && (start->kind == svn_opt_revision_range_prev)))
+ return svn_error_create (SVN_ERR_CLIENT_BAD_REVISION, NULL, NULL);
+
/* Check to see if this is schedule add with history working copy
path. If it is, then we need to use the URL and peg revision of
the copyfrom information. */
@@ -749,14 +757,25 @@
SVN_ERR (svn_client__get_revision_number (&peg_revnum,
ra_session, revision, path,
pool));
-
- SVN_ERR (svn_client__get_revision_number (&start_revnum,
- ra_session, start, path, pool));
- if (end->kind == svn_opt_revision_unspecified)
- end_revnum = start_revnum;
+
+ /* If the start revision depends on the end, we've gotta fetch the
+ end first. */
+ if (start->kind == svn_opt_revision_range_prev)
+ {
+ SVN_ERR (svn_client__get_revision_number (&end_revnum, ra_session,
+ end, path, pool));
+ start_revnum = end_revnum - 1;
+ }
else
- SVN_ERR (svn_client__get_revision_number (&end_revnum,
- ra_session, end, path, pool));
+ {
+ SVN_ERR (svn_client__get_revision_number (&start_revnum, ra_session,
+ start, path, pool));
+ if (end->kind == svn_opt_revision_unspecified)
+ end_revnum = start_revnum;
+ else
+ SVN_ERR (svn_client__get_revision_number (&end_revnum, ra_session,
+ end, path, pool));
+ }
/* Set the output revision variables. */
*start_revision = apr_pcalloc (pool, sizeof (**start_revision));
Index: subversion/clients/cmdline/merge-cmd.c
===================================================================
--- subversion/clients/cmdline/merge-cmd.c (revision 15561)
+++ subversion/clients/cmdline/merge-cmd.c (working copy)
@@ -55,10 +55,9 @@
/* sanity check: they better have given supplied a *range*. */
if (opt_state->end_revision.kind == svn_opt_revision_unspecified)
{
- svn_opt_subcommand_help ("merge", svn_cl__cmd_table,
- svn_cl__options, pool);
- return svn_error_create (SVN_ERR_CL_INSUFFICIENT_ARGS, 0,
- _("Second revision required"));
+ opt_state->end_revision.kind = opt_state->start_revision.kind;
+ opt_state->end_revision.value = opt_state->start_revision.value;
+ opt_state->start_revision.kind = svn_opt_revision_range_prev;
}
using_alternate_syntax = TRUE;
}
Index: subversion/clients/cmdline/main.c
===================================================================
--- subversion/clients/cmdline/main.c (revision 15561)
+++ subversion/clients/cmdline/main.c (working copy)
@@ -443,7 +443,7 @@
N_("Apply the differences between two sources to a working copy path.\n"
"usage: 1. merge sourceURL1[@N] sourceURL2[@M] [WCPATH]\n"
" 2. merge sourceWCPATH1@N sourceWCPATH2@M [WCPATH]\n"
- " 3. merge -r N:M SOURCE[@REV] [WCPATH]\n"
+ " 3. merge -r [N:]M SOURCE[@REV] [WCPATH]\n"
"\n"
" 1. In the first form, the source URLs are specified at revisions\n"
" N and M. These are the two sources to be compared. The "
@@ -459,7 +459,9 @@
" 3. In the third form, SOURCE can be a URL, or working copy item\n"
" in which case the corresponding URL is used. This URL in\n"
" revision REV is compared as it existed between revisions N and \n"
- " M. If REV is not specified, HEAD is assumed.\n"
+ " M. If N is not specified, M-1 is assumed. If REV is not\n"
+ " specified, HEAD is assumed.\n"
+ " \n"
"\n"
" WCPATH is the working copy path that will receive the changes.\n"
" If WCPATH is omitted, a default value of '.' is assumed, unless\n"
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: 'svn merge -rX' UI annoyance.
Posted by "Daniel L. Rall" <dl...@finemaltcoding.com>.
On Thu, 2005-08-04 at 10:03 -0500, C. Michael Pilato wrote:
> Mark Phippard <Ma...@softlanding.com> writes:
>
> > cmpilato@localhost.localdomain wrote on 08/04/2005 10:51:10 AM:
> >
> > > I'm constantly frustrated that passing -rX (instead of -rX:Y) as the
> > > operative range for merge operations doesn't default to -rX:X-1
> > > behavior. Like, I wanna say "cherry pick a merge of revision 14" and
> > > I run 'svn merge -r14 ...' only to get bounced for not having
> > > specified a full revision range.
> > >
> > > What would others think about relaxing the 'svn merge' UI such that
> > > passing a single revision means, "merge that one revision"?
> >
> > I assume you meant does not default to -rX-1:X?
>
> Oops! Yeah, you're right. Sorry. -rX-1:X.
+1!!!!!
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: 'svn merge -rX' UI annoyance.
Posted by "C. Michael Pilato" <cm...@collab.net>.
Mark Phippard <Ma...@softlanding.com> writes:
> cmpilato@localhost.localdomain wrote on 08/04/2005 10:51:10 AM:
>
> > I'm constantly frustrated that passing -rX (instead of -rX:Y) as the
> > operative range for merge operations doesn't default to -rX:X-1
> > behavior. Like, I wanna say "cherry pick a merge of revision 14" and
> > I run 'svn merge -r14 ...' only to get bounced for not having
> > specified a full revision range.
> >
> > What would others think about relaxing the 'svn merge' UI such that
> > passing a single revision means, "merge that one revision"?
>
> I assume you meant does not default to -rX-1:X?
Oops! Yeah, you're right. Sorry. -rX-1:X.
> I agree that this would be a nice usability win for the command. It
> would be nice if this also worked: -rPREV:X and then we could say
> that -rX implied the former.
I thought about that, but PREV already has a meaning and it ain't that
one. I'd rather not tainted the definition of PREV.
> How about a new "cherry-pick" syntax like: --revs 14,17,21 that
> would merge those specific revisions?
Nah, now you've got two different ways to specify revisions, and I
think that would cause more confusion than it clears.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: 'svn merge -rX' UI annoyance.
Posted by Mark Phippard <Ma...@softlanding.com>.
cmpilato@localhost.localdomain wrote on 08/04/2005 10:51:10 AM:
> I'm constantly frustrated that passing -rX (instead of -rX:Y) as the
> operative range for merge operations doesn't default to -rX:X-1
> behavior. Like, I wanna say "cherry pick a merge of revision 14" and
> I run 'svn merge -r14 ...' only to get bounced for not having
> specified a full revision range.
>
> What would others think about relaxing the 'svn merge' UI such that
> passing a single revision means, "merge that one revision"?
I assume you meant does not default to -rX-1:X?
I agree that this would be a nice usability win for the command. It would
be nice if this also worked: -rPREV:X and then we could say that -rX
implied the former. It does seem possible that if people are not always
forced to specify X-1 then when they try to merge multiple revisions they
will make the same mistake.
How about a new "cherry-pick" syntax like: --revs 14,17,21 that would
merge those specific revisions?
Mark
_____________________________________________________________________________
Scanned for SoftLanding Systems, Inc. by IBM Email Security Management Services powered by MessageLabs.
_____________________________________________________________________________
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org