开发者

What Is The Proper Location For One-Offs In VCS Repos?

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 w开发者_开发百科ell 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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜