Tuesday, June 26, 2012

Using TortoiseMerge for command line Subversion merging

  1. Create a batch file called svn_tortoisemerge.bat with the following content.
    "c:\Program Files\TortoiseSVN\bin\TortoiseMerge.exe" /base:"%1" /theirs:"%2" /mine:"%3" /merged:"%4"
  2. Set the SVN_MERGE environment variable to point to the file.
    set SVN_MERGE=c:\...\svn_tortoisemerge.bat
  3. When merging conflicts use l to launch the editor and r to mark a conflict as resolved.
    Conflict discovered in 'C:/.../somefile'.
    Select: (p) postpone, (df) diff-full, (e) edit,
            (mc) mine-conflict, (tc) theirs-conflict,
            (s) show all options:

Via Stack Overflow.

Saturday, June 16, 2012

Cleaning up Word's HTML

I still need to find an HTML editor that produces clean HTML in the style I like. In the meantime I write blog posts directly in HTML or, for longer posts, I compose in another program and then convert to HTML.

Word produces horrible HTML but here's a trick to tidy it up. Turns out CKEditor has a Paste from Word button especially for this purpose! Just go to the demo page and paste your work, then extract the HTML by clicking Source. The HTML still needs a little cleaning to reach my exacting standards but it's pretty close!

Via Stack Overflow.

Monday, June 4, 2012

Selecting Maven modules to build

On a multimodule Maven project you can speed up builds by only building the modules that have changed. Use the --projects option to list the modules you want to build.

mvn --projects aaa,bbb,ccc install

And if you're in a real hurry you can tack on -Dmaven.test.skip to avoid running any tests.

mvn --projects aaa,bbb,ccc install -Dmaven.test.skip