[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

(More) Easily view patches

From: Nick <nospam_at_codesniffer.com>
Date: Fri, 12 Sep 2014 18:20:22 -0400

Well I got around to creating the script mentioned in the course of this
thread:
http://mail-archives.apache.org/mod_mbox/subversion-users/201304.mbox/%
3C1366208597.20370.18.camel%40nimble.325Bayport%3E

As originally intended, this script helps to view a patch file w/out
touching an existing working copy or requiring a new/scratch working
copy. It works by parsing the patch file for the list of files & base
revs, getting a copy of each into a temporary tree (sort of like a
sparse checkout, minus the actual checkout), applying the patch to a
clone of the base tree, and launching a diff program to view the two.

The diff program used defaults to using the same program set for the
diff-cmd value in ~/.subversion/config if defined, and can be overridden
via an env variable.

The only caveat that I can think of is that the patch file must be
generated via {svn diff --git}. I won't say that it's impossible to
make this work w/ the output of {svn diff}, but the git format made some
things a lot easier.

I believe there are some scenarios which are not yet supported.
Possibly things like property mods w/out file content changes.

Until I setup a better home for it, the script is currently available at
http://www.codesniffer.com:8080/ViewSvnPatch.sh

Usage info is available by running it w/out params. Basically, from a
WC directory:
   ViewSvnPatch.sh <patch file>

I hope it helps someone.

Best regards,
Nick
Received on 2014-09-13 00:20:54 CEST

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.