我应该配置 SVN 在 Delphi 项目中忽略什么?

发布于 12-06 12:11 字数 111 浏览 0 评论 0原文

提交到存储库时我应该告诉 Tortoise SVN 忽略哪些文件?

我特别对实用信息感兴趣,例如是否包含诸如 *.dproj.2007 等似乎出现但可能不需要的文件。

What files should I tell Tortoise SVN to ignore when committing to a repository?

In particular I am interested in practical information such as whether to include such files as *.dproj.2007 etc that seem to appear but may not be needed.

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

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

发布评论

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

评论(3

橘亓2024-12-13 12:11:42

我在 D2007 中使用这些,它们似乎在 XE 和 XE2 中仍然可以正常工作:

*.dcu *.~* *.ddp *.exe *.map *.bak *.obj *.dsk 
*.err *.log *.tmp *.identcache *.tvsconfig  __history *.todo 
ModelSupport* *.local

我不包含 ModelSupport 因为我不使用 IDE 的建模内容,所以如果它是错误创建的。我也不对 __history 文件夹中的任何内容进行版本控制,因为这只是签入之间的临时版本控制;一旦签入 SVN,就不再需要了。

(我不同意 Chris 关于 *.res 的观点,顺便说一句,特别是在 XE2 方面。现在可以使用 Project|Resources and Images 创建资源文件,并且这些文件可以直接创建由于资源\图像实际上可能来自当前文件夹之外的其他位置,并且图像文件可能会意外地未签入,因此我现在保留 .res 文件。还保留项目文件;它包含所有路径和编译器选项如果发生需要更改的情况,只需删除项目文件并让 IDE 根据需要重新创建它即可。)

I use these in D2007, which seem to still work fine in XE and XE2:

*.dcu *.~* *.ddp *.exe *.map *.bak *.obj *.dsk 
*.err *.log *.tmp *.identcache *.tvsconfig  __history *.todo 
ModelSupport* *.local

I don't include ModelSupport because I don't use the IDE's modeling stuff, so there's no point in versioning it if it's created by mistake. I also don't version anything in the __history folder, as that's just temporary versioning between checkins; once the checkin to SVN is made, it's not necessary any longer.

(I disagree with Chris about *.res, BTW, especially when it comes to XE2. Resource files can be created now using Project|Resources and Images, and those go directly into a resource file. Since the resource\image may be actually coming from somewhere else not in the current folder, and the image file might accidentally not be checked in, I keep the .res file now. I also keep the project file; it has all the paths and compiler options set. If something happens where that needs to change, it's easy to just remove the project file and let the IDE recreate it as needed.)

溺ぐ爱和你が2024-12-13 12:11:42

使用Delphi2005,我们团队很早就采用了这个:

*.bdsproj *.scc *.suo *.user .~ *.local *.identcache *.dsk obj bintesting __history *.o *。 lo *.la *.al .libs *.so .so.[0-9] *.a *.pyc *.pyo *.rej ~ ## .#* .*.swp .DS_Store

不确定它们是否全部需要,或者其中一些是什么。我没有想出它,只是遵循我们的内部维基......

沿着这些思路,您应该查看服务器端预提交挂钩。我们有一个预提交触发器,不允许检查 .bdsproj、.dpr 和 .res 文件,除非注释中包含特定标签:[添加项目文件] [添加 Res 文件]。如果您尝试提交没有这些标签的 .bdsproj、.res 或 .dpr,则提交将无法通过审核并被拒绝,并且将向整个开发团队发送一封令人尴尬的电子邮件。这是因为这些文件很少有任何合法的更改。如果您需要将一个单元添加到项目中,那么可以执行此操作并在签入中包含标签,这样就可以了。该标签显示“我知道我在做什么,并且我有充分的理由更改此文件”。否则,您会收到各种垃圾信息 - 转速数、路径更改、包来来去去等。

我们还在预提交中设置了一些 grep 过滤器,寻找要添加的某些内容。就像 DevExpress 中不需要的“皮肤”单元一样,因为某些开发人员安装了所有皮肤,并且 IDE 决定添加它们。或者 MadExcept,因为有人在调试某些内容后将其打开(出于各种原因,我们不允许在这个特定项目的生产中使用 MadExcept)。诸如此类的事情。

更新:因为我们的环境不典型,所以我从上面的列表中删除了 *.res。

Using Delphi2005, our team has long ago adopted this:

*.bdsproj *.scc *.suo *.user .~ *.local *.identcache *.dsk obj bin testing __history *.o *.lo *.la *.al .libs *.so .so.[0-9] *.a *.pyc *.pyo *.rej ~ ## .#* .*.swp .DS_Store

Not sure if they're all needed or not, or what some of them are. I didn't come up with it, just following our internal wiki....

Along those lines, you should look at server-side pre-commit hooks. We've got a pre-commit trigger that dis-allows check of .bdsproj, .dpr, and .res files unless a specific tag is included in the comment: [Add Project File] [Add Res File]. If you try to commit a .bdsproj, .res, or .dpr without those tags, the commit will fail the audit and be rejected, and an embarrassing e-mail will be sent to the whole dev team. This is because these files rarely have any legitimate changes. If you need to add a unit to a project, fine, do it and include the tag with the checkin, and it'll be fine. The tag says "I know what I'm doing, and I have a good reason to change this file". Otherwise, you've got all sorts of crap being checked in - rev numbers, path changes, packages coming and going, etc..

We've also got some grep filters in the pre-commit, looking for certain things being added. Like unwanted "skins" units from DevExpress, because some developer has all of the skins installed and the IDE decided to add them. Or MadExcept, because someone left it turned on after debugging something (we don't allow MadExcept in production on this particular project, for a variety of reasons). Stuff like that.

Update: because our environment is non-typical, I removed *.res from the list above.

转身以后2024-12-13 12:11:42

Emba 官方答案在这里:

https://docwiki.embarcadero.com/RADStudio/Sydney /en/File_Extensions_of_Files_Generate_by_RAD_Studio

时间在撰写本文时,我认为此类型列表不完整(例如:没有提及 Android .obb 文件),但 wiki 格式允许建议,并且页面似乎确实已更新。

您还可以看看这个:

https://delphi.fandom.com/wiki/Delphi_File_Extensions

尽管它似乎不太完整,并且更新不频繁(例如:根本没有提到与 android 相关的文件。)

The official Emba answer is here:

https://docwiki.embarcadero.com/RADStudio/Sydney/en/File_Extensions_of_Files_Generated_by_RAD_Studio

At time of this writing, I believe this list of types to be incomplete (example: there is no mention of Android .obb files), but the wiki format allows suggestions, and the page does appear to be updated.

You could also look at this:

https://delphi.fandom.com/wiki/Delphi_File_Extensions

although it seems to be less than complete, and not updated very often (Example: no mention of android-related files at all.)

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