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
Kirill Smelkov
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
...
@@ -22,23 +22,30 @@ import re
# In file filename, replace the first occurrence of regexp pat with
# In file filename, replace the first occurrence of regexp pat with
# string repl.
# string repl.
def
replace
(
filename
,
pat
,
repl
):
def
replace
(
filename
,
pat
,
repl
):
from
sys
import
stderr
as
e
# fileinput hijacks sys.stdout
foundone
=
False
foundone
=
False
for
line
in
fileinput
.
input
([
filename
],
inplace
=
True
,
backup
=
"~"
):
for
line
in
fileinput
.
input
([
filename
],
inplace
=
True
,
backup
=
"~"
):
if
foundone
:
if
foundone
:
print
line
,
print
line
,
else
:
else
:
new
=
re
.
sub
(
pat
,
repl
,
line
)
match
=
re
.
search
(
pat
,
line
)
if
new
!=
li
ne
:
if
match
is
not
No
ne
:
foundone
=
True
foundone
=
True
print
"In %r, replaced:"
%
filename
print
" "
,
line
new
=
re
.
sub
(
pat
,
repl
,
line
)
print
"by:"
print
" "
,
new
print
new
,
print
new
,
print
>>
e
,
"In %r, replaced:"
%
filename
print
>>
e
,
" "
,
line
print
>>
e
,
"by:"
print
>>
e
,
" "
,
new
else
:
print
line
,
if
not
foundone
:
if
not
foundone
:
print
"*"
*
60
,
"Oops!"
print
>>
e
,
"*"
*
60
,
"Oops!"
print
" Failed to find %r in %r"
%
(
pat
,
filename
)
print
>>
e
,
" Failed to find %r in %r"
%
(
pat
,
filename
)
def
compute_zeoversion
(
version
):
def
compute_zeoversion
(
version
):
# ZEO version's trail ZODB versions by one full revision.
# ZEO version's trail ZODB versions by one full revision.
...
@@ -69,7 +76,9 @@ def main(args):
...
@@ -69,7 +76,9 @@ def main(args):
replace
(
"NEWS.txt"
,
replace
(
"NEWS.txt"
,
r"^Release date: .*"
,
r"^Release date: .*"
,
"Release date: %s"
%
date
)
"Release date: %s"
%
date
)
replace
(
"doc/guide/zodb.tex"
,
r"\\release{\
S+}
",
r"
\
release
{
%
s
}
" % version)
if __name__ == "
__main__
":
if __name__ == "
__main__
":
import sys
import sys
main(sys.argv[1:])
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