Print compiled Clojure svn revision?

2008-11-07 Thread vdm
Is there a way to make Clojure print the svn revision it was compiled from? A standard or idiomatic way to do this (print clojure--svn-rev) would help when trying to isolate whether observed behaviour is happening on old or current code. It is possible to have newer code checked out but still be

Re: Print compiled Clojure svn revision?

2008-11-07 Thread Graham Fawcett
On Fri, Nov 7, 2008 at 11:46 AM, vdm <[EMAIL PROTECTED]> wrote: > > Is there a way to make Clojure print the svn revision it was compiled > from? A standard or idiomatic way to do this (print clojure--svn-rev) > would help when trying to isolate whether observed behaviour is > happening on old or

Re: Print compiled Clojure svn revision?

2008-11-07 Thread Rich Hickey
On Nov 7, 1:02 pm, "Graham Fawcett" <[EMAIL PROTECTED]> wrote: > On Fri, Nov 7, 2008 at 11:46 AM, vdm <[EMAIL PROTECTED]> wrote: > > > Is there a way to make Clojure print the svn revision it was compiled > > from? A standard or idiomatic way to do this (print clojure--svn-rev) > > would help wh

Re: Print compiled Clojure svn revision?

2008-11-07 Thread Graham Fawcett
On Fri, Nov 7, 2008 at 1:15 PM, Rich Hickey <[EMAIL PROTECTED]> wrote: > > > > On Nov 7, 1:02 pm, "Graham Fawcett" <[EMAIL PROTECTED]> wrote: >> On Fri, Nov 7, 2008 at 11:46 AM, vdm <[EMAIL PROTECTED]> wrote: >> >> > Is there a way to make Clojure print the svn revision it was compiled >> > from?

Re: Print compiled Clojure svn revision?

2008-11-07 Thread Chouser
On Fri, Nov 7, 2008 at 1:02 PM, Graham Fawcett <[EMAIL PROTECTED]> wrote: > > If Rich would be willing to add this to boot.clj, [snip] > > ...then (clojure-svn-revision) ought to return the revision number as > a string. I'd really like to see something like this too, but unfortunately I don't th

Re: Print compiled Clojure svn revision?

2008-11-07 Thread wwmorgan
As a matter of style, I would rather see this functionality in a global var than in a function. I think that's it's a more idiomatic place for it. user=> *version* "r1088" On Nov 7, 1:18 pm, "Graham Fawcett" <[EMAIL PROTECTED]> wrote: > On Fri, Nov 7, 2008 at 1:15 PM, Rich Hickey <[EMAIL PROTE

Re: Print compiled Clojure svn revision?

2008-11-07 Thread Graham Fawcett
On Fri, Nov 7, 2008 at 1:48 PM, Chouser <[EMAIL PROTECTED]> wrote: > > On Fri, Nov 7, 2008 at 1:02 PM, Graham Fawcett <[EMAIL PROTECTED]> wrote: >> >> If Rich would be willing to add this to boot.clj, > [snip] >> >> ...then (clojure-svn-revision) ought to return the revision number as >> a string.

Re: Print compiled Clojure svn revision?

2008-11-07 Thread Matt Revelle
I'm just finishing up an addition to the build script that executes "svnversion" and stores the result in a "versioninfo" file that would be placed in the clojure.jar file and the value stored in a *version* var in boot.clj. If someone is building from source, I think we can assume they hav

Re: Print compiled Clojure svn revision?

2008-11-07 Thread Daniel Renfer
This wouldn't work if someone is using a mirror of the repository using a different SCM. For instance, there's a mirror on github. On Fri, Nov 7, 2008 at 2:23 PM, Matt Revelle <[EMAIL PROTECTED]> wrote: > > I'm just finishing up an addition to the build script that executes > "svnversion" and st

Re: Print compiled Clojure svn revision?

2008-11-07 Thread Matt Revelle
On Nov 7, 2008, at 2:25 PM, Daniel Renfer wrote: > > This wouldn't work if someone is using a mirror of the repository > using a different SCM. > > For instance, there's a mirror on github. True, if supporting other SCMs is important we can make the "version" task in the build file smart enou

Re: Print compiled Clojure svn revision?

2008-11-07 Thread Mike Hinchey
Haven't we been through this before? http://groups.google.com/group/clojure/browse_thread/thread/1ae7eae292765d40/f49c4ccdaca67a23 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this grou

Re: Print compiled Clojure svn revision?

2008-11-07 Thread Graham Fawcett
On Fri, Nov 7, 2008 at 2:25 PM, Daniel Renfer <[EMAIL PROTECTED]> wrote: > > This wouldn't work if someone is using a mirror of the repository > using a different SCM. No, but it would still include the upstream SVN revision number. Alas, what I thought was possible with SVN hooks appears to be

Re: Print compiled Clojure svn revision?

2008-11-07 Thread Matt Revelle
I'm in a rush and need to clean this up, but here's something that works: Index: build.xml === --- build.xml (revision 1088) +++ build.xml (working copy) @@ -11,6 +11,7 @@ +

Re: Print compiled Clojure svn revision?

2008-11-08 Thread Matt Revelle
If marking SVN revisions and/or release versions is something we still want and want automated, it now looks like using the build tool is the only way to go. The example I sent earlier to the list includes the creation of a "versioninfo" file from the build script which is then read and s

Re: Print compiled Clojure svn revision?

2008-11-14 Thread Graham Fawcett
On Sat, Nov 8, 2008 at 12:03 PM, Matt Revelle <[EMAIL PROTECTED]> wrote: > > If marking SVN revisions and/or release versions is something we still > want and want automated, it now looks like using the build tool is the > only way to go. The example I sent earlier to the list includes the > crea

Re: Print compiled Clojure svn revision?

2008-11-14 Thread Matt Revelle
Ok, will submit a patch for this early next week. Current plan is to use a properties file (versioninfo.properties) that will be generated from the ant build script and contain the release version/name, the source repository, a revision indicator (number, tag, or digest), and who built it.