A handy little snippet… This is something I’ve used a few times when I’m hacking in a working copy and need to change POMs for some local reason (usually versioning) but can’t check them back in modified. I’d like to tweak the POMs, work on other stuff, build/test, check everything but the POMs in, rinse and repeat. Here’s a workaround:

$ svn st | grep '^M' | grep [ \/]pom.xml' | sed 's/^.......//' | \
  xargs -I{} svn diff {} > pom.patch
$ svn st | grep '^M' | grep [ \/]pom.xml' | sed 's/^.......//' | \
  xargs -I{} svn revert {}
$ svn ci -m 'whatever'
$ patch -p0 < pom.patch

Happy hacking. -NB



blog comments powered by Disqus

Published

06 August 2009

Tags