TortoiseSvn hangs too long on recursive symbolic links inside working copy

26 views
Skip to first unread message

andr...@gmail.com

unread,
Apr 15, 2019, 10:28:40 AM4/15/19
to TortoiseSVN
I have a project structure like this:

```
<root>
|
+- `ProjectA`
|
+- `_3dparty`
| |
| +- `utility/ProjectB`
| |
| +- `_3dparty`
| |
| ...
|
...
```

Where `ProjectA/_3dparty/utility/ProjectB/_3dparty` is added to the ignore list as an empty directory.

At some point i wanted to build `ProjectB` inplace as a standalone build. To do so i need an infrastructure of the `ProjectB/_3dparty` directory.

To shortcut the thing (avoid unnecessary copying) i just removed empty directory `ProjectB/_3dparty` and replaced it by a symbolic link to the `ProjectA/_3dparty` because it has the same infrastructure as the `ProjectB/_3dparty`.

This works as expected because `ProjectB/_3dparty` is under ignore list.

But from some point if i rename `ProjectB/_3dparty` to `ProjectB/_3dparty_old` to make some intermediate tasks and then call to `TortoiseSvn->commit` or `TortoiseSvn->SVN check for modifications...` over the `ProjectA`, then the application hangs on enumeration of the recursed directories:

`ProjectA/_3dparty/utility/ProjectB/_3dparty`
`ProjectA/_3dparty/utility/ProjectB/_3dparty/utility/ProjectB/_3dparty`
`ProjectA/_3dparty/utility/ProjectB/_3dparty/utility/ProjectB/_3dparty/utility/ProjectB/_3dparty`

...and so on...

Can you fix invalid symbolic links recursion?

OS: Windows 7 x64

Stefan

unread,
Apr 15, 2019, 1:06:40 PM4/15/19
to TortoiseSVN


On Monday, April 15, 2019 at 4:28:40 PM UTC+2, (unknown) wrote:

Can you fix invalid symbolic links recursion?


Sorry, but no. Because it's the Windows API that's recursing indefinitely when trying to return a file list.
You have to be careful with such links, because even Windows explorer will hang (show the properties for the parent folder in explorer, and it will churn indefinitely trying to figure out the total diskspace used).

Stefan

andr...@gmail.com

unread,
Apr 16, 2019, 10:57:15 AM4/16/19
to TortoiseSVN
понедельник, 15 апреля 2019 г., 20:06:40 UTC+3 пользователь Stefan написал:
> Sorry, but no. Because it's the Windows API that's recursing indefinitely when trying to return a file list.
Windows API is not a monolithic, it has functions like find_first/find_next, when you decide what to do next before continue a search. And it should not have to detect recursion on it's own. The developer should decide when to stop or continue.
It's like a travel through a tree nodes before a realize when you are actually in a graf (or a tree has a cycles).
Reply all
Reply to author
Forward
0 new messages