我可以在不触及工作目录的情况下导入补丁吗? [英] Can I import a patch without touching the working directory?

查看:190
本文介绍了我可以在不触及工作目录的情况下导入补丁吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

通常情况下,当我尝试导入补丁时,如果我有脏工作副本,Mercurial会中止:

  $ hg import x.patch 
abort:未提交的未完成更改

是否可以导入它?<使用Mercurial 1.9,您可以使用 hg import --bypass 来解决方案在不触及工作副本的情况下应用补丁。默认情况下,修补程序将应用于工作副本父修订。使用 - exact 标志将补丁应用到补丁头中提到的变更集中。


Normally, Mercurial will abort if I have a dirty working copy when I try to import a patch:

$ hg import x.patch
abort: outstanding uncommitted changes

Is it possible to import it anyway?

解决方案

With Mercurial 1.9, you can use hg import --bypass to apply a patch without touching the working copy. The patch will be applied on the working copy parent revision by default. Use the --exact flag to apply the patch onto the changeset mentioned in the patch header instead.

这篇关于我可以在不触及工作目录的情况下导入补丁吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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