Ticket #167 (closed defect: fixed)

Opened 5 years ago

Last modified 8 months ago

svnversion is pretty slow, particularly on windows

Reported by: exarkun Owned by: ipv6guru
Priority: major Milestone: 0.8.+
Version: 0.7.6 Keywords: svn, sprint, master-side-source-steps
Cc:

Description

buildbot uses the svnversion program to pick a version number to report. svnversion takes a while to run though. On windows, it often takes several minutes, which can be longer than the actual build takes. Apparently svnversion is used to provide a consistent version number, regardless of whether "svn update" or "svn checkout" is being used, since they report different version numbers.

I suggest using "svn info" instead of "svnversion" to get a consistent version number.

Change History

comment:1 Changed 5 years ago by igor

  • Priority changed from major to minor
  • Version changed from 0.7.6 to 0.7.7

comment:2 Changed 5 years ago by igor

  • Priority changed from minor to major
  • Version changed from 0.7.7 to 0.7.6

comment:3 follow-up: ↓ 5 Changed 4 years ago by dustin

Why does svnversion take so much longer? That's very strange. If 'svn info' is that much faster, perhaps there's something we're doing wrong?

comment:4 Changed 4 years ago by dustin

  • Milestone changed from undecided to 0.7.+

comment:5 in reply to: ↑ 3 Changed 4 years ago by igor

Replying to dustin:

Why does svnversion take so much longer?

svn info is much faster because it performs a very different operation than svnversion. All it does is reads the contents of .svn/entries file *in the directory it's run from* and reports the version recorded there.

Now, if you have a complex source tree, svn allows you to check out different versions of the subtrees. E.g., one can check out r10000 of server/src, r12000 of server/src/core and r11000 of server/src/cli.

If you run svn info in server/src, it'll just say that you've got r10000 and it'll take no time whatsoever.

On the other hand, svnversion will actually go into subdirectories *recursively* to check their versions too. So in this case it will report something like r10000:12000. Moreover, it will notice if you have any local modifications in your working tree; if you do, it'll add "M" to the version number.

Depending on how your build process is set up, knowing the difference may be quite important, imho, so I think it's better to make the use of svn info vs. svnversion configurable rather than just replace one with the other.

comment:6 Changed 4 years ago by dustin

Interesting! I don't necessarily see a use-case for the svnversion output being useful, so I think that svn info should probably be the default, but I don't see any reason not to make this configurable.

comment:7 Changed 3 years ago by ipv6guru

  • Owner set to ipv6guru
  • Status changed from new to accepted

comment:8 Changed 3 years ago by dustin

  • Keywords svn added
  • Milestone changed from 0.8.+ to 0.8.1

comment:9 Changed 3 years ago by dustin

  • Milestone changed from 0.8.2 to 0.8.+

Once #669 is cleaned up, this should be easier.

comment:10 Changed 15 months ago by dustin

  • Keywords svn, sprint, master-side-source-steps added; svn removed

comment:11 Changed 9 months ago by Pradeepkumar Gayam

  • Status changed from accepted to closed
  • Resolution set to fixed

To get revision number use svn info instead of svnversion

Fixes #167

Changeset: 92ffd9de1ec7f1cebc400b3ee52111f62828887d

comment:12 Changed 8 months ago by Pradeepkumar Gayam

To get revision number use svn info instead of svnversion

Fixes #167

Changeset: 92ffd9de1ec7f1cebc400b3ee52111f62828887d

Note: See TracTickets for help on using tickets.