[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Quick fix for tagging.

From: Francis Trujillo (ftrujillo) <ftrujillo_at_micron.com>
Date: Wed, 21 Aug 2013 18:23:00 +0000

I Googled for tagging for svn and got the branch/copy solution. Not needed in my case.

This is my simple solution for projects and what revision is tagged to a version number. If you like it, then post it.

In ~/.aliases file

set dollar='$'
set sed_1='\1'
alias svn_tag "svn update;svn log -l 1 | egrep 'r[0-9]+' | sed -r 's/(.*)$dollar/$sed_1 VERSION \!:*/g' | tee -a VERSION.txt;svn commit -m 'version \!:*' VERSION.txt"

Usage

$ svn_tag 1.0.1
Updating '.':
At revision 431.
r430 | ftrujillo | 2013-08-21 11:40:38 -0600 (Wed, 21 Aug 2013) | 1 line VERSION 1.0.1
Sending VERSION.txt
Transmitting file data .
Committed revision 432.

:-)

Francis Trujillo Jr
SYSTEMS & TOOLS ARCHITECT - NSG
208-368-2834 work
208-914-1527 cell
Received on 2013-08-21 21:31:42 CEST

This is an archived mail posted to the Subversion Dev mailing list.