tisdag 26 oktober 2010

Checkout folder without children with Subversion

Sometimes you need to checkout a child directory without checking out other children. For doing this you need to checkout the parent folder with the -N argument, which means that the folder will be checked out without any content. After that you can just make a update for the specific child folder.

1. svn co -N "parentFolder"
2. cd "parentFolder"
3. svn update "childFolder"

One other option is to directly checkout the actual folder without parent, but that would be too easy. ;)

1. svn co "projectParent/parentFolde/childFolder/"

tisdag 17 augusti 2010

Readable Freemarker code with <#compress>

In Freemarker the use of compress-tag can make the code more readable since you are allowed to use extra rows for grouping code blocks without having the rows presented on the layout.

From Freemarker manual as follows:

<#assign x = "    moo  \n\n   ">
1 2 3 4 5
test only

I said, test only


will output

(1 2 3 4 5
test only
I said, test only)