What do different VCSs do when a file changes?
Here’s the scenario: You change a file. You invoke your-vcs-here commit file.txt (or equivalent). You write a commit message in the editor. You suspend the editor with ^z and make another change to a...
View Articledarcs is becoming my favorite VCS
Here’s a real-world situation that tells you why I’m falling in love with darcs. I’m working on a plug-in that logs all notifications posted by Apple Mail to a couple of files. The idea of this plug-in...
View ArticleFrom svn to darcs: Listing unknown files
If you’re an svn user looking at darcs, you may wonder how to find unknown files—that is, files that you’ve created in your working directory, but haven’t yet told your VCS about (with svn add or darcs...
View ArticleMore Darcs win: Selective recording
Darcs lets you choose which changes you want to include in a patch (commit). For example: darcs rec %~/ASL test apps/aslsearch(0) move ./aslsearch.m ./aslsearch.c Shall I record this change? (1/?)...
View ArticleGenerating a tarball of your project
Every good version-control system has this as a built-in feature. In the below, $TMP is a staging directory, such as “build”, “/tmp”, or “/Volumes/RAM Disk”. It’s also where the final archive will end...
View Articlehg st says modified, but hg diff doesn’t say anything
You have a puzzle. When you run hg st, it says one of your files is modified: hg st %~/Python/run_tests(0) M test.py But when you run hg diff, it doesn’t say anything about the file: hg diff test.py...
View Article.hgignore for Mac OS X applications
If you use version control (and you should), then you’re familiar with the pollution that an Xcode build folder can put into your status output: ? build/.DS_Store ? build/Debug/UTI Plist...
View ArticleNew tool: sednames
What if you could use sed to rename files? Well, now you can. sednames is a utility that lets you specify a program for sed on the command-line, which it then uses to rename the files that you also...
View Articlesvn merging is full of fail
[SCENE: adium/branches/summer_of_code_2008/unit_testing. I’m merging changes from trunk to this branch.] svn --version svn, version 1.5.0 (r31699) compiled Jul 5 2008, 04:29:25 Copyright (C) 2000-2008...
View ArticleNew Mercurial extension: Bitbucket Extension
If you’ve ever used Bazaar, you know that one of its features is a shorthand URL scheme for referring to Bazaar repositories on Launchpad. For example, to clone Sparkle’s main repository: % bzr clone...
View ArticleAdding Growl support to Mercurial
Add this to your ~/.hgrc file: [hooks] changegroup.growl = ((echo "$HG_URL" | grep -vF 'file:' > /dev/null) && growlnotify -n Mercurial 'Pull successful' -m "Pulled at least $(hg log...
View Articlehg precommit hooks and the Clang Static Analyzer
Fraser Speirs has a post about configuring your Git repository to vet commits with the Clang Static Analyzer. The idea of pre-commit hooks is that you get to run a script before the commit happens....
View ArticleHow to make hg merge, hg resolve use FileMerge
Put this in your ~/.hgrc file: [merge-tools] filemerge.executable=opendiff filemerge.args=$other $local -ancestor $base -merge $output filemerge.gui=True (Based on the original description of and Matt...
View ArticleGit fetch weirdness explained
In another tussle with Git, I performed the following sequence of commands: cd mach_star-rentzsch git fetch (from GitHub) cd ../mach_star-boredzo git fetch rentzsch (in this context, my git-remote...
View Article