It is sometime useful to write a script to perform a batch editing on several files in a source tree. Such a script is usually very specific and used only once.

Such scripts can be used to rework some identifiers in code, modify file header comments, edit the path of a resource or the like. I want to stress that I am concerned by the case where the script addresses an exceptional problem, so that it does not fit in the usual workflow of the project.

I think it is important to keep record of these scripts and reference the usage of the script in the RCS logbook. Where is the appropriate place to keep this record?

Should they be added to the commit description in the RCS logbook? Should they be added to the ticket description of the item being processed when they are used? Should they be saved as regular files in the project and added to the RCS, despite the fact their usage is deemed to be unique? Is there another way?

1 Answer 1


Description of a usage scenario of a script should not be buried in the log record of your RCS, it should be part of the documentation of the script. For small scripts, its not unsual that this doc is just a few line of comments at the beginning of the script itself.

Where you keep the script itself depends on your general source code structure. Maybe you have special a "tools" or "scripts" folder in your source code tree and keep the script there. Its not even necessary to keep "throw away" scripts in your RCS as part of your regular source code; if you have a different versioning strategy for your development tools in general, the scripts may be placed in the environment of those tools.

Make sure you choose a place which fits nicely into your existing structure, where you can find the scripts when you need them again, and where they don't disturb your working process as long as you don't need them.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.