Readonly bit use case

Vincent Ladeuil v.ladeuil+lp at free.fr
Tue Sep 25 17:15:18 BST 2007


>>>>> "aaron" == Aaron Bentley <aaron.bentley at utoronto.ca> writes:

    aaron> Hi all,
    aaron> I've just encountered a use case for the read-only bit.

    aaron> If you have files that are generated files, but you want to version
    aaron> them, you still don't want people hand-editing them.  So you can mark
    aaron> them read-only, and have the script that generates the file work around
    aaron> the fact that it's read-only.

    aaron> This is obviously somewhat questionable-- a more correct approach would
    aaron> be to avoid versioning generated files.  But for various reasons, it is
    aaron> sometimes desirable.

Another use case where the read-only bit is desirable:

The context is a project where a bunch of binary "traces" should
be decoded as text.

The volume of the possible (and actual) traces make it
impractical to test all combinations so I collect real-life
traces to build my test suite (the context also make it
impractical to write them nor generate them).

But due to the nature of the project, the decoding itself evolves
with the project (some decoding may be partial and completed on
user requests), so the decoded traces also change.

Versioning the binary traces allows to record the history of the
test suite.

Versioning the results allows to verify that bug fixes do not
introduce regressions but also take into account the new requests
(and may also reveal unwanted side-effects).

Just my 2c,

     Vincent



More information about the bazaar mailing list