English 中文(简体)
how to make svn diff show only non-whitespace line changes between two revisions
原标题:

I can get diffs between two revisions using something like

svn diff -r 100:200 > file.diff

But the problem is that there are many lines that show up due to change in whitespace. Is there a way to only write those lines that actually change in a significant way and not just in whitespace?

最佳回答

You can use

svn diff -r 100:200 -x -b > file.diff

If you want to ignore all whitespaces:

svn diff -x -w | less

Source

问题回答

Use -x --ignore-space-change or -x --ignore-all-space. (See svn -h diff.)

Note that end-of-lines are not considered whitespace in this scenario and that has to be ignored with:

svn diff -x --ignore-eol-style [etc...]

You can use an alternate diff command using the --diff-cmd argument for svn diff. diff is a good utility that has plenty of features for ignoring whitespace.

For example:

svn diff --diff-cmd /usr/bin/diff -x "-w"




相关问题
Best practices for Subversion and Visual Studio projects

I ve recently started working on various C# projects in Visual Studio as part of a plan for a large scale system that will be used to replace our current system that s built from a cobbling-together ...

Changing username in SVN+SSH URI on the fly in working copy

I am using SVN+SSH to check out a working copy of repository from an SVN server on which all developers are members of a developer group and have full read/write permissions on the repository ...

ASP.NET MVC: How should it work with subversion?

So, I have an asp.net mvc app that is being worked on by multiple developers in differing capacities. This is our first time working on a mvc app and my first time working with .NET. Our app does not ...

How to search for file in subversion server?

Is there a way to search for a file in a subversion repository? Something similar to Unix find command, with which I can find the location of a file in a repository. I know there is svn list, but ...

热门标签