[Dev] More context to svn diff

Heikki Toivonen heikki at osafoundation.org
Thu Nov 3 13:47:45 PST 2005


CVS diff (and the command line regular diff) have an option to specify
how much context you want around your diff. Subversion diff doesn't - in
fact it takes hardly any parameters. But there is a way - you can
specify an external diff that svn diff should use instead of the
builtin. Like so:

svn diff --diff-cmd diff --extensions '-u8' <files you want to diff>

--diff-cmd tells svn to use an external diff command, here simply
"diff", and --extensions passed "-u8" to that command in my example
above, which shows 8 lines of context around the changes (Mac version of
diff takes different args, I think you'd want "-U 8").

-- 
  Heikki Toivonen

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 253 bytes
Desc: OpenPGP digital signature
Url : http://lists.osafoundation.org/pipermail/dev/attachments/20051103/af41c4ae/signature.pgp


More information about the Dev mailing list