TortoiseHg - 如何在不提交的情况下创建补丁 [英] TortoiseHg - How to create patch without commit first

查看:40
本文介绍了TortoiseHg - 如何在不提交的情况下创建补丁的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我想在我的本地变更集上创建补丁时,我真的必须首先提交,我可以创建补丁.我可以知道在 TortoiseHg 下,如何在不执行提交的情况下创建补丁?

When I want to create a patch on my local changeset, I really I have to first commit, any I can create the patch. May I know under TortoiseHg, how I can create a patch without performing commit?

推荐答案

TortoiseHg 2.0.2:在工作台中,您可以右键单击Working Directory 行并选择Export/Copy patch 从上下文菜单中 - 产生的差异将被放置在剪贴板中.

TortoiseHg 2.0.2: in workbench you can right-click on the Working Directory line and select Export / Copy patch from the contextual menu - the resulting diff will be placed in clipboard.

当然,您不会像在提交时所做的相同操作那样在补丁的开头获得变更集标头和提交消息:

Of course, you won't have the changeset header and the commit message at the beginning of the patch like you will get from the same operation made on a commit:

# HG changeset patch
# User John Doe <john@doe.com>
# Date 1300889184 -7200
# Node ID 0050250004150030450034543labc23598235325
# Parent  098140937509174fbca7089686d986986e06f097
Sample commit message ...

感谢 xanatos:

您可以在工作台中为差异(包括二进制数据)启用git 格式":File->Settings->Compare->Git Format = True(默认值未指定,似乎等于 False)

You can enable the "git format" for diffs (that include binary data) in the workbench: File->Settings->Compare->Git Format = True (the default value is unspecified, that seems to be equal to False)

这篇关于TortoiseHg - 如何在不提交的情况下创建补丁的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆