您可以覆盖 Mercurial 对“.hg”的使用吗?和“.hgignore”?

发布于 2024-10-01 01:07:42 字数 383 浏览 5 评论 0原文

我们在 Mercurial 和另一个同步产品(MS Office Groove,现在的 Sharepoint Workspace 2010)之间存在兼容性问题。基本上,“.hg”文件夹和“.hgignore”文件被阻止(我已经总结了其他软件的问题)。

我们被告知唯一的解决方法是更改​​文件夹的名称。有没有办法修改 Mercurial 的数据库文件夹命名约定并忽略文件?据我了解,我只需要通过添加前缀使名称更“正常”。有点像“万福玛丽”,但我想我会问。

We're having a compatibility problem between Mercurial and another synchronization product (MS Office Groove, now Sharepoint Workspace 2010). Basically, the ".hg" folder and ".hgignore" files are being blocked (I've summarized the issue with the other software).

We've been told that the only work-around is to change the name of the folder. Is there any way to modify Mercurial's naming convention for the database folder and ignore file? From what I understand, I'd just need to make the names more "normal" by adding a prefix. Sort of a "Hail Mary" but thought I'd ask.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

山有枢 2024-10-08 01:07:42

您可以为 .hgignore 使用不同的文件名(或者更准确地说,没有 .hgignore,然后在 hg/hgrc 文件中使用 ignore= 行来引用其他忽略使用您想要的任何名称的文件)。但是,您不能为 .hg 本身使用替代名称。

正如 Lasse 建议的那样,您无论如何都不应该在外部同步 .hg 目录。它们的读/写/锁定语义非常具体,对它们的唯一读/写应该通过 hg 本身。设置一个 cron 作业非常简单,它可以根据您的需要自动推送到备份存储库。

You can use a different file name for .hgignore (or more accurately have no .hgignore and then use an ignore= line in your hg/hgrc file to reference an additional ignore file with whatever name you want). However you can't use an alternative name for .hg itself.

As Lasse suggests you shouldn't be synchronizing .hg directories externally anyway. Their read/write/lock semantics are very specific and the only reading/writing to them should be via hg itself. It's very easy to set up a cron job that automatically pushes to a backup repo as often as you'd like.

时光沙漏 2024-10-08 01:07:42

这些名称在 Mercurial 源代码中是硬编码的,搜索 ".hg"".hgignore" 的出现(为了增加安全性,也使用单引号)。但是,由于典型的 Mercurial 安装提供了 Mercurial 源代码,因此可以轻松地将其更改为您喜欢的任何内容。

The names are hard-coded in the Mercurial source, search for occurrences of ".hg" and ".hgignore" (for added safety, also using single quotes). However, since a typical Mercurial installation provides the Mercurial source code, it's easy to change this to anything you prefer.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文