+++ /dev/null
-"""Customize this file to change the default client etc.\r
-\r
-(In general, it is probably be better to make local operation the\r
-default and to require something like an RCSSERVER environment\r
-variable to enable remote operation.)\r
-\r
-"""\r
-\r
-import string\r
-import os\r
-\r
-# These defaults don't belong here -- they should be taken from the\r
-# environment or from a hidden file in the current directory\r
-\r
-HOST = 'voorn.cwi.nl'\r
-PORT = 4127\r
-VERBOSE = 1\r
-LOCAL = 0\r
-\r
-import client\r
-\r
-\r
-class RCSProxyClient(client.SecureClient):\r
-\r
- def __init__(self, address, verbose = client.VERBOSE):\r
- client.SecureClient.__init__(self, address, verbose)\r
-\r
-\r
-def openrcsclient(opts = []):\r
- "open an RCSProxy client based on a list of options returned by getopt"\r
- import RCSProxy\r
- host = HOST\r
- port = PORT\r
- verbose = VERBOSE\r
- local = LOCAL\r
- directory = None\r
- for o, a in opts:\r
- if o == '-h':\r
- host = a\r
- if ':' in host:\r
- i = string.find(host, ':')\r
- host, p = host[:i], host[i+1:]\r
- if p:\r
- port = string.atoi(p)\r
- if o == '-p':\r
- port = string.atoi(a)\r
- if o == '-d':\r
- directory = a\r
- if o == '-v':\r
- verbose = verbose + 1\r
- if o == '-q':\r
- verbose = 0\r
- if o == '-L':\r
- local = 1\r
- if local:\r
- import RCSProxy\r
- x = RCSProxy.RCSProxyLocal()\r
- else:\r
- address = (host, port)\r
- x = RCSProxyClient(address, verbose)\r
- if not directory:\r
- try:\r
- directory = open(os.path.join("CVS", "Repository")).readline()\r
- except IOError:\r
- pass\r
- else:\r
- if directory[-1] == '\n':\r
- directory = directory[:-1]\r
- if directory:\r
- x.cd(directory)\r
- return x\r