You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Andreas Benzler <in...@gmx.de> on 2008/02/20 08:37:12 UTC

How to set svn:ignore automatically in all subdirs?

Hi list

I am having a litle problem with a new repository. I did an import of the stuff that should reside in the repo. After compiling I get of course a lot of binarys and files I did not have before. I want to mark them with svn:ignore in the subdir they reside in. It is a bit of a hassle to go into each directory and do a svn st to see which files are unknown to subversion and do a svn propset svn:ingnore to them that I get a clean svn st in the end. 
Is there an elegant way for doing this?  Like a little script that parses all subdirs and adds the properties to these dirs? Before I am writing my own skript (linux) I would like to know if some one out there already did and could share the knowledge or if I missed something that comes already with subversion.

Regards

Andreas Benzler


-- 
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! 
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

RE: RE: How to set svn:ignore automatically in all subdirs?

Posted by ni...@planet.nl.
For generated source code we do the same as for compiled code. It goes into a folder in /target (i.e. Hibernate generated code goes into /target/generated-sources/hibernate) and this is added as source directory for the java compiler. I don't know if this is also possible with corba/c++.

Hth,

Nick Stolwijk


-----Original Message-----
From: Andreas Benzler [mailto:info.benzler@gmx.de]
Sent: Wed 2/20/2008 10:08
To: users@subversion.tigris.org
Subject:  RE:  How to set svn:ignore automatically in all subdirs?
 
For the executables this is a good point and I will check this. Because it would have a lot of other benefits.  But we use corba in our projects and we have to compile a lot of idl files which in return create c++ headers and other stuff. These should stay in the source tree. It would be very inconvenient to change all includes of these file to a different location.
So anyone out there already made a script for that purpose?

Andreas Benzler

> I would try to set the output directory of your compiler to another
> directory and exclude that whole tree in one. 

-- 
Psssst! Schon vom neuen GMX MultiMessenger gehört?
Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org



Re: How to set svn:ignore automatically in all subdirs?

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Feb 20, 2008, at 03:08, Andreas Benzler wrote:

> For the executables this is a good point and I will check this.  
> Because it would have a lot of other benefits.  But we use corba in  
> our projects and we have to compile a lot of idl files which in  
> return create c++ headers and other stuff. These should stay in the  
> source tree. It would be very inconvenient to change all includes  
> of these file to a different location.
> So anyone out there already made a script for that purpose?

Only you know what files you want to ignore, so you should look at  
the list of files produced by "svn st", specifically those lines  
beginning with "?", and decide if and how you want to ignore them. Do  
you want to ignore specific named files? Files with a certain  
extension? Files with a certain prefix? All files? Only you know  
this; a script can't decide it for you.

But, this might be a start:

svn st | sed -n -E 's%^\?.{6}([^/]+)$%\1%p' | sed -E 's%^.*(\..*)$%* 
\1%' | sort | uniq

Run this, put its output in an editor, tweak it to your liking, then  
set it as the directory's svn:ignore property.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Header organization (was: How to set svn:ignore automatically in all subdirs?)

Posted by Kenneth Porter <sh...@sewingwitch.com>.
On Wednesday, February 20, 2008 10:08 AM +0100 Andreas Benzler 
<in...@gmx.de> wrote:

> But we use corba in our projects and we have to compile a lot of idl
> files which in return create c++ headers and other stuff. These should
> stay in the source tree. It would be very inconvenient to change all
> includes of these file to a different location.

I've started designing all my header paths to locate headers under 
project/include/project. I then set the include path for clients to 
project/include, and use "<project/header.h>" to refer to a given header. 
That creates a separate header namespace so that I don't have to worry 
about name collisions between different projects.

Can you do something similar with your CORBA-generated headers? Placing 
them in a separate path, referenced by a directory include directive, also 
lets you quickly clean them out without touching your regular sources.



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

RE: How to set svn:ignore automatically in all subdirs?

Posted by Andreas Benzler <in...@gmx.de>.
For the executables this is a good point and I will check this. Because it would have a lot of other benefits.  But we use corba in our projects and we have to compile a lot of idl files which in return create c++ headers and other stuff. These should stay in the source tree. It would be very inconvenient to change all includes of these file to a different location.
So anyone out there already made a script for that purpose?

Andreas Benzler

> I would try to set the output directory of your compiler to another
> directory and exclude that whole tree in one. 

-- 
Psssst! Schon vom neuen GMX MultiMessenger gehört?
Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

RE: How to set svn:ignore automatically in all subdirs?

Posted by ni...@planet.nl.
I would try to set the output directory of your compiler to another directory and exclude that whole tree in one. Like Maven does with Java projects:

project
  `- src
      `- java
  `- target
      `- classes

In this way you can exclude the whole target directory from your Subversion repository without ever having to set multiple svn:ignore properties.

Hth,

Nick Stolwijk


-----Original Message-----
From: Andreas Benzler [mailto:info.benzler@gmx.de]
Sent: Wed 2/20/2008 09:37
To: users@subversion.tigris.org
Subject:  How to set svn:ignore automatically in all subdirs?
 
Hi list

I am having a litle problem with a new repository. I did an import of the stuff that should reside in the repo. After compiling I get of course a lot of binarys and files I did not have before. I want to mark them with svn:ignore in the subdir they reside in. It is a bit of a hassle to go into each directory and do a svn st to see which files are unknown to subversion and do a svn propset svn:ingnore to them that I get a clean svn st in the end. 
Is there an elegant way for doing this?  Like a little script that parses all subdirs and adds the properties to these dirs? Before I am writing my own skript (linux) I would like to know if some one out there already did and could share the knowledge or if I missed something that comes already with subversion.

Regards

Andreas Benzler


-- 
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! 
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org