···11-# The "checkoutlist" file is used to support additional version controlled
22-# administrative files in $CVSROOT/CVSROOT, such as template files.
33-#
44-# The first entry on a line is a filename which will be checked out from
55-# the corresponding RCS file in the $CVSROOT/CVSROOT directory.
66-# The remainder of the line is an error message to use if the file cannot
77-# be checked out.
88-#
99-# File format:
1010-#
1111-# [<whitespace>]<filename><whitespace><error message><end-of-line>
1212-#
1313-# comment lines begin with '#'
1414-syncmail
-15
CVSROOT/commitinfo
···11-# The "commitinfo" file is used to control pre-commit checks.
22-# The filter on the right is invoked with the repository and a list
33-# of files to check. A non-zero exit of the filter program will
44-# cause the commit to be aborted.
55-#
66-# The first entry on a line is a regular expression which is tested
77-# against the directory that the change is being committed to, relative
88-# to the $CVSROOT. For the first match that is found, then the remainder
99-# of the line is the name of the filter to run.
1010-#
1111-# If the repository name does not match any of the regular expressions in this
1212-# file, the "DEFAULT" line is used, if it is specified.
1313-#
1414-# If the name "ALL" appears as a regular expression it is always used
1515-# in addition to the first matching regex or "DEFAULT".
-14
CVSROOT/config
···11-# Set this to "no" if pserver shouldn't check system users/passwords
22-#SystemAuth=no
33-44-# Set `PreservePermissions' to `yes' to save file status information
55-# in the repository.
66-#PreservePermissions=no
77-88-# Set `TopLevelAdmin' to `yes' to create a CVS directory at the top
99-# level of the new working directory when using the `cvs checkout'
1010-# command.
1111-#TopLevelAdmin=no
1212-1313-# use new info format
1414-UseNewInfoFmtStrings=yes
-23
CVSROOT/cvswrappers
···11-# This file affects handling of files based on their names.
22-#
33-# The -t/-f options allow one to treat directories of files
44-# as a single file, or to transform a file in other ways on
55-# its way in and out of CVS.
66-#
77-# The -m option specifies whether CVS attempts to merge files.
88-#
99-# The -k option specifies keyword expansion (e.g. -kb for binary).
1010-#
1111-# Format of wrapper file ($CVSROOT/CVSROOT/cvswrappers or .cvswrappers)
1212-#
1313-# wildcard [option value][option value]...
1414-#
1515-# where option is one of
1616-# -f from cvs filter value: path to filter
1717-# -t to cvs filter value: path to filter
1818-# -m update methodology value: MERGE or COPY
1919-# -k expansion mode value: b, o, kkv, &c
2020-#
2121-# and value is a single-quote delimited value.
2222-# For example:
2323-#*.gif -k 'b'
-21
CVSROOT/editinfo
···11-# The "editinfo" file is used to allow verification of logging
22-# information. It works best when a template (as specified in the
33-# rcsinfo file) is provided for the logging procedure. Given a
44-# template with locations for, a bug-id number, a list of people who
55-# reviewed the code before it can be checked in, and an external
66-# process to catalog the differences that were code reviewed, the
77-# following test can be applied to the code:
88-#
99-# Making sure that the entered bug-id number is correct.
1010-# Validating that the code that was reviewed is indeed the code being
1111-# checked in (using the bug-id number or a seperate review
1212-# number to identify this particular code set.).
1313-#
1414-# If any of the above test failed, then the commit would be aborted.
1515-#
1616-# Actions such as mailing a copy of the report to each reviewer are
1717-# better handled by an entry in the loginfo file.
1818-#
1919-# One thing that should be noted is the the ALL keyword is not
2020-# supported. There can be only one entry that matches a given
2121-# repository.
-38
CVSROOT/loginfo
···11-# The "loginfo" file controls where "cvs commit" log information
22-# is sent. The first entry on a line is a regular expression which must match
33-# the directory that the change is being made to, relative to the
44-# $CVSROOT. If a match is found, then the remainder of the line is a filter
55-# program that should expect log information on its standard input.
66-#
77-# If the repository name does not match any of the regular expressions in this
88-# file, the "DEFAULT" line is used, if it is specified.
99-#
1010-# If the name ALL appears as a regular expression it is always used
1111-# in addition to the first matching regex or DEFAULT.
1212-#
1313-# You may specify a format string as part of the
1414-# filter. The string is composed of a `%' followed
1515-# by a single format character, or followed by a set of format
1616-# characters surrounded by `{' and `}' as separators. The format
1717-# characters are:
1818-#
1919-# s = file name
2020-# V = old version number (pre-checkin)
2121-# v = new version number (post-checkin)
2222-#
2323-# For example:
2424-#DEFAULT (echo ""; id; echo %s; date; cat) >> $CVSROOT/CVSROOT/commitlog
2525-# or
2626-#DEFAULT (echo ""; id; echo %{sVv}; date; cat) >> $CVSROOT/CVSROOT/commitlog
2727-CVSROOT /usr/bin/syncmail -C4 -u %1{sVv} bjorn@haxx.se
2828-^apps /usr/bin/syncmail -C4 -u -S "$USER: " %1{sVv} rockbox-cvs@cool.haxx.se
2929-^flash /usr/bin/syncmail -C4 -u -S "$USER: " %1{sVv} rockbox-cvs@cool.haxx.se
3030-^firmware /usr/bin/syncmail -C4 -u -S "$USER: " %1{sVv} rockbox-cvs@cool.haxx.se
3131-^docs /usr/bin/syncmail -C4 -u -S "$USER: " %1{sVv} rockbox-cvs@cool.haxx.se
3232-^uisimulator /usr/bin/syncmail -C4 -u -S "$USER: " %1{sVv} rockbox-cvs@cool.haxx.se
3333-^tools /usr/bin/syncmail -C4 -u -S "$USER: " %1{sVv} rockbox-cvs@cool.haxx.se
3434-^gdb /usr/bin/syncmail -C4 -u -S "$USER: " %1{sVv} rockbox-cvs@cool.haxx.se
3535-^bootloader /usr/bin/syncmail -C4 -u -S "$USER: " %1{sVv} rockbox-cvs@cool.haxx.se
3636-^wps /usr/bin/syncmail -C4 -u -S "$USER: " %1{sVv} rockbox-cvs@cool.haxx.se
3737-^manual /usr/bin/syncmail -C4 -u -S "$USER: " %1{sVv} rockbox-cvs@cool.haxx.se
3838-^rbutil /usr/bin/syncmail -C4 -u -S "$USER: " %1{sVv} rockbox-cvs@cool.haxx.se
-31
CVSROOT/modules
···11-# Three different line formats are valid:
22-# key -a aliases...
33-# key [options] directory
44-# key [options] directory files...
55-#
66-# Where "options" are composed of:
77-# -i prog Run "prog" on "cvs commit" from top-level of module.
88-# -o prog Run "prog" on "cvs checkout" of module.
99-# -e prog Run "prog" on "cvs export" of module.
1010-# -t prog Run "prog" on "cvs rtag" of module.
1111-# -u prog Run "prog" on "cvs update" of module.
1212-# -d dir Place module in directory "dir" instead of module name.
1313-# -l Top-level directory only -- do not recurse.
1414-#
1515-# NOTE: If you change any of the "Run" options above, you'll have to
1616-# release and re-checkout any working directories of these modules.
1717-#
1818-# And "directory" is a path to a directory relative to $CVSROOT.
1919-#
2020-# The "-a" option specifies an alias. An alias is interpreted as if
2121-# everything on the right of the "-a" had been typed on the command line.
2222-#
2323-# You can encode a module within a module by using the special '&'
2424-# character to interpose another module into the current module. This
2525-# can be useful for creating a module that consists of many directories
2626-# spread out over the entire source repository.
2727-2828-rockbox &apps &firmware &docs &tools &fonts &wps
2929-rockbox-devel &apps &flash &firmware &fonts &bootloader &docs &tools &uisimulator &gdb &wps &manual
3030-rockbox-all &apps &flash &firmware &fonts &bootloader &docs &tools &uisimulator &gdb &www &wps &manual
3131-website &www &docs
-12
CVSROOT/notify
···11-# The "notify" file controls where notifications from watches set by
22-# "cvs watch add" or "cvs edit" are sent. The first entry on a line is
33-# a regular expression which is tested against the directory that the
44-# change is being made to, relative to the $CVSROOT. If it matches,
55-# then the remainder of the line is a filter program that should contain
66-# one occurrence of %s for the user to notify, and information on its
77-# standard input.
88-#
99-# "ALL" or "DEFAULT" can be used in place of the regular expression.
1010-#
1111-# For example:
1212-#ALL mail %s -s "CVS notification"
-13
CVSROOT/rcsinfo
···11-# The "rcsinfo" file is used to control templates with which the editor
22-# is invoked on commit and import.
33-#
44-# The first entry on a line is a regular expression which is tested
55-# against the directory that the change is being made to, relative to the
66-# $CVSROOT. For the first match that is found, then the remainder of the
77-# line is the name of the file that contains the template.
88-#
99-# If the repository name does not match any of the regular expressions in this
1010-# file, the "DEFAULT" line is used, if it is specified.
1111-#
1212-# If the name "ALL" appears as a regular expression it is always used
1313-# in addition to the first matching regex or "DEFAULT".
-217
CVSROOT/syncmail
···11-#! /usr/bin/python
22-# -*- Python -*-
33-44-"""Complicated notification for CVS checkins.
55-66-This script is used to provide email notifications of changes to the CVS
77-repository. These email changes will include context diffs of the changes.
88-Really big diffs will be trimmed.
99-1010-This script is run from a CVS loginfo file (see $CVSROOT/CVSROOT/loginfo). To
1111-set this up, create a loginfo entry that looks something like this:
1212-1313- mymodule /path/to/this/script %%s some-email-addr@your.domain
1414-1515-In this example, whenever a checkin that matches `mymodule' is made, this
1616-script is invoked, which will generate the diff containing email, and send it
1717-to some-email-addr@your.domain.
1818-1919- Note: This module used to also do repository synchronizations via
2020- rsync-over-ssh, but since the repository has been moved to SourceForge,
2121- this is no longer necessary. The syncing functionality has been ripped
2222- out in the 3.0, which simplifies it considerably. Access the 2.x versions
2323- to refer to this functionality. Because of this, the script is misnamed.
2424-2525-It no longer makes sense to run this script from the command line. Doing so
2626-will only print out this usage information.
2727-2828-Usage:
2929-3030- %(PROGRAM)s [options] <%%S> email-addr [email-addr ...]
3131-3232-Where options is:
3333-3434- --cvsroot=<path>
3535-Use <path> as the environment variable CVSROOT. Otherwise this
3636- variable must exist in the environment.
3737-3838- --help
3939- -h
4040- Print this text.
4141-4242- --context=#
4343- -C #
4444- Include # lines of context around lines that differ (default: 2).
4545-4646- -c
4747- Produce a context diff (default).
4848-4949- -u
5050- Produce a unified diff (smaller, but harder to read).
5151-5252- -U user
5353- Mark diff as made by user.
5454-5555- <%%S>
5656-CVS %%s loginfo expansion. When invoked by CVS, this will be a single
5757- string containing the directory the checkin is being made in, relative
5858- to $CVSROOT, followed by the list of files that are changing. If the
5959- %%s in the loginfo file is %%{sVv}, context diffs for each of the
6060- modified files are included in any email messages that are generated.
6161-6262- email-addrs
6363- At least one email address.
6464-6565-"""
6666-6767-import os
6868-import sys
6969-import string
7070-import time
7171-import getopt
7272-7373-# Notification command
7474-MAILCMD = '/bin/mail -s "%(username)s: %(SUBJECT)s" %(PEOPLE)s 2>&1 > /dev/null'
7575-7676-# Diff trimming stuff
7777-DIFF_HEAD_LINES = 20
7878-DIFF_TAIL_LINES = 20
7979-DIFF_TRUNCATE_IF_LARGER = 1000
8080-8181-PROGRAM = sys.argv[0]
8282-8383-8484-8585-def usage(code, msg=''):
8686- print __doc__ % globals()
8787- if msg:
8888- print msg
8989- sys.exit(code)
9090-9191-9292-9393-def calculate_diff(filespec, contextlines):
9494- try:
9595- file, oldrev, newrev = string.split(filespec, ',')
9696- except ValueError:
9797- # No diff to report
9898- return '***** Bogus filespec: %s' % filespec
9999- if oldrev == 'NONE':
100100- try:
101101- if os.path.exists(file):
102102- fp = open(file)
103103- else:
104104- update_cmd = 'cvs -fn update -r %s -p %s' % (newrev, file)
105105- fp = os.popen(update_cmd)
106106- lines = fp.readlines()
107107- fp.close()
108108- lines.insert(0, '--- NEW FILE: %s ---\n' % file)
109109- except IOError, e:
110110- lines = ['***** Error reading new file: ',
111111- str(e), '\n***** file: ', file, ' cwd: ', os.getcwd()]
112112- elif newrev == 'NONE':
113113- lines = ['--- %s DELETED ---\n' % file]
114114- else:
115115- # This /has/ to happen in the background, otherwise we'll run into CVS
116116- # lock contention. What a crock.
117117- if contextlines > 0:
118118- difftype = "-C " + str(contextlines)
119119- else:
120120- difftype = "-uN"
121121- diffcmd = '/usr/bin/cvs -f diff -kk %s -b -r %s -r %s %s' % (
122122- difftype, oldrev, newrev, file)
123123- fp = os.popen(diffcmd)
124124- lines = fp.readlines()
125125- sts = fp.close()
126126- # ignore the error code, it always seems to be 1 :(
127127-## if sts:
128128-## return 'Error code %d occurred during diff\n' % (sts >> 8)
129129- if len(lines) > DIFF_TRUNCATE_IF_LARGER:
130130- removedlines = len(lines) - DIFF_HEAD_LINES - DIFF_TAIL_LINES
131131- del lines[DIFF_HEAD_LINES:-DIFF_TAIL_LINES]
132132- lines.insert(DIFF_HEAD_LINES,
133133- '[...%d lines suppressed...]\n' % removedlines)
134134- return string.join(lines, '')
135135-136136-137137-138138-def blast_mail(mailcmd, filestodiff, contextlines):
139139- # cannot wait for child process or that will cause parent to retain cvs
140140- # lock for too long. Urg!
141141- if not os.fork():
142142- # in the child
143143- # give up the lock you cvs thang!
144144- time.sleep(2)
145145- fp = os.popen(mailcmd, 'w')
146146- fp.write(sys.stdin.read())
147147- fp.write('\n')
148148- # append the diffs if available
149149- for file in filestodiff:
150150- fp.write(calculate_diff(file, contextlines))
151151- fp.write('\n')
152152- fp.close()
153153- # doesn't matter what code we return, it isn't waited on
154154- os._exit(0)
155155-156156-157157-158158-# scan args for options
159159-def main():
160160- contextlines = 2
161161- try:
162162- opts, args = getopt.getopt(sys.argv[1:], 'hC:cuU:',
163163- ['context=', 'cvsroot=', 'help'])
164164- except getopt.error, msg:
165165- usage(1, msg)
166166-167167- username = 'unknown'
168168-169169- # parse the options
170170- for opt, arg in opts:
171171- if opt in ('-h', '--help'):
172172- usage(0)
173173- elif opt == '--cvsroot':
174174- os.environ['CVSROOT'] = arg
175175- elif opt in ('-C', '--context'):
176176- contextlines = int(arg)
177177- elif opt == '-c':
178178- if contextlines <= 0:
179179- contextlines = 2
180180- elif opt == '-u':
181181- contextlines = 0
182182- elif opt == '-U':
183183- username = arg
184184-185185- # What follows is the specification containing the files that were
186186- # modified. The argument actually must be split, with the first component
187187- # containing the directory the checkin is being made in, relative to
188188- # $CVSROOT, followed by the list of files that are changing.
189189- if not args:
190190- usage(1, 'No CVS module specified')
191191- SUBJECT = args[0]
192192- specs = string.split(args[0])
193193- del args[0]
194194-195195- # The remaining args should be the email addresses
196196- if not args:
197197- usage(1, 'No recipients specified')
198198-199199- # Now do the mail command
200200- PEOPLE = string.join(args)
201201- mailcmd = MAILCMD % vars()
202202-203203- print 'Mailing %s...' % PEOPLE
204204- if specs == ['-', 'Imported', 'sources']:
205205- return
206206- if specs[-3:] == ['-', 'New', 'directory']:
207207- del specs[-3:]
208208- print 'Generating notification message...'
209209- blast_mail(mailcmd, specs[1:], contextlines)
210210- print 'Generating notification message... done.'
211211-212212-213213-214214-if __name__ == '__main__':
215215- main()
216216- sys.exit(0)
217217-
-20
CVSROOT/taginfo
···11-# The "taginfo" file is used to control pre-tag checks.
22-# The filter on the right is invoked with the following arguments:
33-#
44-# $1 -- tagname
55-# $2 -- operation "add" for tag, "mov" for tag -F, and "del" for tag -d
66-# $3 -- repository
77-# $4-> file revision [file revision ...]
88-#
99-# A non-zero exit of the filter program will cause the tag to be aborted.
1010-#
1111-# The first entry on a line is a regular expression which is tested
1212-# against the directory that the change is being committed to, relative
1313-# to the $CVSROOT. For the first match that is found, then the remainder
1414-# of the line is the name of the filter to run.
1515-#
1616-# If the repository name does not match any of the regular expressions in this
1717-# file, the "DEFAULT" line is used, if it is specified.
1818-#
1919-# If the name "ALL" appears as a regular expression it is always used
2020-# in addition to the first matching regex or "DEFAULT".
-21
CVSROOT/verifymsg
···11-# The "verifymsg" file is used to allow verification of logging
22-# information. It works best when a template (as specified in the
33-# rcsinfo file) is provided for the logging procedure. Given a
44-# template with locations for, a bug-id number, a list of people who
55-# reviewed the code before it can be checked in, and an external
66-# process to catalog the differences that were code reviewed, the
77-# following test can be applied to the code:
88-#
99-# Making sure that the entered bug-id number is correct.
1010-# Validating that the code that was reviewed is indeed the code being
1111-# checked in (using the bug-id number or a seperate review
1212-# number to identify this particular code set.).
1313-#
1414-# If any of the above test failed, then the commit would be aborted.
1515-#
1616-# Actions such as mailing a copy of the report to each reviewer are
1717-# better handled by an entry in the loginfo file.
1818-#
1919-# One thing that should be noted is the the ALL keyword is not
2020-# supported. There can be only one entry that matches a given
2121-# repository.