preload
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:

1
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:

1
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:

?View Code REGISTRY
1
2
3
4
5
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\DeleteSVN]
@="Delete SVN Folders"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\DeleteSVN\command]
@="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            my@mail.com   \
–from          myfrom@mail.com

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: