mirror of https://github.com/python/cpython.git
added support for -L flag (local operation)
This commit is contained in:
parent
2ba1b4c5f2
commit
464f62b6c0
|
@ -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
|
import string
|
||||||
|
|
||||||
|
@ -8,7 +14,7 @@
|
||||||
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 = []):
|
||||||
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 = []):
|
||||||
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()
|
||||||
|
|
Loading…
Reference in New Issue