VCS 存储库中一次性的正确位置是什么?
我最近开始使用 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.
- RCS
- Continuing to use SVN just for one-offs.
- Create a repo in Mercurial named "one-offs".
It seems a bit cluttered to create a repo for every one page script that might get ran once a year.
Not an option. There are many possible servers that might need a specific script.
No. There no advantage I see over the next option.
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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我同意你的分析。基本上,如果您不想丢弃某些东西,那么您可以将其存储在某个地方:-)
在 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.