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

RE: [semi-OT] Getting the last revision number of a repository from an Ant script

From: Dave Merrill <dmerrill_at_usa.net>
Date: 2006-02-06 05:08:35 CET

Kevin Greiner wrote:
> On 2/4/06, Dave Merrill <dmerrill@usa.net> wrote:
> > I've tried SubWCRev.exe, but since it works off working copies,
> > it gets the
> > revision number of the working copy the script just created to
> > build from, so it's always 0.
> That's not right. The revision number of the wc is the rev from which
> the wc was built.

Right you are, thanks for questioning that. Problem was an error in the wc
path I passed; it wasn't the root of the wc.

While I'm asking silly questions in this area, maybe someone can straighten
out a related workflow, or maybe repository setup, confusion I'm having.

My wc has src and dist dirs, standard I think. When I have some degree of
"release" ready in src, I run an ant script that, among other things, copies
the head revision into a temp dir outside the wc, uses SubWCRev.exe to
insert revision info into one of the files in temp, then zips everything in
temp up into a file in dist. All that remains is to commit the newly created
zip file in dist, then create a copy of that dist/release state in tags.

Weird part is that the revision with the updated zip that gets tagged isn't
actually the one matching the revision number in the file in the zip. It has
to be that way, because the dist commit is (at least) one after the commit
it was created from.

Is there any way around this? I know I want a tag of the actual distro, as
well as the ability to create it again from sources, which seems inherently
to lead to this situation. Is this process basically what others do?

> > Is there a common way to do this? Some other approach entirely?
> There is also svnrevision, a cmd-line tool. Have you looked at it?

Nope; looking around on the net I see lots of java classes w that name, but
didn't find a cmd line tool. May not need it.

Thanks again, as always,

Dave Merrill

To unsubscribe, e-mail: users-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: users-help@tortoisesvn.tigris.org
Received on Mon Feb 6 05:08:46 2006

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

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