This project is read-only.


Here a some examples that show common purposes for RepoCop. They should hopefully make it pretty clear and easy to grab the whole concept.

    <!-- Enforce log messages with at least 10 characters -->
    <FailInstruction Message="Log messages require at least 10 characters.">
      <LogMessageCondition LogMessageRegExPattern=".{10}" Negate="True" />

    <!-- Allow checkin of bmp and png files only with special tag [override ressource rule] in commit log -->
    <FailInstruction Message="To ensure that ressources of type *.bmp and *.png are not added by accident the tag [override ressource rule] must be included with the commit message.">
      <Conditions Type="And">
        <LogMessageCondition LogMessageRegExPattern="\[override ressource rule\]" Negate="True" />
        <ChangedPathCondition ChangedPathRegExPattern=".*\.(png|bmp)" Action="Add" />

    <!-- Locked repo paths -->
    <FailInstruction Message="The path /branches/version_1.1 is locked and may no longer be modified.">
      <ChangedPathCondition ChangedPathRegExPattern=".*/branches/version_1\.1.*" />

    <!-- Send email reminder to user who modified "ImportantFile.txt" with further instructions -->
    <MailInstruction FromMailAddress="" ToMailAddresses="" Subject="ImportantFile.txt has been changed" BodyTemplateFile="ImportantFileChangedMailBody.txt">
      <ChangedPathCondition ChangedPathRegExPattern=".*/trunk/ImportantFile.txt" />      

    <!-- Notify project leader about every change -->
    <MailInstruction FromMailAddress="" ToMailAddresses="" Subject="Svn ##revision#" Body="#logmessage#"/>

Last edited Nov 13, 2010 at 1:15 PM by markushastreiter, version 1


No comments yet.