Mrz 25

Sometimes you have to revert changes in svn from lets say a commit you made some days ago. Since then more commits where done and this can be a hard job to undo your changes. So how to undo the changes e.g. from your change in revision 120 when the actual revision is 140?

Go to your trunk workdir and use the following:

mvn merge -r 120:119 http://my.svn.repo/trunk/

The changes you made will be reverted. If there are some conflicts they will be shown.
Maybe it is a good idea to make a dry run via:

mvn merge --dry-run -r 120:119 http://my.svn.repo/trunk/

So no changes are really made but only shows them.

Of course you can use this for reverting merges.

Tagged with:
Dez 03

To delete the .svn folders recursivly in a checked out svn repositiory create a file e.g. called deletesvn.reg and use the following script:

Windows Registry Editor Version 5.00
@="Delete SVN Folders"
@="cmd.exe /c \"TITLE Removing SVN Folders in %1 && COLOR 9A && FOR /r \"%1\" %%f IN (.svn) DO RD /s /q \"%%f\" \""
Tagged with:
Nov 10

Damit man eine E-Mail mit den entsprechenden Diffs der Quellcodeänderung bekommt muss man lediglich folgende Zeilen in die Subversion-Datei hooks/post-commit im entsprechenden Projekt hinzufügen:

/usr/local/bin/svnnotify                    \
–repos-path    “$REPOS”                \
–revision      “$REV”                  \
–subject-cx                            \
–with-diff                             \
–handler       HTML::ColorDiff         \
–to     \

Um jetzt einen sogenannten post-commit-hook zu trac zu erzeugen, trägt man in der selbigen Datei noch folgendes ein:

/usr/bin/python /usr/local/bin/trac-post-commit-hook -p “$TRAC_ENV” -r “$REV”

Das ermöglicht Kommandos im Subversion Kommentar wie z.B. “fix #3″ um Ticket Nummer 3 zu schließen.

Tagged with: