On 06.11.2017 10:59, Chris wrote:
> Hi,
>
> what's the best way to filter out a certain type of file from svn diff output 
> without having to use external tools such as filterdiff?
>
> The project I'm working with insists on storing a lot of data files in ascii 
> format in the repo, but users don't want to see diffs for these files.
> I was thinking of changing the svn:mime-type on these to e.g. octet-stream, 
> but will that affect how the database on the server handles these as well? 
> That is, it would be nice if the server could still treat these files as text 
> files and compress changes, but that the diffs are not shown to users.

The repository doesn't care if files are text or not; compression
(actually, binary delta storage) happens regardless. Specifically, the
server does not interpret the value of the svn:mime-type property in any
way.

> Another option would be if there's some way to add exclude-patterns to svn 
> diff, e.g. something like "svn diff --exclude-filepatterns '*.ascii'". Is 
> anything similar to that available?
> Or a similar exclude-functionality that could look for specific svn 
> properties "--exclude-files-with-properties myasciifileproperty" so I can 
> force a property "myasciifileproperty" on all these files

Nothing like that is available.

If you do set the MIME type to something that's not "text/*", 'svn diff'
will still show the diff headers for changed files but won't show the
diff contents.

There is another way you could solve this: by using the --diff-cmd
option and writing a tool that ignores cretain files. Diff headers will
still be printed, though.

-- Brane

Reply via email to