[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: question about "svn diff"+"ignore files" (.orig/.rej/~)

From: Alfred Perlstein <bright_at_mu.org>
Date: Mon, 30 Nov 2009 15:14:17 -0800

* Konstantin Kolinko <knst.kolinko_at_gmail.com> [091126 21:24] wrote:
> 2009/11/21 Alfred Perlstein <bright_at_mu.org>:
> > Hello,
> >
> > 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.
> >
> > So:
> > 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
>
> /etc/subversion/config
> and
> ~/.subversion/config
>
> http://svnbook.red-bean.com/nightly/en/svn.advanced.confarea.html
>
> 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.

Thank you very much for clarifying.

I'll have to see which is more trouble, fixing the config and making
sure it's _everywhere_, or fixing the tool that massages the "svn diff"
output.

We are looking to move to more language binded or xml parsing, but it
will be some time before we are fully there.

Thanks again,

-- 
- Alfred Perlstein
.- AMA, VMOA #5191, 03 vmax, 92 gs500, 85 ch250
.- FreeBSD committer
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2425698
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-12-01 00:15:25 CET

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.