Delphi 2007 - How to avoid having a \history folder?

有些话、适合烂在心里 提交于 2019-12-06 21:38:18

问题


Newer Delphi versions (including Delphi 2007, which I'm using) have a build in file history feature, which lets you revert to old files from within the IDE. That's nice, but I already have source control. Is it possible to disable this feature?

I ask because the IDE auto-creates a \history folder with old versions of all your files, and that annoys me.


回答1:


Tools \ Options \ Editor Options \

Uncheck "Create Backup Files"

;)




回答2:


I believe you can go into the registry:

D2007: HKEY_CURRENT_USER\Software\Borland\BDS\5.0\Known IDE Packages
D2009: HKEY_CURRENT_USER\Software\CodeGear\BDS\6.0\Known IDE Packages 

and delete the appropriate key:

$(BDS)\bin\historyide100.bpl
or
$(BDS)\bin\historyide120.bpl

I'm sure that worked for me and I seem to recall that was all that was needed. I tend not to bother now though and just leave it in. Tell SVN to ignore the history folders. Any Delphi update does seem to put it back too.




回答3:


I don't believe you can. If you go to

Tools \ Options \ Editor Options \ File backup limit

Which is where controls how many files it backs up, the minimum is 1, which would still create the history folder.

Maybe you could setup an MSBuild event to clear it out or some other house keeping task.




回答4:


IIRC Delphi Distiller has an option to keep it from creating History folders. I don't actually have it on my current system, though, so I can't check. But you might want to check it out.




回答5:


DDevExtension by Andreas Hausladen has a feature to remove __history directories.



来源:https://stackoverflow.com/questions/836877/delphi-2007-how-to-avoid-having-a-history-folder

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!