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

RE: Commiting file which contains the next revision number

From: Jeff Urlwin <jurlwin_at_esoftmatic.com>
Date: 2004-12-16 21:37:02 CET

> On 2004-12-16 12:43-0600, Ben Collins-Sussman wrote:
> > >>
> > >>>Is there a way to either get the next revision number, or better,
> > >>to
> > >>>specify a tag in a file such than when the file is committed the
> > >>tag is
> > >>>replaced with the revision in which it was commited.
> > >>>
> >
> > I don't understand why this thread is full of so much confusion.
> =)
> > The definition above sounds *exactly* like the definition
> of the $Rev$
> > keyword. Just use it!
> Well, the original poster asked something like that:
> ChangeLog
> * foo fixed in r42
> * bar fided in r21
> * barf fixed in r2
> So it $Rev$ is out of the picture.

Well, not really. While $NextRev$ may sound convenient (which it would be), I would want
it to do this:

* foo fixed in Rev: $NextRevOneTimeOnly$

After checkin of Changes.txt:

* foo fixed in Rev: 3

But, since I'd have to edit Changes.txt again for the next log message, I would:

* bar fixed in Rev: $NextRevOneTimeOnly$
* foo fixed in Rev: 3

Since, you'll probably keep a running edit on the Changes file, what you can do now is:

* foo fixed in Rev: $Revision$

And, after commit, go and edit

* foo fixed in Rev: $Revision 5$
* foo fixed in Rev: 5

Then publish the version.

But it would be nice to have a method to do it cleanly.

For an example, see Tim Bunce's DBD-Oracle Changes file here:
http://svn.perl.org/modules/dbd-oracle/trunk/Changes )

So, you can see that Tim, for example, tracks the rev # for each release to the public.
He's got the NNN as a place holder while he's checking it in during development, but
later, he'll change that to a Rev # (after the fact, of course or by guessing.) You
manually have to "guess" the number as you are checking in or, you check in r5 and then go
back and edit changes file and indicate r5 (which becomes r6 when you check it in...)


To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Dec 16 21:39:37 2004

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

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