Some remarks on SubGit

I’ve been evaluating SubGit with a colleague for some time now. It seems to be a decent tool if you have to use Subversion and can’t simply switch to Git completely. Nevertheless, we stumbled on a few (pretty annoying) things:

First, SubGit writes changes to the Git tree right into Subversion. As Subversion doesn’t know things like fast-forwards, this results in funny commits with messages like “trunk:$rev replaced by branch:$rev“. That kinda freaked out some colleagues of mine before we understood what’s really going on[1]. A solution for this is the –no-ff flag when merging. You might just want to set it for the whole repository or even globally:

git config --add merge.ff false # add --global if you want to set it globally

Also, if you have a lot of Maven modules and want to ignore things like .classpath, .projects, target etc, this will result in SubGit trying to burn down your CPU to create a lovely .gitignore[2], for us with ~5500 lines. The solution is quite easy. Edit your $subgit_project_dir/subgit/config and add the following:

[translate]
    ignores = false

This simply tells SubGit to stop translating the Subversion ignores into Git ignores. Now you have to manage the ignores yourself but at least for us it’s worth it ;)

Last but not least: Use the beta of version 3. It’s much more mature than the name suggests and for us it’s also more stable.

[1] http://lists.tmatesoft.com/pipermail/subgit-users/2013-June/000129.html

[2] http://issues.tmatesoft.com/issue/SGT-828

By the way, to get notified about new posts, just enter your email address on the right :)

subversion, git, subgit & Windows

On client-side we’re currently working with subversion, which is a (serious) pain. On top we have Windows7 machines. To deal with the first problem, I used git-svn for quite some time and in combination with Sourcetree it worked quite well. When I came back from my xmas break last week, the subversion structure was changed drastically and git-svn didn’t work anymore. It couldn’t clone the new repository and died after hours of trying with weird error messages. As I wanted to try out subgit (“git mirror for svn”) for quite some time, I didn’t really dive into the git-svn problems but gave subgit a go for evaluation :)

First thing to do is quite obvious: Download and install subgit.
Afterwards you have to configure the repository you want to clone:

subgit configure --svn-url $YOUR_SVN_URL $DESTINATION

I also made some tiny changes to the $DESTINATION/subgit/config file. I enabled httpSpooling (httpSpooling = true) to avoid timeouts and added the following lines at the end of the file:

[translate]
    eols=false

(More about line endings? -> Mind the end of your line)

Next, set your credentials within $DESTINATION/subgit/passwd. Careful: The (unlimited) evaluation version of subgit stores the passwords in plaintext.
Finally, tell subgit to “initialize” the project and start the demon – this might take some time, e.g. for me it took 9h:

subgit install $DESTINATION

Now you’re ready to use whatever git client you like to clone the repository from $DESTINATION and treat it like every other git repos you’re working with. Subgit is dealing with all the annoying svn stuff.
What I still need to test is good the branching and merging “translation” works.

If subgit is running on your dev system, you have to restart the demon by executing the install command again.

A small hint: If you want to use git 2.x on your Windows machine, you won’t find an official download for it yet. The current latest Windows version is 1.9.5. But you can install cygwin with git 2.x and simply add the $CYGWIN_DIR/bin to the Windows $PATH, as Cygwin provides you with a git.exe :P

Upgrade to Mountain Lion

Mountain LionA few weeks after Mountain Lion was officially released I finally upgraded yesterday. We wanted to wait for the first update to avoid all the annoying little problems that usually come up. For now mostly everything looks alright, just a few little issues came up so far. I’ll try to keep this post up to date with the things I stumble upon and the solutions that’ll hopefully come up from somewhere ;)

Stuff you got to massage a little:

  • git/svn: Locally I using git and if the repository of the project is subversion, I usually simply use git-svn. After installing Mountain Lion I realized that svn was missing, which is kind of annoying. Why would it deinstall svn? Anyway, the solution I found is to either reinstall it using homebrew or install the latest Command Line Tools (needs an Apple-Developers-Account).

Things not working:

  • GPGTools: As always, the extension for Mail does not work anymore, therefore emails can not be signed nor encrypted.

SourceTree – Mac UI for Git & Mercurial…

I’m using git for a while now and the lack of a nice gui for commiting, merging etc. was a little drawback I didn’t mind. As most of the repositories I’m working with are svn repositories, I usually worked with gitk and a mix of different other tools & tricks. It’s kind of a pain but somehow I usually managed to get everything done in an “okay” way. Today I got an email telling me about SourceTree, recently bought by Atlassian and it looks really nice so far, so you might want to try it out as well ;)

WordPress, Lion Bugs, git und die Bayern

Nachdem mich das nette Admin-Interface schon länger darauf hinweist, dass ich doch mal mein WordPress auf Version 3.2.1 upgraden soll, habe ich das grade mal getan. Ein wenig erinnert mich das neue Interface ja an ältere Typo3 und phpMyAdmin Versionen ;)

Was gibt es sonst Neues?

Die Fußballsaison hat wieder angefangen und nach dem Debakel gegen Gladbach habe ich heute niemanden in einem Bayern Trikot gesehen. Ich glaube es war der erste Tag seitdem ich hier wohne, dass ich wirklich niemanden im Trikot gesehen habe :P

Seit etwa 2 Wochen spiele ich jetzt mit git rum, auch wenn wir eigentlich svn nutzen – git-svn ist ein guter Freund – und muss sagen, dass ich es echt schick finde, auch wenn ich hier und da schon mal vor die Wand gelaufen bin. Ein wenig googlen oder geduldiger Kollege hat mir dann allerdings immer wieder auf die Beine geholfen.

Lion ist immer noch schick, auch wenn ich mittlerweile auch selbst den ein oder anderen Haken mehr gefunden habe. Warum zum Beispiel kann man bei seiner Maus keine andere Scrollrichtung als bei dem Touchpad einstellen? Verbirgt sich da eine Logik, Steve?
FileVault2 ist schick und funktioniert bisher ohne Datenverlust – hoffentlich keine Ausnahme ;)