颠覆存储库中增量的格式是什么?如果我在预提交挂钩中更改它们,我会破坏它到什么程度?

发布于 2024-12-06 17:32:33 字数 644 浏览 1 评论 0原文

帮我造成一些伤害!我厌倦了谷歌的六次点击告诉我永远不要这样做。让我们把事情搞砸吧!我非常确定我可以获取 db/transactions 中的实际文件,那么我怎样才能以有趣的方式搞砸这些文件呢?我看过 SVN::Delta,但我什至不知道它应该做什么(让某人对存储库的更改制作漂亮的图表?向 CIA 发送编码消息?)。

我真的不想听到更多不这样​​做的理由。我的工作环境中有 40 或 50 名使用 Subversion 的人。当我们编码时,我们需要在 web.config 文件、DataSource.groovy 文件中提供一些密码,凡是你能想到的。因为我们把它们留在里面而拒绝提交是非常烦人的。我们必须保存手动删除密码的文件(并且我们必须打开这些文件,它们不一定是打开的),然后一旦我们完成提交,我们必须将它们放回去才能继续工作?我想这是一个好主意,如果你只想在人们每次做出承诺时打他们一巴掌,直到他们发展出巴甫洛夫反射,永远不做任何事情。为什么?因为计算机不应该自动执行任务?因为软件客户端不知道预提交挂钩实际上并未将版本保存在开发人员的计算机上?

我在这里对语言相当不可知。向我展示一个示例,说明如何执行您不应该执行的操作...我应该从预提交中编辑哪个文件?如何解释 DELTA # # # 行后面的官话?有什么图书馆可以帮助解决这个问题吗?让我们玩得开心吧!

PS 说真的,没有人创建过“坏主意”标签吗? WTF。

Help me do some damage! I'm tired of just a half-dozen Google hits that tell me never to do this. Let's muck things up real good! I'm pretty sure that I can get ahold of the actual files in db/transactions, so how can I screw these up in interesting ways? I've looked at SVN::Delta, but I can't even figure out what it's supposed to be doing (letting someone make pretty graphs of changes to a repository? sending coded messages to the CIA?).

I really don't care to hear more reasons why not to do this. I work in an environment with 40 or 50 other people who use subversion. And while we're coding, we need some passwords in web.config files, in DataSource.groovy files, you name it. And just refusing the commit because we left them in is as annoying as hell. We have to save the files with the passwords manually deleted (and we have to open up those files, it's not like they're necessarily open), then once we're done committing we have to put them back just to continue to work? This is a good idea I suppose if you just want to bitchslap people every time they commit until they develop a Pavlovian reflex to never commit anything. And why? Because computers aren't supposed to automate tasks? Because the software client won't know that the pre-commit hook didn't actually save the version still on the developer's machine?

I'm fairly language agnostic here. Show me an example of how to do what you're never supposed to do... which file do I edit from pre-commit? How do I interpret the gobbledygook after the DELTA # # # line? Are there any libraries that will help with that? Let's have some fun!

PS Seriously, no one's created a "bad-ideas" tag? WTF.

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

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

发布评论

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

评论(1

霞映澄塘 2024-12-13 17:32:33

有缺陷的是您的构建过程,而不是 Subversion。如果您不得提交密码,请执行以下操作:

1 - 不应提交 Web.config 文件。相反,请提交 Web.config.devWeb.config.qa 等文件。
2 - 让构建脚本将相应的 .config 文件重命名为 Web.config,然后进行令牌替换,以便插入正确的密码。此信息可以来自另一个未提交的文件,该文件说明您所处的环境(因此它知道要使用哪个 .config 文件)以及密码是什么。

It is your build process that is flawed, not Subversion. If you must not commit passwords, do something like the following:

1 - Web.config files should not be committed. Instead, commit files like Web.config.dev or Web.config.qa.
2 - Have your build script rename the appropriate .config file to Web.config, and then do token replacement so that the proper passwords are inserted. This info can come from another file that is also not commited that says what environment you are in (so it knows which .config file to use), and what the passwords are.

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