Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I change the svn diff patch number of context lines?

Tags:

svn

What I'm exactly looking for is: using svn diff, how to print more lines above and below the new code which is being added?

By default it will print some lines which are unchanged (both below/above the new code which is changed).

Is there any way to do it?

like image 606
Amit Rathi Avatar asked Jul 08 '15 11:07

Amit Rathi


Video Answer


2 Answers

If you are on linux, tell your diff tool how many lines to include into result, for example 10:

svn diff --diff-cmd=diff -x -U10
like image 103
Ivan Jovović Avatar answered Oct 01 '22 17:10

Ivan Jovović


You can do this within svn diff itself, which works on Windows too. Say you want 20 lines of context, you can do this:

svn diff -x -U20

Taken from svn diff how to only show changed line

like image 34
Derf Skren Avatar answered Oct 01 '22 17:10

Derf Skren