TortoiseSVN 中的 Windows 资源管理器图标需要很长时间才能刷新到正确状态

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/2217880/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-09 07:06:44  来源:igfitidea点击:

Windows Explorer icons in TortoiseSVN take a long time to refresh to correct state

windowstortoisesvn

提问by leora

After I commit files, the icons stay on either modified or waiting for commit for a long time. Is there any way to force a refresh to ensure that the icon that I am seeing is the correct state of the file?

提交文件后,图标会长时间处于修改状态或等待提交状态。有没有办法强制刷新以确保我看到的图标是文件的正确状态?

采纳答案by Stefan

As stated in the FAQ: try running a cleanup.

常见问题解答中所述:尝试运行清理。

回答by gekowa

You can try this:

你可以试试这个:

TortoiseSVN -> Settings -> Icon Overlay, set Status Cache to 'Shell' instead of 'Default'

TortoiseSVN -> Settings -> Icon Overlay,将状态缓存设置为“Shell”而不是“Default”

Ref. to the Help.

参考 到帮助。

Shell Caching is done directly inside the shell extension DLL file, but only for the currently visible folder. Each time you navigate to another folder, the status information is fetched again.

Advantage: needs only very little memory (around 1 MB of RAM) and can show the status in real time.

Disadvantage: Since only one folder is cached, the overlays don't show the status recursively. For big working copies, it can take more time to show a folder in explorer than with the default cache. Also the mime-typecolumn is not available.

外壳缓存直接在外壳扩展 DLL 文件内完成,但仅适用于当前可见的文件夹。每次导航到另一个文件夹时,都会再次获取状态信息。

优点:只需要很少的内存(大约1MB RAM)并且可以实时显示状态。

缺点:由于只缓存了一个文件夹,所以叠加层不会递归显示状态。对于大型工作副本,在资源管理器中显示文件夹可能比使用默认缓存需要更多时间。该mime-type列也不可用。

回答by Malice

I posted a similar answer herebut to save you the trouble of opening the link I will quote it here:

我在这里发布了一个类似的答案但为了省去打开链接的麻烦,我将在此处引用:

I'm not sure if this is exactly related to your issue but I have found TortoiseSVN can sometimes be quite slow when dealing with repositories that have a lot of files in them. This manifests itself in the tsvncache.exe process taking up a lot of memory. The tsvncache.exe process scans files and folders and associates the familiar icons with them to denote changed/ignored etc. files.

A fix for this is to tell Tortoise SVN to only cache the folders you are working in and ignore the others. To do this, right-click your project folder and select TortoiseSVN->Settings->Icon Overlays. I have Exclude paths set to c:* and d:* (basically ignore all fixed drives) and Include paths set to my projects folder.

我不确定这是否与您的问题完全相关,但我发现 TortoiseSVN 在处理包含大量文件的存储库时有时会很慢。这表现在 tsvncache.exe 进程占用了大量内存。tsvncache.exe 进程扫描文件和文件夹,并将熟悉的图标与它们相关联,以表示更改/忽略等文件。

对此的解决方法是告诉 Tortoise SVN 仅缓存您正在使用的文件夹而忽略其他文件夹。为此,请右键单击您的项目文件夹并选择 TortoiseSVN->Settings->Icon Overlays。我将排除路径设置为 c:* 和 d:*(基本上忽略所有固定驱动器)并将包含路径设置为我的项目文件夹。

回答by Dude

Stumbled upon this issue recently. Found a short and dirty workaround that has proven to be 100% effective.

最近偶然发现这个问题。找到了一个简短而肮脏的解决方法,它已被证明是 100% 有效的。

Create an empty text file in the folder you wish for the icons to refresh in by right clicking and selecting "New" --> "Text Document". The icons should magically refresh. Delete the empty text file after of course.

通过右键单击并选择“新建”->“文本文档”,在您希望图标刷新的文件夹中创建一个空文本文件。图标应该神奇地刷新。当然之后删除空文本文件。

回答by Pavel Punsky

Closing the Windows Explorerwindow and reopening helps. Most often the icon stays at the tree part of Windows Explorer.

关闭Windows 资源管理器窗口并重新打开会有所帮助。大多数情况下,图标停留在 Windows 资源管理器的树部分。

And no - Clean Upand F5doesn't help. I guess it has something to do with Explorer and not TortoiseSVN.

而且没有-清理F5没有帮助。我猜这与 Explorer 而不是 TortoiseSVN 有关。

回答by Pavel Punsky

If you want to check if you comitted everything, there is the "svn check for modifications" menu option. If you press F5 there it will update and show you the truth. If it annoys you that the folder icons are out of date, you can turn the icons off.

如果您想检查是否提交了所有内容,可以使用“svn 检查修改”菜单选项。如果你在那里按 F5,它会更新并向你展示真相。如果您对文件夹图标过时感到恼火,您可以关闭图标。

回答by Vladimir

I don't know if it's related but hitting F5seems to help... sometimes.

我不知道这是否相关,但击球F5似乎有帮助……有时。

My experience with TortoiseSVN is that the performance is somehow directly linked to the number of checked out directories. You can set the directories that must be included/excluded in some TortoiseSVN properties to speed up the process.

我使用 TortoiseSVN 的经验是,性能以某种方式与检出目录的数量直接相关。您可以设置必须在某些 TortoiseSVN 属性中包含/排除的目录以加快进程。

回答by Great_Mike

Go to the directory under which you want the icons to be updated. Right click on that directory with your mouse and in the SVN context explorer menu select 'cleanup' and then press F5. It should refresh all SVN icons under that directory for you. It did for me.

转到要更新图标的目录。用鼠标右键单击该目录,然后在 SVN 上下文资源管理器菜单中选择“清理”,然后按F5。它应该为您刷新该目录下的所有 SVN 图标。它对我有用。

I work on a huge project with thousands of files and a SVN 'cleanup' is very fast on my computer so I do it at the root level for the most part, thus refreshing all icons. For slower computers without much memory a full cleanup for a big project might take a while. In that case you can refresh just the directory you need.

我正在处理一个包含数千个文件的大型项目,并且我的计算机上的 SVN“清理”速度非常快,因此我大部分时间都在根级别执行此操作,从而刷新所有图标。对于没有太多内存的速度较慢的计算机,大型项目的完全清理可能需要一段时间。在这种情况下,您可以只刷新您需要的目录。

Someone says above that a 'cleanup' will revert your local changes but that is not necessarily true. It does not revert for me... Furthermore, I do not think it's an option you should enable. Sometimes your local SVN caches get corrupted and a cleanup will fix them for you... that being often a necessity in order to do your commits, etc...

上面有人说“清理”将恢复您的本地更改,但这不一定是真的。它不会为我恢复......此外,我认为这不是您应该启用的选项。有时您的本地 SVN 缓存会损坏,清理会为您修复它们……这通常是执行提交等所必需的……

Hope it helps.

希望能帮助到你。

PS. My tortoise SVN version is: TortoiseSVN 1.6.16, Build 21511 - 64 Bit

附注。我的 tortoise SVN 版本是:TortoiseSVN 1.6.16, Build 21511 - 64 Bit

回答by noodle7

Windows' "refresh" (F5) mostly works for me (OK, I press it obsessively, too), but sometimes a window doesn't have any icon overlays at all. In these cases, "Cleanup" doesn't help either, no matter which options I choose, including "Refresh Shell Overlays".

Windows 的“刷新”(F5) 主要对我有用(好吧,我也很痴迷地按下它),但有时一个窗口根本没有任何图标覆盖。在这些情况下,“清理”也无济于事,无论我选择哪个选项,包括“刷新外壳覆盖”。

I followed the tip from gekowa:

我遵循了gekowa的提示:

TortoiseSVN -> Settings -> Icon Overlay, set Status Cache to 'Shell' instead of 'Default'

TortoiseSVN -> Settings -> Icon Overlay,将状态缓存设置为“Shell”而不是“Default”

and the next time I opened the window, the overlays were correct. It took a few seconds for the window to open, but everything was right after that. The I set the Status Cache back to "Shell" and the time lag went away, too.

下次我打开窗口时,叠加层是正确的。窗户花了几秒钟才打开,但之后一切就都好了。我将状态缓存设置回“Shell”,时间延迟也消失了。

Previously, I had set the Status Cache to "None", but that didn't help.

以前,我已将状态缓存设置为“无”,但这没有帮助。

回答by noti

I had a similar problem. I'v created a new branch and afterwards checked out to a new working copy. The new working copy didn't have the icon overlays as it should. Nothing showed up. Only after killing the TSVNCache.exeprocess via the Windows task manager, did the icons appear correctly.

我有一个类似的问题。我创建了一个新分支,然后签出到一个新的工作副本。新的工作副本没有应有的图标覆盖。什么都没有出现。只有在TSVNCache.exe通过 Windows 任务管理器终止进程后,图标才能正确显示。