TortoiseHg 应用补丁
TortoiseHg 允许您通过电子邮件将更改的补丁文件发送给某人,但它支持应用补丁吗?
如果是这样,如何使用 TortoiseHg 应用补丁?
TortoiseHg allows you to email a patch file of your changes to someone, but does it support applying patches?
If so, how do you apply a patch using TortoiseHg?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
从存储库资源管理器,存储库>进口...
From Repository Explorer, Repository > Import...
TortoiseHg 似乎对此没有内置支持。从命令提示符尝试此操作:
这应该将补丁应用到您的 Mercurial 存储库和工作副本。
第一个答案
您应该能够右键单击补丁文件并选择“应用补丁...” - 这就是其他 TortoiseX 客户端的工作原理。确保将补丁文件保存到生成补丁文件的同一目录路径中。
正在下载 TortoiseHg 0.8.1 进行测试...
It looks like there is no built-in support in TortoiseHg for this. Try this from a command prompt:
That should apply the patch to your Mercurial repo and working copy.
First Stab Answer
You should be able to right-click on the patch file and choose "Apply patch..." - that's how it works for other TortoiseX clients. Make sure that you save the patch file to the same directory path it was generated from.
Downloading TortoiseHg 0.8.1 to test...
还值得注意的是,“Repository Explorer,Synchronize > Import...”(内部执行“hg import”)将自动执行“commit” - 这可能并不总是如此想要的行为。
其他可能性是使用 unix“patch”命令(在 Windows 上可能使用 cygwin 版本)或直接使用“hg import”和“--no-commit”选项。两者都只会在工作目录中进行更改,您可以查看更改并稍后手动提交。
What may be also noteworthy is, that "Repository Explorer, Synchronize > Import..." (which internally does a "hg import") will automatically do a "commit" - this may not be always wanted behaviour.
Other possibility is to use unix "patch" command (on Windows perhaps use cygwin version) or use "hg import" directly with "--no-commit" option. Both will just make changes in working directory and you may review the changes and commit them later manually.
在 1.0 中,来自工作台:
存储库>进口...
In 1.0, from Workbench:
Repository > Import...