Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.
I saw some posts that were several years old on this topic and am wondering what the current best practice is...
I'd like to have my project's Menu.txt file in source control (Perforce), but with the read-only flag set I get an error "Couldn't save menu file" when I build my docs. Any thoughts on how to best deal with this problem that doesn't involve checking out Menu.txt every time you build the docs? I'd like our devs to have the most recent version of Menu.txt via source control.
In the forum I saw a suggestion to comment out the code that rewrites Menu.txt. Is that still the recommended solution or is there a switch or setting that accomplishes the same thing now?
There's no switch because Natural Docs normally needs to be able to write to menu.txt in order to add and remove source files as it finds them. Otherwise you'd have to manually edit it every time the source tree changes, which isn't ideal. You can edit the code if you really want to force this behavior.
I would have them check it out like any other source file, but only check it back in if there's a substantive change.
2.0 will be smarter and not change the timestamp on a configuration file unless there's been a substantive change.
Thanks Greg. Our nightly automated build system won't be able to check out the file, but I notice that despite the error my docs still get built. Are you aware of any side effects if we just let the BVT build with the error? I know Menu.txt won't be updated in that case, but the assumption will be that the devs would update it with the latest when they add new files.
It may just cause the builds to take longer, but if you're doing it with an automatic system it shouldn't matter.
Thanks again. It's a fantastic product, by the way!
You can configure perforce to leave the Menu.txt file always read-write. It is
one of file flags you can change for a particular file. You can still check it
out and in as you are used to.