Integrating JIRA and SVN Using bugtraq Properties
Here at work we are using JIRA for bug/issue tracking, most of the developers also use Eclipse and everyone is using Subversion (TortoiseSVN).
I was digging through one of the SVN books and came across a bugtraq property. A bit of Googling turned me onto a great tutorial by Mark Phippard (project lead for Subclipse):
Subversion – Just Do It
January 3, 2008 by Jim · 5 Comments
Yesterday evening there was a post on the CFEclipse mailing list. Someone was curious about how they could back up their CFEclipse projects and I responded “by using Subversion”.
They replied:
It just seems like complicated overkill for a single developer
I see this all the time and it’s frustrating because of all the tools I use Subversion is THE one I wish I had started using years ago. Yes it was confusing at first… What is an update? Commit? WHERE is my code? What is a ‘repository’? But now I couldn’t live without it.
Everything I do related to a project goes into Subversion:
- Code
- Ant build scripts
- SQL scripts
- ALL project documentation
Installing and getting started with Subversion is fairly easy. There is a Subversion book online, for free. There is a ‘one-click’ installer (for Windows) available. There are several great client utilities. Two of my favorite are Subclipse (great w/CFEclipse) and TortoiseSVN.
I recommend everyone download and check out the help file included with TortoiseSVN. It is IMO one of the best guides written for Subversion. In particular the “Basic Concepts” and “Daily Use Guide” sections are a great introduction to version control.
While I’m pushing Subversion here, if that doesn’t work for you, there are lots of other version control solutions. Just use one. It doesn’t matter if you are a solo developer or on a team. Version control will help make you a better developer.
Trac/Subversion Book
December 29, 2007 by Jim · Leave a Comment
Just saw this on Google Reader while reading my Ubuntu feeds…
Managing Software Development with Trac and Subversion.
That looks like a good one!!
Why Use Subversion? Two Reasons: Revert and Branches
August 20, 2007 by Jim · 3 Comments
I’ve seen a few posts and blog comments were people were reluctant to implement some kind of version control primarily because they develop by themselves and didn’t see any value.
Two things I use in Subversion that makes my development easier are Branches and the Revert command.
So the last few days I’ve been messing around with some CFDocument stuff as well as doing a lot of experimental jQuery work.
Revert
According to the SVN documentation:
Reverts any local changes to a file or directory and resolves any conflicted states.
What’s neat with Subversion is I can open my print.cfm – and try out several cfdocument ideas – code them up – save them, try em out and if they don’t work – in CFEclipse (using the Subclipse plugin) I simply right-click on the file, click Team > Revert and my file is back to a known working state. No renaming or making a backup of the file before tinkering with it… no hitting CTRL+Z (undo) a million times. Back to square one with a few clicks. You may revert a single file or an entire directory.
Branches
With my jQuery code – I’m developing a HTML version of an existing PDF user manual. I’m using jQuery to build a fancy collapsible table of contents. I’m doing this in steps while I work through the book – post questions to the mailing list, etc. I don’t want to develop this in my main code – so I’ve created a ‘branch’ in Subversion – again from the SVN docs:
Branch – a line of development that exists independently of another line, yet still shares a common history if you look far enough back in time. A branch always begins life as a copy of something, and moves on from there, generating its own history.
So I’ve made a branch of the existing user manual code (my /manual directory) and I can develop and experiment on that ‘branch’ while keeping the existing PDF manual current in my main code base.
If my jQuery experiments work out – I will eventually merge my branched code into the working code base – or I can simple trash that branch and continue on using the PDF version. Again – no undoing, renaming, or major reorganization of my main code base is required.
So you can see – I’m doing all of this with my local development code – there is no team involved here – and I still see a benefit of using version control. If you are a solo developer – download it and start using it – I guarantee you will kick yourself for not trying it out sooner.
Automated Subversion Reports w/StatSVN and Ant
February 26, 2007 by Jim · 2 Comments
Alistair Davidson recently blogged about StatSvn – a reporting tool for Subversion. From their site:
“StatSVN retrieves information from a Subversion repository and generates various tables and charts describing the project development.”
Some of the reports it will produce:
- Timeline for the lines of code
- Lines of code for each developer
- Activity by Clock time
- Authors Activity
- Author activity per Module
- Stats per directory
- File count
- Average file size
- Largest files
- Files with most revisions
- Directory Sizes
- Repository Tags Number of LOC per version
- Repository tree with file count and lines of code
- LOC and Churn the evolution of LOC and the amount of change per day
- Repo Map the dynamic hierarchical view of your repo for the last 30 days
While it’s not difficult to run manually – the great thing about this is they have include an Ant task – so you can automate the whole thing!
SVNService No Longer Needed with Subversion 1.4
October 24, 2006 by Jim · 18 Comments
I'm reinstalling all my software (got a new PC at work - whoohoo!) and was digging around for SVNService - a wrapper that allowed you to run SVN as a Windows service. All the links I found on Google were dead and I thought I was hosed until I found this:
Windows Service Support for svnserve
svnserve can now be run as a native Windows service. This means that the
service can be started at system boot, or at any other time, without the
need for any wrapper code to start the service.
Please note this applies to 1.4 and I'm assuming all versions moving forward.
Here is what I ran (WinXP):
-
sc create svn.local binpath= "\"c:\program files\subversion\bin\svnserve.exe\" --service --root D:\svnrepo" displayname= "Subversion Repository" depend= Tcpip
Once you run this - you will need to actually start the service - either via the Windows Service GUI or hit the command line and do a 'net start/stop yourservicename'
Important Update: 12/14/2006
Ray Camden notes that you have to type in the command exactly as shown above - with a space after each equals sign:
Yes: option= [space] "value" option2= [space] "value"
No: option="value" option2="value"
Subversion Hotcopy Backup Scripts
August 17, 2006 by Jim · Leave a Comment
I wrote these two scripts to backup my repository at work. Tested on WinXP...
Example 1 - could be run with Scheduled Task:
-
@ECHO OFF
-
REM will hotcopy your repo to My Documents
-
REM this will delete the existing dir and create it again
-
REM you could use this script with a scheduled task for backup
-
-
REM created by Jim Priest
-
REM last edited 3:38 PM 8/14/2006
-
-
SET REPODIR=d:\path-to-your-repository
-
SET REPOBACKUP="C:\path-to-your-backup\svnbackup"
-
-
ECHO ==================================
-
ECHO PROCESSING BACKUP ...
-
ECHO This may take some time depending
-
ECHO on the size of your repository!
-
ECHO ==================================
-
-
RMDIR %REPOBACKUP% /S/Q
-
svnadmin hotcopy %REPODIR% %REPOBACKUP%
-
-
ECHO BACKUP COMPLETED!
Example 2 - this one will copy the backup to a dated directory
-
@ECHO OFF
-
REM will hotcopy your repo to My Documents into a dated directory
-
REM created by Jim Priest
-
REM last edited 3:45 PM 8/14/2006
-
-
REM SET Date
-
for /f "tokens=1,2" %%u in ('date /t') do set d=%%v
-
for /f "tokens=1" %%u in ('time /t') do set t=%%u
-
if "%t:~1,1%"==":" set t=0%t%
-
-
SET timestr=%d:~6,4%-%d:~0,2%-%d:~3,2%
-
SET REPODIR=d:\path-to-your-repository
-
SET REPOBACKUP="C:\path-to-your-backup\svnbackup_%timestr%"
-
-
ECHO ==================================
-
ECHO PROCESSING BACKUP ...
-
ECHO This may take some time depending
-
ECHO on the size of your repository!
-
ECHO ==================================
-
-
svnadmin hotcopy %REPODIR% %REPOBACKUP%
-
-
ECHO BACKUP COMPLETED!
-
ECHO ==================================



