summaryrefslogtreecommitdiffstats
path: root/Demo
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1995-07-18 18:40:41 (GMT)
committerGuido van Rossum <guido@python.org>1995-07-18 18:40:41 (GMT)
commitff99a72f53ca1007403e1bf3fcc2c6800370119b (patch)
tree59582002c713cc0ed4bc42055414c182d0a3d10d /Demo
parentec9ea611d26733639de2255561773aebf017cab8 (diff)
downloadcpython-ff99a72f53ca1007403e1bf3fcc2c6800370119b.zip
cpython-ff99a72f53ca1007403e1bf3fcc2c6800370119b.tar.gz
cpython-ff99a72f53ca1007403e1bf3fcc2c6800370119b.tar.bz2
change obsolete isfile to isvalid; add lock and unlock commands
Diffstat (limited to 'Demo')
-rwxr-xr-xDemo/pdist/rrcs.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/Demo/pdist/rrcs.py b/Demo/pdist/rrcs.py
index abd6ade..4f04198 100755
--- a/Demo/pdist/rrcs.py
+++ b/Demo/pdist/rrcs.py
@@ -48,7 +48,7 @@ def checkin(x, copts, fn):
f = open(fn)
data = f.read()
f.close()
- new = not x.isfile(fn)
+ new = not x.isvalid(fn)
if not new and same(x, copts, fn, data):
print "%s: unchanged since last checkin" % fn
return
@@ -64,6 +64,12 @@ def checkout(x, copts, fn):
f.write(data)
f.close()
+def lock(x, copts, fn):
+ x.lock(fn)
+
+def unlock(x, copts, fn):
+ x.unlock(fn)
+
def info(x, copts, fn):
dict = x.info(fn)
keys = dict.keys()
@@ -77,7 +83,7 @@ def head(x, copts, fn):
print fn, head
def list(x, copts, fn):
- if x.isfile(fn):
+ if x.isvalid(fn):
print fn
def log(x, copts, fn):
@@ -148,6 +154,8 @@ commands = {
'info': ('', info),
'head': ('', head),
'list': ('', list),
+ 'lock': ('', lock),
+ 'unlock': ('', unlock),
'log': ('bhLRtd:l:r:s:w:V:', log),
'diff': ('c', diff),
}