Mercurial 中应如何处理二进制工件(例如文档)

发布于 2024-11-19 06:20:51 字数 249 浏览 1 评论 0原文

我们目前主要是 SVN 用户,拥有明确定义的工作流程。 我们使用中央/镜像存储库,锁定以防止意外同时编辑二进制工件,以定义的方式对代码进行分支/合并等。

我们在一些实验中使用了 hg (和 git),它们非常好。我们希望在实际项目中更广泛地使用它们。

但是我们应该如何处理难以/不可能合并二进制工件,例如来自各种工具的文档或图像等?

建议采用什么工作流程来防止用户在其各个存储库中对此类项目进行更改,并避免以后进行硬性手动更改协调过程?

We're currently mostly SVN users with a well defined workflow.
We use central/mirrored repos, locking to prevent accidental simultaneous edit of binary artifacts, branching/merging in a defined way for code, etc.

We've used hg (and git) in some experiments and they're very nice. We would like to make more extensive use of them on real projects.

How though should we handle hard/impossible to merge binary artifacts, like docs from various tools, or images, etc?

What workflow is recommended for preventing users making changes to such items out in their various repos, and avoiding a hard manual change reconciliation process later?

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

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

发布评论

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

评论(1

浅浅 2024-11-26 06:20:51

我认为一般来说简单地合并二进制文件是不可能的,因为这取决于二进制数据的类型。因此,需要在能够处理特定文件格式的应用程序中手动完成。

一般来说,为了防止用户同时更改某些项目,您需要实现锁定机制。只有当所有客户端都知道某些东西被锁定时(例如,通过联系中央服务器或广播问题是否被锁定),才能实现正确的锁定。目前,我不知道如何在不编写专门软件(由操作或不断运行的后台进程或类似的东西触发)的情况下完成此任务。

如果二进制文件只是其他源代码的编译输出,您也可以将它们添加到 .hgignore 中,而不是在存储库中处理它们。

I think that easy merging binary files in general is impossible, because it depends on the type of binary data. Therefore it would need to be done manually in the application that is able to deal with the specific file format.

In general for preventing users to making changes to some items at the same time you will need to implement a locking mechanism. Correct locking can only be accomplished if all clients know that something is locked (eg. by contacting a central server or broadcasting a question if it is locked or not). At the moment I have no useful idea on how to accomplish this without writing specialized software (that is triggered by actions or a constantly running background process or something like that).

In case the binary files are just the compiled output of some other source code, you may also add them to .hgignore and not deal with them in the repository.

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