Suggestion for recursive ignore

2 views
Skip to first unread message

Ennio Zarlenga

unread,
Jul 23, 2009, 11:44:01 AM7/23/09
to us...@subversion.tigris.org
Hello all,

I know that svn:ignore allows to specify which files to ignore in a given folder, and I know that with svn propset -R, I can propagate this to subfolders. However, if I create a new subfolder and add it to version control, I have to repeat propset for this folder to ignore the same patterns.

I know that I can use global ignore in the cofiguration area, but then the configuration becomes user-specific.

So, I'm thinking about a new property called svn:ignore-recursive or something like that, which would work like the bugtraq: properties in TortoiseSVN: if the property is not found in the committed folder, the client would search upwards through the folder tree to find it until it comes to the tree root.

That way, setting svn:ignore-recursive on a given folder would allow to ignore the specified patterns in any subfolders, including the ones created afterwards.

In fact, I see another way to reach this behavior without regularly running svn propset -R on the root folder : a post-commit hook would easily add the svn:ignore property to the new folders.

However, I think that this feature may be useful to others too.

Thanks,
Ennio

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2374870

To unsubscribe from this discussion, e-mail: [users-un...@subversion.tigris.org].

Bob Archer

unread,
Jul 23, 2009, 1:08:13 PM7/23/09
to Ennio Zarlenga, us...@subversion.tigris.org
> I know that svn:ignore allows to specify which files to ignore in a
> given folder, and I know that with svn propset -R, I can propagate this
> to subfolders. However, if I create a new subfolder and add it to
> version control, I have to repeat propset for this folder to ignore the
> same patterns.
>
> I know that I can use global ignore in the cofiguration area, but then
> the configuration becomes user-specific.
>
> So, I'm thinking about a new property called svn:ignore-recursive or
> something like that, which would work like the bugtraq: properties in
> TortoiseSVN: if the property is not found in the committed folder, the
> client would search upwards through the folder tree to find it until it
> comes to the tree root.
>
> That way, setting svn:ignore-recursive on a given folder would allow to
> ignore the specified patterns in any subfolders, including the ones
> created afterwards.
>
> In fact, I see another way to reach this behavior without regularly
> running svn propset -R on the root folder : a post-commit hook would
> easily add the svn:ignore property to the new folders.
>

Rather than a new property I would rather see the ignore syntax extended to be somewhat nant fileset like. So, if I wanted the ignore to be recursive I would just add **/ to it... for example, ignore all .suo files I could use **/*.suo

BOb

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2374908

Ennio Zarlenga

unread,
Jul 24, 2009, 5:48:41 AM7/24/09
to us...@subversion.tigris.org
> Rather than a new property I would rather see the ignore syntax extended to be somewhat nant fileset like. So, if I wanted the ignore to be recursive I would just add **/ to it... for example, ignore all .suo files I could use **/*.suo

This is interesting :)
However, I think it'smore complex to implement, since in this case, the client has (always) to go upwards to the root and collect all the svn:ignore properties.

Ennio

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2375144

Bob Archer

unread,
Jul 24, 2009, 10:13:30 AM7/24/09
to Ennio Zarlenga, us...@subversion.tigris.org
> > Rather than a new property I would rather see the ignore syntax
> extended to be somewhat nant fileset like. So, if I wanted the ignore
> to be recursive I would just add **/ to it... for example, ignore all
> .suo files I could use **/*.suo
>
> This is interesting :)
> However, I think it'smore complex to implement, since in this case, the
> client has (always) to go upwards to the root and collect all the
> svn:ignore properties.
>
> Ennio

Correct me if I am wrong, but if you implement recursive ignores svn will have to walk to directory tree whether the svn:ignore syntax is extended or a new property svn:ignore-recursive is created.

BOb

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2375205

Ennio Zarlenga

unread,
Jul 27, 2009, 8:43:46 AM7/27/09
to us...@subversion.tigris.org
Of course, you're right. The tree has first to be browsed upwards to find the properties, and then downwards to ignore the corresponding files.

To my mind, svn:ignore-recursive was something very basic: svn go upwards the directory tree to find the svn:ignore-recursive property and stops as soon it finds it. All it has to ignore is specified in this property.

By extending the svn:ignore syntax as you suggested, svn would handle ignore-patterns specified at any levels (at least, this is how I understand it). It's more powerful and may be more intuitive, but it's more difficult to implement.

Ennio

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2375838

Reply all
Reply to author
Forward
0 new messages