summaryrefslogtreecommitdiffstats
path: root/Demo
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1995-06-23 22:41:34 (GMT)
committerGuido van Rossum <guido@python.org>1995-06-23 22:41:34 (GMT)
commit464f62b6c036651a6d64fc0861998924078d6132 (patch)
treeec5bb1231d55f38b5946b4cafaa9398bbb6f1454 /Demo
parent2ba1b4c5f2284c475aeaa7062a81505f5e5b7132 (diff)
downloadcpython-464f62b6c036651a6d64fc0861998924078d6132.zip
cpython-464f62b6c036651a6d64fc0861998924078d6132.tar.gz
cpython-464f62b6c036651a6d64fc0861998924078d6132.tar.bz2
added support for -L flag (local operation)
Diffstat (limited to 'Demo')
-rwxr-xr-xDemo/pdist/rcsclient.py22
1 files changed, 17 insertions, 5 deletions
diff --git a/Demo/pdist/rcsclient.py b/Demo/pdist/rcsclient.py
index eb09bce..983aad1 100755
--- a/Demo/pdist/rcsclient.py
+++ b/Demo/pdist/rcsclient.py
@@ -1,4 +1,10 @@
-"Customize this file to change the default client etc."
+"""Customize this file to change the default client etc.
+
+(In general, it is probably be better to make local operation the
+default and to require something like an RCSSERVER environment
+variable to enable remote operation.)
+
+"""
import string
@@ -8,7 +14,7 @@ import string
HOST = 'voorn.cwi.nl'
PORT = 4127
VERBOSE = 1
-
+LOCAL = 0
import client
@@ -25,6 +31,7 @@ def openrcsclient(opts = []):
host = HOST
port = PORT
verbose = VERBOSE
+ local = LOCAL
directory = None
for o, a in opts:
if o == '-h':
@@ -42,9 +49,14 @@ def openrcsclient(opts = []):
verbose = verbose + 1
if o == '-q':
verbose = 0
- address = (host, port)
- # XXX For local operation, instantiate RCSProxy.RCSProxyLocal() here
- x = RCSProxyClient(address, verbose)
+ if o == '-L':
+ local = 1
+ if local:
+ import RCSProxy
+ x = RCSProxy.RCSProxyLocal()
+ else:
+ address = (host, port)
+ x = RCSProxyClient(address, verbose)
if not directory:
try:
directory = open("CVS/Repository").readline()