如何识别 darcs 存储库中的修订版本?

发布于 2024-09-11 23:24:00 字数 97 浏览 2 评论 0原文

我的意思是,我需要通过某个数字或字符串来识别一组已应用的补丁,以快速检查我是否具有与其他人相同的代码版本,而无需任何同步。

是否有一些内置的 darcs 解决方案?

I mean that I need to identify a set of applied patches by some number or a string to quickly check if I have the same code version as the other people without any synchronizations.

Is there some built-in darcs solution for this?

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

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

发布评论

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

评论(2

等数载,海棠开 2024-09-18 23:24:00

对此没有简短的标识符 - 这是廉价的挑选 darcs 给您带来的缺点之一。您可以通过首先运行 darcs Optimize --reorder 然后查看 darcschanges--context 的输出来获取长标识符 - 但可能会列出两个具有相同内容的存储库上下文中的事物以不同的顺序排列,所以它仍然不完美。您可以对输出进行排序并进行比较。

因此总的来说

darcs optimize --reorder
darcs changes --context | sort | md5sum

会给你一个版本标识符的合理近似值。

darcs Optimize --reorder 步骤并不是绝对必要的,只是如果没有它,当存储库实际上包含同一组补丁时,您可能会得到不同的结果。

There's no short identifier for this - it's one of the downsides of the cheap cherry-picking darcs gives you. You can get a long identifier by first running darcs optimize --reorder and then looking at the output of darcs changes --context - but two repos with the same contents might list things in the context in different order, so it's still not perfect. You could sort the output and compare those.

So overall

darcs optimize --reorder
darcs changes --context | sort | md5sum

would give you a reasonable approximation of a version identifier.

The darcs optimize --reorder step isn't absolutely necessary, it's just possible that without it you'll get different results when the repos actually contain the same set of patches.

離殇 2024-09-18 23:24:00

您还可以使用 darcs pulldarcs Push 查看是否有补丁未同步。

$ darcs pull --dry-run ; darcs push --dry-run


Would pull from "/home/masse/temp/2013/01/09/tests/project"...
Would pull the following changes:
Wed Jan  9 16:39:50 EET 2013  [email protected]
  * Canonical order for colors

Making no changes: this is a dry run.
Would push to "/home/masse/temp/2013/01/09/tests/project"...
No recorded local changes to push!

You can also use darcs pull and darcs push to see whether there are any patches not synchronized.

$ darcs pull --dry-run ; darcs push --dry-run


Would pull from "/home/masse/temp/2013/01/09/tests/project"...
Would pull the following changes:
Wed Jan  9 16:39:50 EET 2013  [email protected]
  * Canonical order for colors

Making no changes: this is a dry run.
Would push to "/home/masse/temp/2013/01/09/tests/project"...
No recorded local changes to push!
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文