Commit 7af6d1d5 authored by Guido van Rossum's avatar Guido van Rossum

added support for -L flag (local operation)

parent e9fb9224
"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 import string
...@@ -8,7 +14,7 @@ import string ...@@ -8,7 +14,7 @@ import string
HOST = 'voorn.cwi.nl' HOST = 'voorn.cwi.nl'
PORT = 4127 PORT = 4127
VERBOSE = 1 VERBOSE = 1
LOCAL = 0
import client import client
...@@ -25,6 +31,7 @@ def openrcsclient(opts = []): ...@@ -25,6 +31,7 @@ def openrcsclient(opts = []):
host = HOST host = HOST
port = PORT port = PORT
verbose = VERBOSE verbose = VERBOSE
local = LOCAL
directory = None directory = None
for o, a in opts: for o, a in opts:
if o == '-h': if o == '-h':
...@@ -42,9 +49,14 @@ def openrcsclient(opts = []): ...@@ -42,9 +49,14 @@ def openrcsclient(opts = []):
verbose = verbose + 1 verbose = verbose + 1
if o == '-q': if o == '-q':
verbose = 0 verbose = 0
address = (host, port) if o == '-L':
# XXX For local operation, instantiate RCSProxy.RCSProxyLocal() here local = 1
x = RCSProxyClient(address, verbose) if local:
import RCSProxy
x = RCSProxy.RCSProxyLocal()
else:
address = (host, port)
x = RCSProxyClient(address, verbose)
if not directory: if not directory:
try: try:
directory = open("CVS/Repository").readline() directory = open("CVS/Repository").readline()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment