Mercurial Hg Clone 在具有 GUID 的 C# 项目上失败

发布于 2024-08-28 23:31:44 字数 540 浏览 4 评论 0原文

更新:在尝试再次复制此问题来回答您的问题时,我无法!我只能得出结论,我的 Mercurial 初始设置有问题和/或可能我正在尝试签入在签入之前编译失败的构建。叹!非常感谢您的帮助。我对如何编写脚本的帮助表示感谢。我需要出于一般目的尝试一下。


大家好,我希望你能帮助我:)。我正在尝试看看 Mercurial 是否适合我的工作项目,而且我对很多事情来说肯定是新手。

我们有一个相当大的 C# 代码库(Dotnet3.0 而不是 3.5,WindowsXP),并且它利用了 GUID 功能。我承认我对如何或为何使用 GUID 知之甚少,但我确实知道我无法触及它。

因此,当我尝试 hg clone 时,它​​会失败,除非我更改克隆目录中的 GUID(即在 Visual Studio 中创建新的 GUID,然后粘贴新的 GUID 以替换旧的 GUID)。对我来说,这完全违背了快速简单克隆的目的和实用性。它还使需要多个克隆的所有工作流程变得困难。

有解决方法吗,还是我做错了什么?我怎样才能简化和/或消除这个问题?

Bazaar 会让这变得更容易吗?

谢谢你!

UPDATE: In trying to replicate this problem one more time to answer your questions I could not! I can only conclude that my initial setup of Mercurial was problematic and/or possibly I was trying to checkin a build that failed compilation before the checkin. Sigh! Thank you so very much for your help. I gave credit for the help on how to do a script. I need to try that for general purposes.


hi all, I hope you can help me :). I am trying to see if Mercurial would be a good DCVS for my project at work, and I'm surely a newbie to many things.

We have a fairly large codebase in C# (Dotnet3.0 not 3.5 , WindowsXP) and it utilizes the GUID feature. I confess to know little about how or why we use the GUID, but I do know that I cannot touch it.

So, when I try hg clone, it fails unless I change the GUID in the cloned directory (ie create new GUID in Visual Studio and then paste that new GUID to replace the old one). To me, this completely defeats the purpose and utility of quick easy clones. It also makes difficult all the many workflows that require multiple clones.

Is there a workaround, or is there something I'm doing wrong? How can I simplify and/or remove this problem?

Would Bazaar make this easier?

Thank you!

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

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

发布评论

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

评论(2

所谓喜欢 2024-09-04 23:31:44

您也许可以在更新挂钩中完成此操作。我不是 Windows 脚本编写者,但如果您可以编写一个 powershell 脚本来调用 [system.guid].newguid() 并在该文件中替换它,您可以使用如下钩子:

[hooks]
update=c:\scripts\replace-guid-in-file.PS1 path\to\file\with\guid

无论您使用什么文件重新更改这些 guid 可能应该不会被跟踪(将其放入您的 .hgignore 中),否则您最终会在仓库中提交大量意外的 guid 更改。

You can probably do it in an update hook. I'm no windows scripter, but if you can write a powershell script that calls [system.guid].newguid() and replaces it in that file you can use a hook like:

[hooks]
update=c:\scripts\replace-guid-in-file.PS1 path\to\file\with\guid

Whatever file you're changing these guids in should probably be untracked (put it in your .hgignore) or you're going to end up with a lot of accidental guid changes commited to the repo.

掩饰不了的爱 2024-09-04 23:31:44

这个 GUID 是编辑器在项目文件中创建的吗?在这种情况下,请勿签入项目文件,或仅签入不包含 GUID 的项目文件。

Is this GUID something the editor creates in the project files? In that case, do not check in the project files, or only those that do not contain the GUID.

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