'Outlook style' rules for Subversion
At work, when I get an email from an idiot, I set a rule.
Example
I start work at a new company.
I notice they use Microsoft Outlook.
Within minutes I get an email:
From: Jenny@work
To: Everyone@work
This message was sent with High Importance!
Subject: "URGENT!!!! Get your footing tipping entries in by Tuesday week!"
Hmmm. It's "URGENT!!!!" so I spring into action:
Add new rule -> Messages from: 'Jenny@work' -> Delete.
Done.
But now look at all this crappy code the other devs keep commiting to the repository.
Every time I perform an "SVN update" it's like I've just invited a carnival of freaks to crap all over my hard drive.
A nice feature would be if we could get the same utility from subversion as I get from outlook.
"Do not accept any code changes from Trevor, if they relate to internationalization."
Trevor, you see, doesn't have a freakin' clue about internationalization. But he thinks he's God's gift to the unicodes.
And Joella, who thinks every programming nail is another excuse to wield the hammer of reflection.
"If you see code submitted by Joella, containing 'System.Reflection' replace with '//TODO: write actual code here, rather than namby-pamby show off serialization code.'
It's just a humble dream I have. The best approach to implementing it, that I've come up with so far, is to build a custom version of Tortoise SVN (it's open source right? I can fork it a little if I want to ) and then dump this custom version of tortoise on Trevor and Joella's machines.
From Trevor's point of view, it will look like he's committing his changes to the repository. But tortoise will in fact be just quietly twiddling its thumbs and doing nothing. If you count 'logging keystroke and scraping bank account details' as 'doing nothing', that is.
Trevor may realise sooner or later that he's never getting anyone else's changes. That no matter how often he updates, he never gets any new code. He may even begin to suspect something is up and he may bring it to our attention. At that stage it's time to enact the "remote 'overwrite every byte on the hard drive, and perform thorough boot sector corruption' " feature of his custom tortoise build.
With a little creativity, a little software, and a little patience, we truly can make the world a better place.
p.s. the solution is: DVCS. Please discuss.
'Doeke Zanstra' on Fri, 10 Jul 2009 11:40:01 GMT, sez: Ultimately every developer creates his/her own distribution of the software!
'Thijs' on Fri, 10 Jul 2009 11:47:13 GMT, sez: In that other version control system these rules are known as Checkin Policies.. you can create custom ones just like http://www.codeplex.com/checkinpolicypack
'gho' on Fri, 10 Jul 2009 12:18:45 GMT, sez: Checkin policies are nice but TFS equals too much pain too little gain.
(Sorry for the insult, 'Thijs' I did looked at your website and liked it a lot)
And secretgeek: how does a 'dvcs' like mercurial provide this facility?
'Eran Kampf' on Fri, 10 Jul 2009 12:36:34 GMT, sez: Your dream has a name - Git.
You run your own repository and you only pull changes from people you trust.
Check out "Dictator and Lieutenants Workflow" at http://whygitisbetterthanx.com/
'Goran' on Fri, 10 Jul 2009 22:42:30 GMT, sez: I don't think the solution is in preventing unwanted commits but in cherry picking the versions to build. And ahm... I'm actually working really hard to solve this one for you :)
Checking my TSVN to see if it was tempered with....
'Wez Furlong' on Sat, 11 Jul 2009 11:35:38 GMT, sez: Seems to me like the real solution is to fire the people that can't write code, and if that's not possible, look for a job where you're not dealing with that kind of mess; you can't fix bad code with a DVCS.
'Veera' on Sat, 11 Jul 2009 14:58:28 GMT, sez: ha.ha. nice idea. Will be interesting if implemented.
btw, I'm using visualSVN server (http://veerasundar.com/blog/2009/06/setting-up-a-subversion-server-in-windows-using-visualsvn/) which allows to configure hooks. Using this feature, we can execute some action before any one commits the code to the subversion. :)
'Steven Nagy' on Wed, 15 Jul 2009 07:52:09 GMT, sez: I didn't know you had so many Alt.net communists following your blog Leon.
'lb' on Thu, 16 Jul 2009 08:50:46 GMT, sez: Joel pointed out that the correct feminine form of his name is "Jolene".
Sorry Joel, I'll obscure your identity better next time ;-)
|