Timothy Miller wrote: > On 10/18/06, Mark Baker <[EMAIL PROTECTED]> wrote: >> >> 2) Make it automatic: Implement a script that checks whether newly >> committed files contain the full dual-licensing explanation. If they >> don't, SVN should refuse to commit the change. This will force >> contributors to keep the dual-licensing explanation intact. > > This is something I wouldn't know how to implement. Due to potential > changes in formatting, we'd have to develop something with heuristics > that computes compliance based on occurrences of the words in the > license and relative locality. A score above a certain number would > then be assumed to be presense of the license. Then, if someone finds > something with a scrambled license (to trick the checker), we can just > delete or revert the file later.
Or we could provide a template to use when creating a new file, and to cut-and-paste from if there is a mismatch. Subversion allows us to report an instructive error message with guidance of how to fix the problem. Some light flexibility is easy to implement. How about something like this: * Match the first "Copyright..." lines with regular expressions. * Parse the rest of the license text into a string, erasing the starting comment characters. Then normalise spaces (replace any sequence of white-spaces with a single white space) and compare the hash of the result with the corresponding hash of the right license. This does not catch hyphen- continuations, but I think we can ban those. I think it's not good to strip punctuation. (I recall a Norwegian sentence "Drep han ikke vent til jeg kommer." which translates into "Kill him not|don't wait till I arrive." where "ikke" can mean both "not" and "don't". Depending on where you put the required comma, the outcome is fatal for the poor guy. I'm sure you have similar examples in English.) But, we need a reliable way to detect the end of the license text. How about having an "End of license." phrase? That would prevent anyone from adding exceptions below the official license. Further, we may probably want to apply difference restrictions on different directories (and file types). I guess 'rtl' is the most important to restrict. > We'll look at the technical solution you mention below. > I made some tests. We can do it if we want. _______________________________________________ Open-graphics mailing list [email protected] http://lists.duskglow.com/mailman/listinfo/open-graphics List service provided by Duskglow Consulting, LLC (www.duskglow.com)
