[Buildbot-devel] SVN.parseGotRevision() patch
Jean-Paul Calderone
exarkun at divmod.com
Tue Oct 30 21:02:41 UTC 2007
On Tue, 30 Oct 2007 13:27:58 -0700, Aaron Maxwell <amax at snaplogic.org> wrote:
>Hello,
>
>I have a patch for SVN.parseGotRevision() in buildbot/slave/commands.py, in
>0.7.6. It solved a specific problem we had; I'd like feedback as to whether
>it is generally useful, and if so, submit it.
>
>What it does is change how the svn reversion number is calculated. Here's the
>exact example that we first noticed. One of our SVN repositories consists of
>a trunk and branches, including individual developer's working branches. The
>other day, the most recent commit was made to one developer's branch, with a
>revision number of 602. At the same time, the most recent trunk commit was
>numbered 598. If you do a command like:
>
> svn co -r 602 svn+ssh://path/to/trunk/
>
>what you'll get is a checkout of trunk at rev. 598. If you run "svnversion ."
>there the response will be '602'; if you run "svnversion -c ." the response
>is '1:598'.
>
>For our purposes, the number we need is 598, since it's the revision of the
>actual trunk commit. This is what the patch does: basically
>runs "svnversion -c ." rather than "svnversion .", parsing the response
>appropriately. Is this the right solution for others as well?
But trunk at 598 is the same as trunk at 602. Since you want the revision number
of the last change to trunk, you should probably be getting it somewhere
else entirely. I don't really know where, but perhaps the svn change
notifier would be a reasonable place (it's the thing which knows about
commits, after all).
Unrelated to your patch, except that it would touch the same part of the
code, what I would like to see is the _removal_ of the use of svnversion
entirely. The information was already supplied elsewhere, and svnversion
takes _forever_ to run on Windows. It would almost double the speed of all
our Windows builds if svnversion weren't run.
Jean-Paul
More information about the devel
mailing list