Autor(en): Daniel


TortoiseSVN/VCS GUI integration in jEdit

I've created the following macros to easily launch various SVN commands in TortoiseSVN at work.

To use them yourself, just create the displayed files (VCS/*.bsh) in your personal "macros" directory (~/.jedit/macros).


for i in ~/.jedit/macros/VCS/*; do echo "$i:"; cat $i; done
exec = "c:\\Programme\\TortoiseSVN\\bin\\TortoiseProc.exe /command:blame /path:\""+buffer.getPath()+"\" /line:"+(textArea.getCaretLine()+1);
Runtime.getRuntime().exec( exec );
exec = "c:\\Programme\\TortoiseSVN\\bin\\TortoiseProc.exe /command:commit /path:\""+buffer.getPath()+"\" /logmsg:\""+buffer.getName()+": \"";
Runtime.getRuntime().exec( exec );
exec = "c:\\Programme\\TortoiseSVN\\bin\\TortoiseProc.exe /command:diff /path:\""+buffer.getPath()+"\"";
Runtime.getRuntime().exec( exec );
exec = "c:\\Programme\\TortoiseSVN\\bin\\TortoiseProc.exe /command:log /path:\""+buffer.getPath()+"\"";
Runtime.getRuntime().exec( exec );

You can now execute those macros either by calling them from the "Macros" menu, assign a shortcut to them or (my preferred way) via Ctrl-Enter, typing parts of them and then TAB-completing it (e.g. Ctrl-Enter, "log_", TAB, Enter).

They do not have "svn" in the name, since they might get extended to use the appropriate VCS GUI command in the future, for example by testing if there's a .svn control directory or using commands like "bzr st" or "git status" to check if it's a Bazaar/Git/... file.

(For debugging, you can use Macros.message( view, exec ); to display the "exec" value in a message)

By Daniel in development, Snippets2010-01-27 English (EU) Email


"Wild vor Wut / Weil wir viele sind" und nicht teilen wollen

Xavier Naidoo singt so etwas wie "Wir werden euch besiegen, weil es viel mehr von uns gibt" in "Wild vor Wut", aber wenn man dann nach Lyrics sucht, findet man Nachrichten wie:

Die Songtexte von "Xavier Naidoo" dürfen leider aufgrund von Einspruch der Rechteinhaber oder aus sonstigen rechtlichen Gründen (Jugendschutz/Verfassungsschutz) nicht auf verlinkt werden.

So erreicht man nicht wirklich die Masse und die (insgesamt grossen) Kleinen.


ftplicity/duply/duplicity: Get list of files in backup sorted by size

To get a list of files in your current backup, sorted by (current) file size, you can use the following snippet, which will create a file backup-size.list with the result.


for i in $(duply $BACKUPNAME list | tail -n +10 | head -n -1 | cut -b26-); do
  test -f $FILE && du $FILE;
done | sort -n -r > backup-size.list

I've used this to find the biggest files in the current backup which are not required to get backed up and excluded them via the exclude list feature of ftplicity/duply/duplicity (ftplicity or duply are frontends for duplicity).


Convert etckeeper repository from Bazaar to Git

Quite a while ago I've installed etckeeper and changed the configuration to use Bazaar as its backend for myself (and sponsored/helped with a patch to change the default in Ubuntu).

However, already the first comment asked me why I would be using you Bazaar, if Git was that much faster (and required less space).

At that time I've thought, that Bazaar would catch up, and they (luckily) have done so in some areas, but Git is still a lot faster.

Therefore I've decided to change the repository from bzr to git. I've done so on my home machine and will do so on my dedicated server boxes in the next days, so it's a not only a recommendation but also documentation.

Howto convert a bzr repository to git (etckeeper)

Open a root shell, then you should export $GIT_DIR first:

export GIT_DIR=/etc/.git

The following will then convert /etc from a bzr to a git repository ("fast-export" is included in bzr-fastimport - you may have to install this first):

bzr fast-export --export-marks=$GIT_DIR/bzr.mark /etc | git fast-import --export-marks=$GIT_DIR/git.mark

After this (which will take a while depending on your history) you want to adjust the VCS setting in etckeeper.conf  (uncomment VCS=git and comment VCS=bzr):

sed -i -r -e s/'#\s*(VCS="git)"'/'\1'/ -e s/'VCS="bzr"'/'# \0'/ /etc/etckeeper/etckeeper.conf

I don't remember correctly, but the Git repository was not really setup correctly in the end - but the following fixed it:

etckeeper init


I've done some benchmarking, comparing "$DVCS status" against each other. This will look if there are any files modified in the current tree, and it's what etckeeper does before and after upgrading (IIRC).
The following shows the commands with cold and warm caches (I've cleared the disk caches when changing to a new set).

What you can see is not only that "git status" is twice as fast with a cold cache (and even more with a warm one), but also that bzr takes even more time to print a single line of "It sure does!".

$ sudo time git st
0.01user 0.04system 0:05.61elapsed 1%CPU (0avgtext+0avgdata 0maxresident)k
29232inputs+688outputs (113major+1605minor)pagefaults 0swaps
$ sudo time git st
0.02user 0.02system 0:00.06elapsed 59%CPU (0avgtext+0avgdata 0maxresident)k
16inputs+688outputs (0major+1716minor)pagefaults 0swaps

$ sudo time bzr st
0.14user 0.06system 0:11.74elapsed 1%CPU (0avgtext+0avgdata 0maxresident)k
17840inputs+8outputs (36major+3750minor)pagefaults 0swaps
$ sudo time bzr st
0.16user 0.03system 0:00.32elapsed 62%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (0major+3787minor)pagefaults 0swaps

$ sudo time bzr rocks
It sure does!
0.20user 0.05system 0:08.19elapsed 3%CPU (0avgtext+0avgdata 0maxresident)k
17392inputs+8outputs (34major+3422minor)pagefaults 0swaps
$ sudo time bzr rocks
It sure does!
0.16user 0.01system 0:00.20elapsed 92%CPU (0avgtext+0avgdata 0maxresident)k
0inputs+0outputs (0major+3458minor)pagefaults 0swaps

I'll update this post when scripting for the update of my various OpenVZ containers, but the basic information should stand.

From now on, I will save 5+ seconds on any "aptitude safe-upgrade". Hopefully this multiplies somehow, so the time investment into this post pays back.. ;)


Jonglage Nummer 1


Aufgrund vielmehrfacher Nachfrage gibt es endlich mein erstes Jonglagevideo.

Ich bitte zu beachten, dass das Video schon ein paar Monate alt ist und die vielen Patzer zum Ende nur dabei sind, weil es dann gut zur Länge der Musik passt.. :)

Von Daniel in enjoy Video15.12.09 German (DE) E-Mail
Schlagworte: , ,


Kubuntu Karmic Koala freigegeben


Ubuntu 9.10 AKA "Karmic Koala" wurde heute freigegeben.
Mal wieder ein Release, an dem ich nicht soo sehr aktiv mitgewirkt habe, aber immerhin eines, dessen Bugs mich am Ende sehr geplagt haben.

Eine Übersicht der neuen Features gibt es auf

Auch Planet Ubuntu ist voller Screenshots und Release-Posts, u.a. deswegen von mir jetzt auch nicht viel mehr.. ;)

Zum Download geht es hier - und wer lieber Kubuntu (basierend auf KDE 4.3) möchte, geht hier entlang.

Das Bild ist von Quartl / Wikipedia.

Von Daniel in Ubuntu29.10.09 German (DE) E-Mail
Schlagworte: , , ,