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

Re: Revision Arithmetic

From: Christopher Ness <chris_at_nesser.org>
Date: 2005-08-28 15:38:59 CEST

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

Received on Sun Aug 28 15:41:16 2005

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.