2009/11/21 Alfred Perlstein <bright_at_mu.org>:
> We have a script that invokes "svn diff" and then annotates
> the output for us.
> One thing I noticed is that unlike CVS, when invoked on
> a "should be ignored file", basically a file that matches
> *.orig, *.rej and *~, then "svn diff" will emit that file
> like so:
> ? foo.orig
> CVS however will not emit anything.
> Now both SVN and CVS will not emit anything if "diff" is invoked
> on the containing directory.
> My basic issue is that I'm not sure what to do...
> Because of the "? file.orig" output of SVN, my program assumes
> that this are files that need adding.
> 1) any ideas?
> 2) Is there some way to query SVN about the files that should be ignored
> so that I can filter them in my program?
> 3) Is there a way to get "svn diff" to ignore the file (generate ZERO output)
> when this is a file that should be ignored like "cvs diff"?
> thank you,
I think that you can add those name patterns to the global-ignores
property in the Subversion configuration file. That is
The *.orig pattern is not included in the default value of
global-ignores (while *.rej and *~ are there).
Also, it is usually recommended to use language bindings, instead of
trying to parse svn command output.
Please start new threads on the <users_at_subversion.apache.org> mailing list.
To subscribe to the new list, send an empty e-mail to <users-subscribe_at_subversion.apache.org>.
Received on 2009-11-27 06:25:33 CET