blob: b915b1725f35fc93c9e3fb89d452423c177c25c9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
#!/usr/local/bin/python
#
# rcsbump,v 1.2 1995/06/22 21:27:27 bwarsaw Exp
#
# Python script for bumping up an RCS major revision number.
import regex
import rcslib
import string
WITHLOCK = 1
majorrev_re = regex.compile('^[0-9]+')
dir = rcslib.RCSDirectory()
for file in dir.listfiles():
# get the major revnumber of the file
headbranch = dir.info(file)['head']
majorrev_re.match(headbranch)
majorrev = string.atoi(majorrev_re.group(0)) + 1
if not dir.islocked(file):
dir.get(file, WITHLOCK)
msg = "Bumping major revision number (to %d)" % majorrev
dir.put((file, "%s.0" % majorrev), msg, "-f")
|