The svn:global-ignores property is not correctly applied to non-versioned directories

99 views
Skip to first unread message

Zander M

unread,
Nov 14, 2018, 1:01:36 PM11/14/18
to TortoiseSVN
Reproduced with TortoiseSVN 1.11.0, Build 28416 - 64 Bit , 2018/10/30 19:14:39 on Windows 10

The svn:global-ignores property of directories beneath the relative commit path is not inherited by the non-versioned sub-directories they contain.

Expected behavior is for the global-ignores property to be inherited by non-versioned directories regardless of relative commit path.


Example:
Given a new project with the following folder structure:
trunk
└───Code
└───SubDirectory
newfile.txt
shouldbeignored.txt2


`Code` is a versioned directory with the svn:global-ignores property of "*.txt2"
`SubDirectory` is a non-versioned directory
Committing/Adding from the `trunk` directory will result in the global-ignores property of `Code` to not be inherited by `SubDirectory`.
Committing/Adding from the `Code` directory will apply the property.

I've attached a screenshot of two Tortoise commit views of the project described above. The leftmost one was opened via the context menu of the "trunk" directory, the rightmost was opened via the context menu of the "Code" directory (as shown by the "Commit to:" text of each window)

https://imgur.com/a/UTZR9ph

Stefan

unread,
Nov 14, 2018, 4:23:06 PM11/14/18
to TortoiseSVN
That's by design.
You have to ignore the non-versioned folder.

Zander Milroy

unread,
Nov 15, 2018, 1:34:26 AM11/15/18
to TortoiseSVN on behalf of Stefan
I'm not intending to ignore a folder in this case. I'm only wanting the file matching the *.txt2 pattern to not show up in the add/commit views.

I am expecting non-versioned folders to inherit the global-ignores property from _all_ their parent folders. Right now, non-versioned folders (and the contained files) seem to only inherit the svn:global-ignores property of a single parent folder. (the folder Tortoise svn was invoked on)

The folder I right-click on when launching Tortoise should not change the way svn:ignore properties are inherited by non-versioned files inside of non-versioned folders.


On Wed, Nov 14, 2018, 4:23 PM Stefan via TortoiseSVN <torto...@googlegroups.com> wrote:
That's by design.
You have to ignore the non-versioned folder.

--
You received this message because you are subscribed to a topic in the Google Groups "TortoiseSVN" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tortoisesvn/EwtsFEk84BA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tortoisesvn...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tortoisesvn/563a1c82-98ff-4c43-b9eb-747fa909ac8f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Stefan

unread,
Nov 17, 2018, 3:00:02 AM11/17/18
to TortoiseSVN


On Thursday, November 15, 2018 at 7:34:26 AM UTC+1, Zander Milroy wrote:
I'm not intending to ignore a folder in this case. I'm only wanting the file matching the *.txt2 pattern to not show up in the add/commit views.

I am expecting non-versioned folders to inherit the global-ignores property from _all_ their parent folders. Right now, non-versioned folders (and the contained files) seem to only inherit the svn:global-ignores property of a single parent folder. (the folder Tortoise svn was invoked on)


Yes, it's inherited from parent folders. But as you said, the property is set on the "Code" folder. And when you commit from the "trunk" folder, then it's not inherited because "Code" is a child of "trunk".

Zander Milroy

unread,
Nov 18, 2018, 11:50:37 PM11/18/18
to TortoiseSVN on behalf of Stefan
In my example, the files being committed are within the "Code" directory. 
"trunk\Code\SubDirectory\shouldbeignored.txt2"

The svn 'status' command does not exhibit the behavior I'm trying to describe. The global-ignores property of a parent folder is inherited by child folders and files regardless of where in the hierarchy the status command is called from.

Calling 'svn ststus' from either parent directory ("trunk" or "Code") does not list the files within the "Code" directory that match the *.txt2 rule.

If there's a way I could show/send a minimal test case I'd be happy too!

--
You received this message because you are subscribed to a topic in the Google Groups "TortoiseSVN" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tortoisesvn/EwtsFEk84BA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tortoisesvn...@googlegroups.com.

Stefan

unread,
Nov 19, 2018, 1:21:32 PM11/19/18
to TortoiseSVN


On Monday, November 19, 2018 at 5:50:37 AM UTC+1, Zander Milroy wrote:
In my example, the files being committed are within the "Code" directory. 
"trunk\Code\SubDirectory\shouldbeignored.txt2"

The svn 'status' command does not exhibit the behavior I'm trying to describe. The global-ignores property of a parent folder is inherited by child folders and files regardless of where in the hierarchy the status command is called from.


You've set the property on trunk/Code.
When you commit from trunk/Code or any folder below that it works.
But if you commit from trunk, it doesn't. That's because trunk is a parent of trunk/Code and properties are inherited by children, not parents.

 
Calling 'svn ststus' from either parent directory ("trunk" or "Code") does not list the files within the "Code" directory that match the *.txt2 rule.


That's because 'svn status' does not show files in unversioned folders but only the unversioned folders by default.

Zander Milroy

unread,
Nov 19, 2018, 7:44:15 PM11/19/18
to TortoiseSVN on behalf of Stefan
In the example, the non-versioned folder "SubFolder" is _always_ a child of "Code". It is not being moved. "SubFolder"s parents are not changing but the properties being inherited are.

If you are saying that it's expected for the ignore property of "Code" to not be applied to the file "trunk/Code/NonVersionedSubDirectory/shouldbeignored.txt2" when committing from "trunk", then that is inconsistent with how versioned directories are behaving.

Consider these four cases:
1. When committing relative to "trunk", the file "trunk/Code/NonVersionedSubDirectory/shouldbeignored.txt2" will be shown in the Tortoise commit/add views.
2. When committing relative to "trunk", the file "trunk/Code/VersionedSubDirectory/shouldbeignored.txt2" will NOT be shown in the Tortoise commit/add views.  
3. When committing relative to "Code", the file "trunk/Code/NonVersionedSubDirectory/shouldbeignored.txt2" will NOT be shown in the Tortoise commit/add views.  
4. When committing relative to "Code", the file "trunk/Code/VersionedSubDirectory/shouldbeignored.txt2" will NOT be shown in the Tortoise commit/add views.

The only difference between cases 1 and 2 is if the subdirectory (child of "Code") is versioned or not. I would expected the results to be the same for cases 1 and 2.

I understand what you're saying about the status command not showing contents of non-versioned folders. The recursive `svn add` command is a better example. 

From the "trunk" directory, calling `svn add Code/NonVersionedSubDirectory/` will NOT add the file located at "trunk/Code/NonVersionedSubDirectory/shouldbeignored.txt2".
From the "Code" directory, calling `svn add NonVersionedSubDirectory` will NOT add the file located at "trunk/Code/NonVersionedSubDirectory/shouldbeignored.txt2".

Regardless of the current directory, calling `svn add path/to/NonVersionedDirectory` will always result in the ignore property from the "Code" directory being inherited by the child ("NonVersionedSubDirectory") and it's contents.

--
You received this message because you are subscribed to a topic in the Google Groups "TortoiseSVN" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/tortoisesvn/EwtsFEk84BA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to tortoisesvn...@googlegroups.com.

Stefan

unread,
Nov 20, 2018, 2:19:12 PM11/20/18
to TortoiseSVN


On Tuesday, November 20, 2018 at 1:44:15 AM UTC+1, Zander Milroy wrote:
In the example, the non-versioned folder "SubFolder" is _always_ a child of "Code". It is not being moved. "SubFolder"s parents are not changing but the properties being inherited are.

If you are saying that it's expected for the ignore property of "Code" to not be applied to the file "trunk/Code/NonVersionedSubDirectory/shouldbeignored.txt2" when committing from "trunk", then that is inconsistent with how versioned directories are behaving.

When you start the commit dialog from trunk, the properties are read from trunk. Those properties are then used for the ignore pattern. And you haven't set the ignore pattern on trunk, so your files are not ignored.
To make it work like you want, we'd have to go through the whole working copy and read all the properties of all children before we even show the commit dialog. That's not how we do things - we want to be as fast as possible.

Just set the ignore pattern on trunk as well.


zander...@gmail.com

unread,
Nov 27, 2018, 1:49:28 PM11/27/18
to TortoiseSVN
> To make it work like you want, we'd have to go through the whole working copy and read all the properties of all children before we even show the commit dialog. That's not how we do things - we want to be as fast as possible.

Tortoise is already doing this for versioned folders. It's only wrong for non-versioned ones.

>
>
> Just set the ignore pattern on trunk as well.

We only want to ignore the .xml files created by an asset processing script in an assets directory. We cannot add this rule to the entire project.

hiroaki.n...@gmail.com

unread,
Jan 7, 2019, 11:03:17 AM1/7/19
to TortoiseSVN
I hope resolved this problem, too. Our team is confused by this behavior.

```svn st```(command line) has not this problem. Please fix.
Reply all
Reply to author
Forward
0 new messages