[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: Julian Foad <julianfoad_at_btopenworld.com>
Date: 2005-08-31 13:09:18 CEST

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"
> 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
Received on Wed Aug 31 13:10:13 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.