You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Frank Niedermann <fb...@thelogic.org> on 2006/08/02 07:22:51 UTC

Add HEAD revision to a file at checkout

Hi,

I'm holding a web application in Subversion with TortoiseSVN. Our developers
have asked if it's possible to show the revision of the deployed version on a
web page of the project.

At the moment I'm doing this manually, that means that I'm replacing "Rev: 123"
with the new revision after new checkout/deployment in the web page itself.

Is it possible to do this automatically, like having Subversion replacing $REV
with the HEAD revision at checkout? Important thing is that it should not use
the last revision of the document, it should use the actual HEAD revision.

Regards,
  Frank

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Add HEAD revision to a file at checkout

Posted by Frank Niedermann <fb...@thelogic.org>.
Ryan Schmidt <subversion-2006c <at> ryandesign.com> writes:
> >> I'm holding a web application in Subversion with TortoiseSVN. Our
> >> developers have asked if it's possible to show the revision of the
> >> deployed version on a web page of the project.
>
> Here's another take on this, written more for programmers of compiled  
> languages but maybe still useful:
> http://subversion.tigris.org/faq.html#version-value-in-source

That site mentioned the SubWCRev program [1] which seems to be what I need.

Thanks for all the help!

Regards,
  Frank

[1] http://www.tortoisesvn.net/docs/release/TortoiseSVN_en/ch06.html



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Add HEAD revision to a file at checkout

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Aug 2, 2006, at 16:32, Nico Kadel-Garcia wrote:

>> I'm holding a web application in Subversion with TortoiseSVN. Our
>> developers have asked if it's possible to show the revision of the
>> deployed version on a web page of the project.
>>
>> At the moment I'm doing this manually, that means that I'm replacing
>> "Rev: 123" with the new revision after new checkout/deployment in the
>> web page itself.
>>
>> Is it possible to do this automatically, like having Subversion
>> replacing $REV with the HEAD revision at checkout? Important thing is
>> that it should not use the last revision of the document, it should
>> use the actual HEAD revision.
>
> viewvc, baby. You want to install viewvc from www.viewvc.org: its  
> URL's are not identical to those of the repository itself, but it's  
> a trivial way to browse the contents and get revision numbers.

Mm.... no, that's not what he's asking. He's himself developing a web  
site, and wants the HEAD revision number displayed for his users to see.


Frank, there are no client-side hooks. What you would do is have a  
script that you use to deploy a new version of the site. The script  
might "svn up" a working copy, then use "svnversion" (or "svn info"  
some parsing) to get the revision number, then write this into a file  
in the working copy. (The working copy has been set up to ignore the  
presence of that file with svn:ignore.) The homepage of your web app  
then merely reads in the contents of that text file and displays it.

Here's another take on this, written more for programmers of compiled  
languages but maybe still useful:

http://subversion.tigris.org/faq.html#version-value-in-source


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Add HEAD revision to a file at checkout

Posted by Nico Kadel-Garcia <nk...@comcast.net>.
Frank Niedermann wrote:
> Hi,
>
> I'm holding a web application in Subversion with TortoiseSVN. Our
> developers have asked if it's possible to show the revision of the
> deployed version on a web page of the project.
>
> At the moment I'm doing this manually, that means that I'm replacing
> "Rev: 123" with the new revision after new checkout/deployment in the
> web page itself.
>
> Is it possible to do this automatically, like having Subversion
> replacing $REV with the HEAD revision at checkout? Important thing is
> that it should not use the last revision of the document, it should
> use the actual HEAD revision.

viewvc, baby. You want to install viewvc from www.viewvc.org: its URL's are 
not identical to those of the repository itself, but it's a trivial way to 
browse the contents and get revision numbers. 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org