SVN Pre-commit duty: Lint your PHP
We’ve all been there before, committing code - and then realizing that it was broken (hrm - our unit test didn’t catch it? or… “what unit test?” if you’re in another environment). Well, there is a solution.
These entries have all been tagged with “svn”.
We’ve all been there before, committing code - and then realizing that it was broken (hrm - our unit test didn’t catch it? or… “what unit test?” if you’re in another environment). Well, there is a solution.
A while ago, I decided that I needed to have a better backup solution for my file server. After doing some research on various systems, I let my inner programmer take over - in addition to my desire to NEVER LOSE ANYTHING - and I defaulted to use SVN.
Everyone knows that standard SVN has its list of 6 or 8 standard hooks - but what if you’re 1) lazy, 2) busy, 3) don’t have access to the SVN server? Using one of the popular win32 shell integrated svn clients, TortoiseSVN, we can still force commit log messages easily:
In my posting about Integrating PHPDocumentor into Eclipse, I touched on External Tools a bit. The combination of external batch files, the external tools extra options and the console has made my life easier. I’m using two new additional batch files that I’ve written myself and integrated as external tools. These include automated SVN release update and resource refresh and Apache application control (for those who can’t run apache as a service on w32):
I generally don’t like to be tied to a specific IDE when developing. Additionally, I like to have my choice in using tools to manage my source control (tortoisesvn, svn command line, etc). I just think this is the open-source way - it seems to be just a more free-spirited way of developing and managing projects. With this in mind, I’ve been looking for ways to integrate my SVN into my current IDE (Eclipse PDT) but not limit myself from accessing my SVN repositories from the file system. I’ve found a great plugin to help with this - so let’s go over the specifics:
I use Subversion (SVN) for source control and deployment both for JEMDiary and at (“the triangle”). While working on my local copy of one of the websites, I got to thinking about the .svn
folder and all of its files. The .svn
folder is a local cache/db of the file changes in order to support diffs, reverts, and to give cues about file changes and the need to commit. I started poking around inside of the folder - and discovered the text-base
folder. Inside of there, every one of my recently changed files were in there with an extension of .svn-base
. Could this be a security issue - was I showing my code to the whole world? Let’s figure this out: