Ticket #537 (closed bug: fixed)

Opened 2 months ago

Last modified 8 weeks ago

svnversion fails to determine revision of git repos for revison.cpp

Reported by: insaneinside Owned by: insaneinside
Priority: trivial Milestone: Infrastructure Improvements
Component: build and packaging Version:
Keywords: Makefile.am git svn svnversion configure.ac Cc:

Description

We currently use svnversion to determine the source revision to place in revision.cpp. Unfortunately, this doesn't work with git!

If the repository is at a tagged commit, the following shell command will fetch the tag name:

git-log -1 | sed -e '1!D;s/commit\x20//' | git-name-rev --stdin --tags | sed -e 's/.*(tags\/\(.*\))/\1/'

If there's a more direct way, I'm all for pointless efficiency tweaks. :)

BrainDamage says that for a repo that's on a commit more recent than the latest tag, the above will output the commit hash. Commit hashes aren't very pretty -- it'd be nice if we could get something like 0.0.1.10263+3 for the third commit after 0.0.1.10263.

Attachments

Change History

Changed 2 months ago by insaneinside

Oops, actually, with that second sed invocation, it ought to output nothing for a commit more recent than the latest tag. BD was just talking about git-name-rev.

Changed 2 months ago by insaneinside

  • status changed from new to assigned

I should keep my mouth shut -- I was right the first time, mostly. But it's simpler to just use git-describe --tags.

Changed 2 months ago by insaneinside

  • status changed from assigned to closed
  • resolution set to fixed

Fixed, pushed to my master branch: git://springlobby.info/git/insaneinside/springlobby.git

Changed 2 months ago by koshi

  • status changed from closed to reopened
  • resolution deleted

i'd like a clever way to not use the new rev string getting on buildbot please.
see http://buildbot.springlobby.info/private/builders/release/builds/64/steps/compile_4/logs/stdio
i don't really want that getting into tarball as rev string.

Changed 8 weeks ago by insaneinside

  • keywords svn svnversion configure.ac added

Fixed (passes distcheck) for me. See my current master.
I don't entirely understand why we were including the entire libtorrent package in the first place (configure fails if it's not already installed, anyway!).

Changed 8 weeks ago by insaneinside

  • status changed from reopened to closed
  • resolution set to fixed

It's fixed the right way this time, I promise. :)

Add/Change #537 (svnversion fails to determine revision of git repos for revison.cpp)

Author



Change Properties
<Author field>
Action
as closed
Next status will be 'reopened'
 
Note: See TracTickets for help on using tickets.