File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ #! /ufs/guido/bin/sgi/python
12#! /usr/local/python
23
34# xxci
@@ -57,18 +58,19 @@ def badsuffix(file):
5758def go (args ):
5859 for file in args :
5960 print file + ':'
60- if run ('rcsdiff -c' , file ):
61+ if differing (file ):
62+ sts = posix .system ('rcsdiff ' + file ) # ignored
6163 if askyesno ('Check in ' + file + ' ? ' ):
62- sts = run ('rcs -l' , file ) # ignored
63- # can't use run() here because it's interactive
64+ sts = posix .system ('rcs -l ' + file ) # ignored
6465 sts = posix .system ('ci -l ' + file )
6566
66- def run (cmd , file ):
67- sts , output = commands .getstatusoutput (cmd + commands .mkarg (file ))
68- if sts :
69- print output
70- print 'Exit status' , sts
71- return sts
67+ def differing (file ):
68+ try :
69+ this = open (file , 'r' ).read ()
70+ that = posix .popen ('co -p ' + file + ' 2>/dev/null' , 'r' ).read ()
71+ return this <> that
72+ except :
73+ return 1
7274
7375def askyesno (prompt ):
7476 s = raw_input (prompt )
You can’t perform that action at this time.
0 commit comments