subversion-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nick <nos...@codesniffer.com>
Subject (More) Easily view patches
Date Fri, 12 Sep 2014 22:20:22 GMT
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



Mime
View raw message