合并后,如何禁止Mercurial保留.orig文件? [英] How do you disable mercurial from leaving .orig files after a merge?

查看:121
本文介绍了合并后,如何禁止Mercurial保留.orig文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

一段时间后更新TortoiseHg + Mercurial之后,合并后我开始获取.orig文件.我已经查看了用于删除/清除它们的解决方案,但是我正在寻找一种方法来禁用文件.完成合并而没有出现这些文件之后,我想知道这是否是可以关闭的新功能.

After updating TortoiseHg+Mercurial a while back I am starting to get .orig files after merges. I have looked at the solutions for removing/purging them but I am looking for a way to disable the files from being left behind. After doing merges fine without these files appearing I was wondering if this was something new that could be turned back off.

推荐答案

更新:

根据Mercurial 配置文档,默认值部分已弃用. Mercurial Wiki 也特别批评其使用.建议的替代方法是创建一个命令别名(而不是隐藏内置命令),该别名将提供您所需要的功能.这是我在配置中切换的内容.

According to the Mercurial config documentation the defaults section is deprecated. The Mercurial wiki is also particularly critical of their use. The recommended replacement is to create a command alias (while not shadowing built in commands) that provides the functionality you are looking for. Here's what I've switched to in my config.

[alias]
undo = revert --no-backup


原文:

在遇到完全相同的问题时,我偶然发现了这一点.我一直在处理它并删除.orig文件,因为我似乎从不需要它们.我发现的最佳建议是在StackOverflow上,并建议使用hgrc文件的defaults部分.要专门解决此问题,请添加以下部分:

I stumbled across this while experiencing the exact same problem. I had been just dealing with it and deleting the .orig files, since I never seem to need them. The best recommendation I've found was on StackOverflow and suggests using the defaults section of your hgrc file. To address this specifically, add the following section:

[defaults]
revert = --no-backup

在这里是我所读到的.

这篇关于合并后,如何禁止Mercurial保留.orig文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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