Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
a5f194c7
Commit
a5f194c7
authored
Jul 01, 1991
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use posix.popen to read output from a command instead if command.get*.
parent
40b00bbe
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
9 deletions
+11
-9
Tools/scripts/xxci.py
Tools/scripts/xxci.py
+11
-9
No files found.
Tools/scripts/xxci.py
View file @
a5f194c7
#! /ufs/guido/bin/sgi/python
#! /usr/local/python
# xxci
...
...
@@ -57,18 +58,19 @@ def badsuffix(file):
def
go
(
args
):
for
file
in
args
:
print
file
+
':'
if
run
(
'rcsdiff -c'
,
file
):
if
differing
(
file
):
sts
=
posix
.
system
(
'rcsdiff '
+
file
)
# ignored
if
askyesno
(
'Check in '
+
file
+
' ? '
):
sts
=
run
(
'rcs -l'
,
file
)
# ignored
# can't use run() here because it's interactive
sts
=
posix
.
system
(
'rcs -l '
+
file
)
# ignored
sts
=
posix
.
system
(
'ci -l '
+
file
)
def
run
(
cmd
,
file
):
sts
,
output
=
commands
.
getstatusoutput
(
cmd
+
commands
.
mkarg
(
file
))
if
sts
:
print
output
print
'Exit status'
,
sts
return
sts
def
differing
(
file
):
try
:
this
=
open
(
file
,
'r'
).
read
()
that
=
posix
.
popen
(
'co -p '
+
file
+
' 2>/dev/null'
,
'r'
).
read
()
return
this
<>
that
except
:
return
1
def
askyesno
(
prompt
):
s
=
raw_input
(
prompt
)
...
...
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