From: Jean-Michel Date: 2009-10-06T00:10:28+09:00 Subject: Re: Get current working copy version in subversion/git On Oct 4, 5:48 am, brab...@gmail.com wrote: > On 10/4/09, Anthony Metcalf wrote: > > > Ryan Davis wrote: > >> for subversion it is: `svnversion .`.chomp > > > Cool! > > > I take it the '`'  mean "run this command and return the results as a > > string? > > That may have been the problem you had with the other version, when I > copied and pasted from the email it came out with ': > > >>> git_cmd     = 'git show --pretty=format:"%H|%ci" --quiet' > > instead of `: > > > > >>> git_cmd     = `git show --pretty=format:"%H|%ci" --quiet` There is no need for IO.popen: commit_id, commit_date = `git show --pretty=format:"%H|%ci" -- quiet`.split('|') Jean-Michel