有谁成功使用过TortoiseHg的“自动排除列表"? [英] Has anyone had success with TortoiseHg's "Auto Exclude List"?

查看:74
本文介绍了有谁成功使用过TortoiseHg的“自动排除列表"?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个配置文件,为了进行一些测试,我经常对其进行修改.在我修改此文件的时间中,大约有95%的时间我不想提交该存储库.在提交期间始终保持监视是很麻烦的.

I have a config file which I often modify in order to do some testing. About 95% of the time I modify this file, I do not wish to commit to the repo. It's a nuisance to always be on the lookout during commits.

我在TortoiseHg中发现了一个所谓的自动排除列表"功能,该功能应该以逗号分隔的文件列表作为默认值,这些文件默认未选中(在提交,还原,上架时).听起来这是使我的生活更简单的一种完美,无懈可击的方法.

I discovered this supposedly nifty feature in TortoiseHg called "Auto Exclude List" which is supposed to take a comma-separated list of files that you want to default to unchecked (on commits, reverts, shelves). This sounded like a perfect, non-hackish way to make my life simpler.

问题是我无法做任何事情.我使用文件名(带/不带路径),glob:文件名,引号,最终逗号等-都没有运气.我在网上几乎找不到有关此功能的信息(TortoiseHg用户界面还没有告诉我).

The problem is that I cannot get it to do anything. I use the filename (with/without path), glob:filename, quotes, final comma, etc - all with no luck. I find little information about this feature online (nothing that the TortoiseHg UI doesn't tell me already).

FYI:具有Mercurial-1.6,Python-2.6.4,PyGTK-2.16.0,GTK-2.16.6的TortoiseHg(版本1.1)

FYI: TortoiseHg (version 1.1) with Mercurial-1.6, Python-2.6.4, PyGTK-2.16.0, GTK-2.16.6

有什么建议或成功使用此功能吗?

Any suggestions, or success with this feature?

推荐答案

这绝对是您想要的功能.我为解决同一问题的模板文件解决方案而苦苦挣扎,因为它似乎是一种永恒的颠覆性,所以我很高兴发现TortoiseHg中的排除功能.

This is definitely the feature you want. I struggled with the template file solution to the same issue for what seemed like an eternity in subversion, so I was very happy to discover the exclusion feature in TortoiseHg.

它绝对对我有用.重要的一件事是了解它的作用.如果排除的项目之一被更改,它仍将显示在提交对话框中.唯一的区别是,与其他已更改的文件不同,该对话框中不会自动在其旁边显示复选标记.

It definitely works for me. One important thing is to understand what effect this has. If one of the excluded items is changed, it still shows up in the commit dialog. The only difference is that, unlike other changed files, it will not automatically have a check mark next to it in the dialog.

从可用性的角度来看,这很好,因为您不必自觉地考虑避免造成不必要的变化(我称之为噪声").您只是正常提交​​,对这些文件的更改可能会累积,但它们不会进入提交,因此不会分散更改集中的实际工作.

From a usability standpoint, this is nice because you don't have to consciously think about avoiding nuisance changes (which I call "noise"). You just commit as normal and the changes to those files may accumulate but they don't get into the commit so they don't distract from the real work in the changeset.

这也意味着您无需成为那个家伙"就可以推送到其他存储库.但是,您仍然无法在工作副本中进行未提交的更改来进行拉动和更新,因此您必须定期提交或还原这些文件.

It also means you can push to other repositories without being "that guy". However, you still can't pull and update with uncommitted changes in your working copy, so you have to commit or revert those files periodically.

您还必须注意对您实际提交的那些文件的更改.如果您有恢复这些文件的习惯,那么当您不小心删除其中一个文件的辛苦工作时,可能会引起粗鲁的唤醒.

You also have to be on the lookout for changes to those files that you actually do want to commit. If you're in the habit of reverting those files, you may be in for a rude awakening when you accidentally erase your hard work on one of them.

文件名的规范位于[tortoisehg]部分下的.hg\hgrc文件中. (更新):文件规范是相对于存储库根目录的,并且是显式的单个文件名,以逗号分隔.

The specification of the filenames goes in the .hg\hgrc file under the section [tortoisehg]. (Update): The file specifications are relative to the repo root and are the explicit individual filenames, separated by commas. No globbing is allowed.

我的看起来像这样:

[tortoisehg]
ciexclude = msi.sql,Service\AssemblyInfo.vb,SetupInitialize\AssemblyInfo.vb

对我来说就像一个魅力.

Works like a charm for me.

这篇关于有谁成功使用过TortoiseHg的“自动排除列表"?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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