You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Christopher Ness <ch...@nesser.org> on 2005/08/22 01:26:18 UTC
Revision Arithmetic
I didn't see any more discussion about revision arithmetic after I left
about two weeks ago.
I might be daft, but my searches for "revision arithmetic" return zero
issues in the tracker, even with all states of an issue selected.
Can someone point me to some more resources that were discussed about
this topic before I go about making the same old mistakes.
Cheers,
Chris
--
PGP Public Key: http://www.nesser.org/pgp-key/
21:12:21 up 23 min, 2 users, load average: 0.32, 0.48, 0.42
Re: Revision Arithmetic
Posted by kf...@collab.net.
Christopher Ness <ch...@nesser.org> writes:
> I forgot about keywords in revisions like HEAD and PREV.
> Those need to go into the regex as well. So replace [0-9] with
> printable chars so changes will not have to be made if new revision
> keywords are added in the future.
>
> What about peg revisions? I think those are of the form:
> svn://some/url/file@100
>
> Do these also get parsed by the same code as normal revisions to the -r
> flag for validity?
I think so, yes -- check the code to make sure. I'm not sure it's
worth making them support this new syntax in this first change. Maybe
we should get -r done, and then see about peg revs?
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: Revision Arithmetic
Posted by Christopher Ness <ch...@nesser.org>.
On Sun, 2005-08-28 at 22:30 -0500, kfogel@collab.net wrote:
<snip />
> > Anybody see a problem?
<snip />
> I don't see a problem with this. I got thrown by the regexp until I
> remembered that you were intentionally supporting associativity.
I forgot about keywords in revisions like HEAD and PREV.
Those need to go into the regex as well. So replace [0-9] with
printable chars so changes will not have to be made if new revision
keywords are added in the future.
What about peg revisions? I think those are of the form:
svn://some/url/file@100
Do these also get parsed by the same code as normal revisions to the -r
flag for validity?
Cheers,
Chris
--
PGP Public Key: http://www.nesser.org/pgp-key/
08:41:35 up 27 min, 2 users, load average: 0.17, 0.13, 0.13
Re: Revision Arithmetic
Posted by kf...@collab.net.
Christopher Ness <ch...@nesser.org> writes:
> That issue seems to want the arithmetic to be on changes, and not
> revision numbers.
>
> I plan to do revision arithmetic, addition and subtraction of revision
> numbers passed in as arguments as Karl said near Christmas 2004. Not
> changes since this would overload the meaning of the -r flag.
>
> I plan to extend the argument parsing to look for something like:
> ([0-9][0-9+-]*)*[0-9]+
> where the revision argument must start and end with a number and can
> have addition or subtraction chars but not as the first or last char.
>
> Once this is verified, evaluate the arithmetic and pass the evaluated
> revision number on.
>
> There is no need for brackets to describe order of operations since
> addition and subtraction are associative.
>
> Anybody see a problem?
>
> I have designed this to allow: -r1000-1
> and disallow: -r-1+1000
>
> Is this acceptable? I would think the common use case would be N-x for
> a previous revision.
I don't see a problem with this. I got thrown by the regexp until I
remembered that you were intentionally supporting associativity.
I'll resist the temptation to urge support for Reverse Polish Notation :-).
-Karl
--
www.collab.net <> CollabNet | Distributed Development On Demand
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: Revision Arithmetic
Posted by Christopher Ness <ch...@nesser.org>.
On Sat, 2005-09-03 at 23:38 +0100, Julian Foad wrote:
<big ol' snip>
> > I am not suggesting to implement "N changes", but simply arithmetic for
> > revisions which is easily understood by the vast majority of users
> > (except for maybe those who know how things work under the hood).
> >
> > I guess the question comes down to:
> > "Is basic revision arithmetic something subversion should have?"
>
> No, it isn't. Sorry :-(
Fair enough.
Glad to get that out before going down the wrong path.
Dale, thanks for the idea of using the shell.
Cheers,
Chris
--
PGP Public Key: http://www.nesser.org/pgp-key/
19:00:47 up 3:25, 1 user, load average: 0.04, 0.07, 0.03
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: Revision Arithmetic
Posted by Lars Gullik Bjønnes <la...@gullik.net>.
"Dale R. Worley" <dw...@pingtel.com> writes:
>
| No, what you wanted was "to do a test build for all revisions in a
| branch", as you stated at the top of your message.
Well. yeah. :-)
but when I get to the end I want to wait a bit and get the
next (and if I do not build fast enough there will be a queue of test
builds waiting to happen)
And I really do not want to keep any state in the builder...
--
Lgb
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: Revision Arithmetic
Posted by "Dale R. Worley" <dw...@pingtel.com>.
On Tue, 2005-09-06 at 21:37 +0200, Lars Gullik Bjønnes wrote:
> "Dale R. Worley" <dw...@pingtel.com> writes:
>
> | On Sun, 2005-09-04 at 13:01 +0200, Lars Gullik Bjønnes wrote:
> >> F.ex. I want to do a test build for all revisions in a branch.
> >>
> >> I decide to start at r100... the next rev on the branch where anything
> >> changed might be r105 (but I don't know this yet). So I just "svn up
> >> -r+1"
> >>
> >> In URL to get the next revision number instead of updating to it.
> >
> | Why isn't it better to extract the rev numbers out of 'svn log -q' with
> | sed?
> >
> | svn log -q --stop-on-copy | sed -e '/^-/d' -e 's/^r\([0-9]*\) .*$/\1/'
>
> Well... it would be to be a bit more complicated than this. I don't
> want a list of numbers I want only one. The revision after X.
No, what you wanted was "to do a test build for all revisions in a
branch", as you stated at the top of your message.
Dale
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: Revision Arithmetic
Posted by Philip Martin <ph...@codematters.co.uk>.
larsbj@gullik.net (Lars Gullik Bjønnes) writes:
> Philip Martin <ph...@codematters.co.uk> writes:
>
> | larsbj@gullik.net (Lars Gullik Bjønnes) writes:
>>
>>> but I want to be able to do the same with URL.
You wrote: "with URL".
>>> (similr that is)
>>
> | To find the first change after r16000 on the Subversion 1.2.x branch
>>
> | $ U=http://svn.collab.net/repos/svn/branches/1.2.x
> | $ svn log -q --limit 1 --r16001:HEAD $U | awk '/^r/print {$1}'
> | r16036
>
> right... but then I need to know the the 16000 beforehand.
With an URL you must know the revision.
> with revision aritmetic I could just use +1 (BASE+1 perhaps)
Huh? An URL doesn't have a BASE revision. Do you have a working
copy? If so then you really need to handle mixed revisions, but if
you are prepared to pretend such things don't exist then:
$ svn info [wc_path] | awk '/^Revision/{print "r"$2+1":HEAD"}'
--
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: Revision Arithmetic
Posted by Lars Gullik Bjønnes <la...@gullik.net>.
Philip Martin <ph...@codematters.co.uk> writes:
| larsbj@gullik.net (Lars Gullik Bjønnes) writes:
>
>> Well... it would be to be a bit more complicated than this. I don't
>> want a list of numbers I want only one. The revision after X.
>>
>> It is actually possible that soemthing like
>>
>> let nextrev=`svnversion .`+1 ; svn up -r $nextrev
>>
>> will do exactly what I want.
>
| Not if your working copy is mixed-revision or modified.
In my particular case that will never happen.
>> but I want to be able to do the same with URL.
>> (similr that is)
>
| To find the first change after r16000 on the Subversion 1.2.x branch
>
| $ U=http://svn.collab.net/repos/svn/branches/1.2.x
| $ svn log -q --limit 1 --r16001:HEAD $U | awk '/^r/print {$1}'
| r16036
right... but then I need to know the the 16000 beforehand.
with revision aritmetic I could just use +1 (BASE+1 perhaps)
--
Lgb
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: Revision Arithmetic
Posted by Lars Gullik Bjønnes <la...@gullik.net>.
Philip Martin <ph...@codematters.co.uk> writes:
| larsbj@gullik.net (Lars Gullik Bjønnes) writes:
>
>> Well... it would be to be a bit more complicated than this. I don't
>> want a list of numbers I want only one. The revision after X.
>>
>> It is actually possible that soemthing like
>>
>> let nextrev=`svnversion .`+1 ; svn up -r $nextrev
>>
>> will do exactly what I want.
>
| Not if your working copy is mixed-revision or modified.
>
>> but I want to be able to do the same with URL.
>> (similr that is)
>
| To find the first change after r16000 on the Subversion 1.2.x branch
>
| $ U=http://svn.collab.net/repos/svn/branches/1.2.x
| $ svn log -q --limit 1 --r16001:HEAD $U | awk '/^r/print {$1}'
| r16036
btw. I am not saying that any of this is impossible without revision
aritmetic, but I might be (a lot) simpler with it.
--
Lgb
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: Revision Arithmetic
Posted by Philip Martin <ph...@codematters.co.uk>.
larsbj@gullik.net (Lars Gullik Bjønnes) writes:
> Well... it would be to be a bit more complicated than this. I don't
> want a list of numbers I want only one. The revision after X.
>
> It is actually possible that soemthing like
>
> let nextrev=`svnversion .`+1 ; svn up -r $nextrev
>
> will do exactly what I want.
Not if your working copy is mixed-revision or modified.
> but I want to be able to do the same with URL.
> (similr that is)
To find the first change after r16000 on the Subversion 1.2.x branch
$ U=http://svn.collab.net/repos/svn/branches/1.2.x
$ svn log -q --limit 1 --r16001:HEAD $U | awk '/^r/print {$1}'
r16036
Notes:
- pass 16001 to get the first revision *after* 16000 and avoid getting
16000 itself.
- ra_dav displays a "REPORT request failed" error, I think that's a
bug as the log command appears to work and other RA layers don't
have a problem.
--
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: Revision Arithmetic
Posted by Lars Gullik Bjønnes <la...@gullik.net>.
"Dale R. Worley" <dw...@pingtel.com> writes:
| On Sun, 2005-09-04 at 13:01 +0200, Lars Gullik Bjønnes wrote:
>> F.ex. I want to do a test build for all revisions in a branch.
>>
>> I decide to start at r100... the next rev on the branch where anything
>> changed might be r105 (but I don't know this yet). So I just "svn up
>> -r+1"
>>
>> In URL to get the next revision number instead of updating to it.
>
| Why isn't it better to extract the rev numbers out of 'svn log -q' with
| sed?
>
| svn log -q --stop-on-copy | sed -e '/^-/d' -e 's/^r\([0-9]*\) .*$/\1/'
Well... it would be to be a bit more complicated than this. I don't
want a list of numbers I want only one. The revision after X.
It is actually possible that soemthing like
let nextrev=`svnversion .`+1 ; svn up -r $nextrev
will do exactly what I want.
but I want to be able to do the same with URL.
(similr that is)
--
Lgb
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: Revision Arithmetic
Posted by "Dale R. Worley" <dw...@pingtel.com>.
On Sun, 2005-09-04 at 13:01 +0200, Lars Gullik Bjønnes wrote:
> F.ex. I want to do a test build for all revisions in a branch.
>
> I decide to start at r100... the next rev on the branch where anything
> changed might be r105 (but I don't know this yet). So I just "svn up
> -r+1"
>
> In URL to get the next revision number instead of updating to it.
Why isn't it better to extract the rev numbers out of 'svn log -q' with
sed?
svn log -q --stop-on-copy | sed -e '/^-/d' -e 's/^r\([0-9]*\) .*$/\1/'
Dale
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: Revision Arithmetic
Posted by Lars Gullik Bjønnes <la...@gullik.net>.
Julian Foad <ju...@btopenworld.com> writes:
| Lars Gullik Bjønnes wrote:
>> -r+1 on a branch to get next revision number would be nice.
>> (this would skip over revs to the next where something happened on the
>> branch)
>
| Please describe what you mean much more precisely, and give a
| realistic example. For example, I don't know whether you are thinking
| of using this in a WC or on a URL.
Both WC and URL.
F.ex. I want to do a test build for all revisions in a branch.
I decide to start at r100... the next rev on the branch where anything
changed might be r105 (but I don't know this yet). So I just "svn up
-r+1"
In URL to get the next revision number instead of updating to it.
I know that I can get the next rev by something like:
svn log -r 8:HEAD --limit 1 svn+ssh://svnserver/svnrepo/
which will give me next rev >= 8 , but since I have to use HEAD this
can take a long time. (Have to parse the output though) (Perhaps the limit case isn't taken into account
when breaking out of the search?)
(I hope I make some kind of sense...)
--
Lgb
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: Revision Arithmetic
Posted by Julian Foad <ju...@btopenworld.com>.
Lars Gullik Bjønnes wrote:
>
> -r+1 on a branch to get next revision number would be nice.
> (this would skip over revs to the next where something happened on the
> branch)
Please describe what you mean much more precisely, and give a realistic
example. For example, I don't know whether you are thinking of using this in a
WC or on a URL.
- Julian
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: Revision Arithmetic
Posted by Lars Gullik Bjønnes <la...@gullik.net>.
"Dale R. Worley" <dw...@pingtel.com> writes:
| On Sat, 2005-09-03 at 23:38 +0100, Julian Foad wrote:
>> There's no point in providing the ability to do arithmetic if it gives no real
>> benefit.
>
| Yes, I think that's the central point. And given that other users may
| be creating revs at any moment, it's difficult to imagine how arithmetic
| on rev numbers could correspond to semantically useful operations in
| Subversion.
-r+1 on a branch to get next revision number would be nice.
(this would skip over revs to the next where something happened on the
branch)
--
Lgb
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: Revision Arithmetic
Posted by "Dale R. Worley" <dw...@pingtel.com>.
On Sat, 2005-09-03 at 23:38 +0100, Julian Foad wrote:
> There's no point in providing the ability to do arithmetic if it gives no real
> benefit.
Yes, I think that's the central point. And given that other users may
be creating revs at any moment, it's difficult to imagine how arithmetic
on rev numbers could correspond to semantically useful operations in
Subversion.
> Well, we can't add a feature just because it's possible, without any idea of
> how it will be used constructively.
Great software results from careful analysis of real-world problems and
thoughtful examination of possible solutions. Obese software results
from the far easier process of looking at an existing piece of software
and asking, "What can I add next?"
-- From the programming notebooks of a heretic, 1990
> > The idea isn't to
> > think about change sets but to save the user from having to do
> > arithmetic in their heads (possibly incorrectly). Just do it in the
> > argument and let the program calculate it for you.
If you really want to do this, why not let bash do it for you: "svn log
-r $(( 1000 + 25 ))"? We already let the shell expand wildcards...
Dale
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: Revision Arithmetic
Posted by Julian Foad <ju...@btopenworld.com>.
Christopher, you might want to skip to the very end of this message before
reading my boring point-by-point responses.
Christopher Ness wrote:
> On Wed, 2005-08-31 at 12:09 +0100, Julian Foad wrote:
>>Christopher Ness wrote:
>>
>>>I plan to extend the argument parsing to look for something like:
>>> ([0-9][0-9+-]*)*[0-9]+
>>>where the revision argument must start and end with a number and can
>>>have addition or subtraction chars but not as the first or last char.
>>
>>Seems far too loose.
>
> Could you be a little more verbose?
I meant that that allows multiple operators in a group which doesn't make
sense, and multiple terms in the expression which seems overkill, e.g.
"000-+-101-+-000". I think "number, possibly plus or minus another number"
([0-9]+([+-][0-9]+)?) would be more than adequate.
[...]
>>>I have designed this to allow: -r1000-1
>>> and disallow: -r-1+1000
>>>
>>>Is this acceptable? I would think the common use case would be N-x for
>>>a previous revision.
>>
>>No, I wouldn't accept this.
>>
>>"N-1" is the only thing I can see being useful.
>
> HEAD = r100
> svn co -r66 $REPOS
> svn diff -r66+5:HEAD-10
Is that supposed to be an example of something useful? Why? In what possible
realistic scenario would you know that something interesting happened five
revisions after the one you checked out or ten revisions before the current head?
There's no point in providing the ability to do arithmetic if it gives no real
benefit.
[...]
> I couldn't begin to tell you how people may use this feature. I'm sure
> some will abuse it, but that often leads to innovations.
Well, we can't add a feature just because it's possible, without any idea of
how it will be used constructively.
>>It gives the previous version
>>of an item iff N is a revision in which the item changed, which is a reasonably
>>common usage. In most projects, revision "N+1" of a particular tree or item is
>>often the same tree as revision "N" of it (because something elsewhere in the
>>repository has changed), and similarly "N-2" the same as "N-1". If you think
>>there is any use for adding a number, or subtracting any number other than one,
>>please give a realistic use case.
>
> I don't think you can make these generalizations.
Heh. I think I can. :-)
> The idea isn't to
> think about change sets but to save the user from having to do
> arithmetic in their heads (possibly incorrectly). Just do it in the
> argument and let the program calculate it for you.
Again, I say, "In what circumstances does a user want to do such arithmetic?"
The only good, common example I can think of is wanting to see the change that
resulted in revision N; for this case, the revision in which the item was
changed before rN is wanted, or just N-1 will do the job too.
> I am not suggesting to implement "N changes", but simply arithmetic for
> revisions which is easily understood by the vast majority of users
> (except for maybe those who know how things work under the hood).
>
> I guess the question comes down to:
> "Is basic revision arithmetic something subversion should have?"
No, it isn't. Sorry :-(
- Julian
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: Revision Arithmetic
Posted by Christopher Ness <ch...@nesser.org>.
On Wed, 2005-08-31 at 12:09 +0100, Julian Foad wrote:
> Christopher Ness wrote:
> > I plan to do revision arithmetic, addition and subtraction of revision
> > numbers passed in as arguments as Karl said near Christmas 2004. Not
> > changes since this would overload the meaning of the -r flag.
>
> I'm not sure that this would overload the meaning of the -r flag any more than
> the existing ways to specifiy a revision by date or by keyword like "PREV" do.
Fair enough, but if I gave `svn log -r100-1` I would expect the log of
revision 99, not:
{x | x >= 0 && x < 100 : x "is the next change set"}
> > I plan to extend the argument parsing to look for something like:
> > ([0-9][0-9+-]*)*[0-9]+
> > where the revision argument must start and end with a number and can
> > have addition or subtraction chars but not as the first or last char.
>
> Seems far too loose.
Could you be a little more verbose?
I also stated in previous emails that I think the feature should be able
to work on keywords like HEAD (ie HEAD-2). Therefore the reg. ex. above
is wrong, but gets the basic point across.
> [...]
> > I have designed this to allow: -r1000-1
> > and disallow: -r-1+1000
> >
> > Is this acceptable? I would think the common use case would be N-x for
> > a previous revision.
>
> No, I wouldn't accept this.
>
> "N-1" is the only thing I can see being useful.
HEAD = r100
svn co -r66 $REPOS
svn diff -r66+5:HEAD-10
I know you are looking at the common use case, but how can you force
people to use a feature in a narrow scope such as looking back one
revision (who says that revision has a change to it?)?
I couldn't begin to tell you how people may use this feature. I'm sure
some will abuse it, but that often leads to innovations.
> It gives the previous version
> of an item iff N is a revision in which the item changed, which is a reasonably
> common usage. In most projects, revision "N+1" of a particular tree or item is
> often the same tree as revision "N" of it (because something elsewhere in the
> repository has changed), and similarly "N-2" the same as "N-1". If you think
> there is any use for adding a number, or subtracting any number other than one,
> please give a realistic use case.
I don't think you can make these generalizations. The idea isn't to
think about change sets but to save the user from having to do
arithmetic in their heads (possibly incorrectly). Just do it in the
argument and let the program calculate it for you.
> That's why (I thought) most people in the previous discussions and issue #1213
> decided that it would be more useful to compute a number of "changes" or
> "versions" of the particular item, rather than a number of revisions of the
> repository. I still feel it is probably only really useful to say "the
> previous version" and "the next version" of an item (and not N changes before
> or after).
I am not suggesting to implement "N changes", but simply arithmetic for
revisions which is easily understood by the vast majority of users
(except for maybe those who know how things work under the hood).
I guess the question comes down to:
"Is basic revision arithmetic something subversion should have?"
Thoughts? Luckily I haven't started any of this so my personal costs of
changing direction or aborting are null.
Cheers,
Chris
--
PGP Public Key: http://www.nesser.org/pgp-key/
17:05:58 up 1:30, 2 users, load average: 0.45, 0.23, 0.20
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: Revision Arithmetic
Posted by Julian Foad <ju...@btopenworld.com>.
Christopher Ness wrote:
> On Fri, 2005-08-26 at 15:21 +0100, Julian Foad wrote:
>>
>>A subset of this is issue #1213 "--revision PREVX enhancement wish"
>><http://subversion.tigris.org/issues/show_bug.cgi?id=1213>.
>
> That issue seems to want the arithmetic to be on changes, and not
> revision numbers.
>
> I plan to do revision arithmetic, addition and subtraction of revision
> numbers passed in as arguments as Karl said near Christmas 2004. Not
> changes since this would overload the meaning of the -r flag.
I'm not sure that this would overload the meaning of the -r flag any more than
the existing ways to specifiy a revision by date or by keyword like "PREV" do.
> I plan to extend the argument parsing to look for something like:
> ([0-9][0-9+-]*)*[0-9]+
> where the revision argument must start and end with a number and can
> have addition or subtraction chars but not as the first or last char.
Seems far too loose.
[...]
> I have designed this to allow: -r1000-1
> and disallow: -r-1+1000
>
> Is this acceptable? I would think the common use case would be N-x for
> a previous revision.
No, I wouldn't accept this.
"N-1" is the only thing I can see being useful. It gives the previous version
of an item iff N is a revision in which the item changed, which is a reasonably
common usage. In most projects, revision "N+1" of a particular tree or item is
often the same tree as revision "N" of it (because something elsewhere in the
repository has changed), and similarly "N-2" the same as "N-1". If you think
there is any use for adding a number, or subtracting any number other than one,
please give a realistic use case.
That's why (I thought) most people in the previous discussions and issue #1213
decided that it would be more useful to compute a number of "changes" or
"versions" of the particular item, rather than a number of revisions of the
repository. I still feel it is probably only really useful to say "the
previous version" and "the next version" of an item (and not N changes before
or after).
- Julian
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: Revision Arithmetic
Posted by Christopher Ness <ch...@nesser.org>.
On Fri, 2005-08-26 at 15:21 +0100, Julian Foad wrote:
> Christopher Ness wrote:
> > I didn't see any more discussion about revision arithmetic after I left
> > about two weeks ago.
> >
> > I might be daft, but my searches for "revision arithmetic" return zero
> > issues in the tracker, even with all states of an issue selected.
> >
> > Can someone point me to some more resources that were discussed about
> > this topic before I go about making the same old mistakes.
>
> A subset of this is issue #1213 "--revision PREVX enhancement wish"
> <http://subversion.tigris.org/issues/show_bug.cgi?id=1213>.
That issue seems to want the arithmetic to be on changes, and not
revision numbers.
I plan to do revision arithmetic, addition and subtraction of revision
numbers passed in as arguments as Karl said near Christmas 2004. Not
changes since this would overload the meaning of the -r flag.
I plan to extend the argument parsing to look for something like:
([0-9][0-9+-]*)*[0-9]+
where the revision argument must start and end with a number and can
have addition or subtraction chars but not as the first or last char.
Once this is verified, evaluate the arithmetic and pass the evaluated
revision number on.
There is no need for brackets to describe order of operations since
addition and subtraction are associative.
Anybody see a problem?
I have designed this to allow: -r1000-1
and disallow: -r-1+1000
Is this acceptable? I would think the common use case would be N-x for
a previous revision.
Cheers,
Chris
--
PGP Public Key: http://www.nesser.org/pgp-key/
09:21:34 up 1:04, 2 users, load average: 0.12, 0.17, 0.19
Re: Revision Arithmetic
Posted by Julian Foad <ju...@btopenworld.com>.
Christopher Ness wrote:
> I didn't see any more discussion about revision arithmetic after I left
> about two weeks ago.
>
> I might be daft, but my searches for "revision arithmetic" return zero
> issues in the tracker, even with all states of an issue selected.
>
> Can someone point me to some more resources that were discussed about
> this topic before I go about making the same old mistakes.
A subset of this is issue #1213 "--revision PREVX enhancement wish"
<http://subversion.tigris.org/issues/show_bug.cgi?id=1213>.
- Julian
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org