PDA

View Full Version : Working with svn revisions and identifying which installation is which



thowden
02-18-2012, 04:50 PM
Hi All

Something that might help others that use the svn repository for testing the latest build and comparing earlier versions to the latest changes.

I have so many different instances of osCmax that when I grabbed a new version earlier today I realised that keeping track of which was which was a pain.

So I came up with an svn version lookup that appends the svn revision to the PROJECT_VERSION as a part of the load.

The details are in my blog at Tonys Tech Blog» Blog Archive » osCmax svn and reporting which revision is in use (http://howden.net.au/thowden/2012/02/oscmax-svn-and-reporting-which-revision-is-in-use/)

Essentially there is one new file and a simple mod to both install/includes/application.php and includes/application_top.php

The result is that for a .svn download you can have

Welcome to osCmax osCmax v2.5.0 svn: 1682

as the tag line for the version.


Tony

ridexbuilder
02-18-2012, 05:57 PM
Thanks for sharing.

I just add the SVN number to the version line in the Admin application_top.php. That way the Admin only sees it, when logged in and it doesn't show on the front end.

michael_s
02-18-2012, 11:25 PM
I just type 'svn info' at the command line. It gives you the current revision, path it was checked out from, and last modified date. This is what the output looks like:


[[email protected] dev21]# svn info
Path: .
URL: http://oscmax2.googlecode.com/svn/branches/dev/2.1
Repository Root: http://oscmax2.googlecode.com/svn
Repository UUID: a4920382-5936-0410-8c60-f14f5803c0f4
Revision: 1668
Node Kind: directory
Schedule: normal
Last Changed Author: ejsolutions.co.uk
Last Changed Rev: 1668
Last Changed Date: 2012-02-12 06:11:23 -0700 (Sun, 12 Feb 2012)