Reputation: 13454
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.
Upvotes: 22
Views: 4127
Reputation: 11
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.)
Upvotes: 1
Reputation: 15817
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.
Upvotes: 7
Reputation: 125651
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.)
Upvotes: 16