Tweak working copy POMs without checking them in

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

0 comments ↓

There are no comments yet...Kick things off by filling out the form below.

Leave a Comment