Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
ZODB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
ZODB
Commits
fc681dea
Commit
fc681dea
authored
Jun 03, 2004
by
Tim Peters
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add zodb.tex to the files altered.
In replace(), print feedback to stderr, since fileinput hijacks stdout.
parent
9fd34bd2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
10 deletions
+19
-10
release.py
release.py
+19
-10
No files found.
release.py
View file @
fc681dea
...
...
@@ -22,23 +22,30 @@ import re
# In file filename, replace the first occurrence of regexp pat with
# string repl.
def
replace
(
filename
,
pat
,
repl
):
from
sys
import
stderr
as
e
# fileinput hijacks sys.stdout
foundone
=
False
for
line
in
fileinput
.
input
([
filename
],
inplace
=
True
,
backup
=
"~"
):
if
foundone
:
print
line
,
else
:
new
=
re
.
sub
(
pat
,
repl
,
line
)
if
new
!=
li
ne
:
match
=
re
.
search
(
pat
,
line
)
if
match
is
not
No
ne
:
foundone
=
True
print
"In %r, replaced:"
%
filename
print
" "
,
line
print
"by:"
print
" "
,
new
new
=
re
.
sub
(
pat
,
repl
,
line
)
print
new
,
print
>>
e
,
"In %r, replaced:"
%
filename
print
>>
e
,
" "
,
line
print
>>
e
,
"by:"
print
>>
e
,
" "
,
new
else
:
print
line
,
if
not
foundone
:
print
"*"
*
60
,
"Oops!"
print
" Failed to find %r in %r"
%
(
pat
,
filename
)
print
>>
e
,
"*"
*
60
,
"Oops!"
print
>>
e
,
" Failed to find %r in %r"
%
(
pat
,
filename
)
def
compute_zeoversion
(
version
):
# ZEO version's trail ZODB versions by one full revision.
...
...
@@ -69,7 +76,9 @@ def main(args):
replace
(
"NEWS.txt"
,
r"^Release date: .*"
,
"Release date: %s"
%
date
)
replace
(
"doc/guide/zodb.tex"
,
r"\\release{\
S+}
",
r"
\
release
{
%
s
}
" % version)
if __name__ == "
__main__
":
import sys
main(sys.argv[1:])
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment