禁用上下文菜单
As
of version 1.5.0 and later, TortoiseSVN allows you to disable
(actually, hide) context menu entries. Since this is a feature which
should not be used lightly but only if there is a compelling reason,
there is no GUI for this and it has to be done directly in the registry.
This can be used to disable certain commands for users who should not
use them. But please note that only the context menu entries in the explorer
are hidden, and the commands are still available through other means,
e.g. the command line or even other dialogs in TortoiseSVN itself!
控制上下文菜单显示的注册表键是HKEY_CURRENT_USER\Software\TortoiseSVN\ContextMenuEntriesMaskLow
和 HKEY_CURRENT_USER\Software\TortoiseSVN\ContextMenuEntriesMaskHigh
。
每个注册表条目都是 DWORD
类型,每位对应一个指定的菜单项。置位意味着对应的菜单项禁用。
表 C.1. 菜单入口和取值
取值 | 菜单入口 |
---|---|
0x0000000000000001 | 检出 |
0x0000000000000002 | 更新 |
0x0000000000000004 | 提交 |
0x0000000000000008 | 添加 |
0x0000000000000010 | 恢复 |
0x0000000000000020 | 清理 |
0x0000000000000040 | 解决 |
0x0000000000000080 | 切换 |
0x0000000000000100 | 导入 |
0x0000000000000200 | 输出 |
0x0000000000000400 | 在当前位置创建版本库 |
0x0000000000000800 | 分支/标记 |
0x0000000000001000 | 合并 |
0x0000000000002000 | 删除 |
0x0000000000004000 | 改名 |
0x0000000000008000 | 更新到版本 |
0x0000000000010000 | 差异 |
0x0000000000020000 | 显示日志 |
0x0000000000040000 | 编辑冲突 |
0x0000000000080000 | 重新定位 |
0x0000000000100000 | 检查修改 |
0x0000000000200000 | 忽略 |
0x0000000000400000 | 版本库浏览器 |
0x0000000000800000 | 追溯 |
0x0000000001000000 | 创建补丁 |
0x0000000002000000 | 应用补丁(Apply Patch) |
0x0000000004000000 | 版本图 |
0x0000000008000000 | 锁 |
0x0000000010000000 | 删除锁 |
0x0000000020000000 | 属性 |
0x0000000040000000 | 与 URL 比较 |
0x0000000080000000 | 删除未版本控制的项目 |
0x2000000000000000 | 设置 |
0x4000000000000000 | 帮助 |
0x8000000000000000 | 关于 |
Example: to disable the “Relocate” the “Delete unversioned items” and the “Settings” menu entries, add the values assigned to the entries like this:
0x0000000000080000 + 0x0000000080000000 + 0x2000000000000000 = 0x2000000080080000
The lower DWORD
value (0x80080000
) must then be stored in HKEY_CURRENT_USER\Software\TortoiseSVN\ContextMenuEntriesMaskLow
, the higher DWORD
value (0x20000000
) in HKEY_CURRENT_USER\Software\TortoiseSVN\ContextMenuEntriesMaskHigh
.
简单删除这两个注册键,即可重新激活菜单项。