VCS 存储库中一次性的正确位置是什么?

发布于 2024-08-19 04:14:28 字数 986 浏览 4 评论 0原文

我最近开始使用 Mercurial 作为我们的 VCS。多年来,我使用过 RCS、CVS,并且在过去 5 年里使用过 SVN。

13 年前,当我主要使用 CVS 和 RCS 时,大型项目进入 CVS,一次性在特定服务器上进行编辑并存储在 RCS 中。这种方法效果很好,因为一次性的数据通常是特定于服务器的,并且服务器每晚都会进行备份。

向前迈进十年,许多一次性脚本变得不那么集中化——在某个随机时间任何服务器上都可能需要它们。这也没关系,因为现在我是一个不情愿的 SVN 用户。所有内容(文档除外)都被转储到一个存储库中。

跳转到 2010 年。现在我正在使用 Mercurial,并再次将大型项目放入他们自己的存储库中。但对于一次性的事情该怎么办呢?

我看到的选项是:

  • 每个脚本的存储库。
  • It seems a bit cluttered to create a repo for every one page script that might get ran once a year.
  • RCS
  • Not an option. There are many possible servers that might need a specific script.
  • 继续使用 SVN 只是为了一次性。
  • No. There no advantage I see over the next option.
  • 创建一个Mercurial 中的存储库名为“一次性”。
  • This seems the most workable.

最后一个选项对我来说似乎是最好的 - 然而;有这方面的最佳实践吗?

您可能还想知道这些脚本是否真的是一次性的(如果它们会被重用)。其中一些可能会在 6 个月或一年后重复使用 - 有些则永远不会。然而,由于复杂的逻辑或大量的错误检查,几乎所有这些都涉及几个工时的工作。简单地丢弃它们是没有效率的。

I have recently started using Mercurial as our VCS. Over the years, I have used RCS, CVS, and - for the last 5 years - SVN.

Back 13 years ago, when I primarily used CVS and RCS, large projects went into CVS and one-offs were edited in place on the specific server and stored in RCS. This worked well as the one-offs were usually specific to the server and the servers were backed up nightly.

Jump forward a decade and a lot of the one-off scripts became less centralized - they might be needed on any server at some random time. This was also OK, because now I was a begrudging SVN user. Everything (except for docs) got dumped into one repo.

Jump to 2010. Now I am using Mercurial and am putting large projects in their own repo again. But what to do with the one-offs?

The options as I see them:

  • A repo for each script.
  • It seems a bit cluttered to create a repo for every one page script that might get ran once a year.

  • RCS
  • Not an option. There are many possible servers that might need a specific script.

  • Continuing to use SVN just for one-offs.
  • No. There no advantage I see over the next option.

  • Create a repo in Mercurial named "one-offs".
  • This seems the most workable.

The last option seems the best to me - however; is there a best practice regarding this?

You also might be wondering if these scripts are truly one-offs if they will be reused. Some of them may be reused 6 months or a year from now - some, never. However, nearly all of them involve several man-hours of work due to either complex logic or extensive error checking. Simply discarding them is not efficient.

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

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

发布评论

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

评论(1

撑一把青伞 2024-08-26 04:14:28

我同意你的分析。基本上,如果您不想丢弃某些东西,那么您可以将其存储在某个地方:-)

在 4 个建议选项中,最后一个绝对是最有意义的。

此外,您还可以将脚本存储在 CMS 中(如果您有一个,并且它足够强大,适合您的口味)。取决于什么更方便/易于管理。

I agree with your analysis. Basically, if you don't want to discard something, then you store it somewhere :-)

Out of the 4 proposed options the last one definitely makes the most sense.

Also, you can store the scripts in your CMS (if you have one, and if it's robust enough for your taste). Depends on what's more convenient/manageable.

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