4:2
     """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 os

# These defaults don't belong here -- they should be taken from the
# environment or from a hidden file in the current directory

HOST = 'voorn.cwi.nl'
PORT = 4127
VERBOSE = 1
LOCAL = 0

import client


class RCSProxyClient(client.SecureClient):

    def __init__(self, address, verbose = client.VERBOSE):
        client.SecureClient.__init__(self, address, verbose)


def openrcsclient(opts = []):
    "open an RCSProxy client based on a list of options returned by getopt"
    import RCSProxy
    host = HOST
    port = PORT
    verbose = VERBOSE
    local = LOCAL
    directory = None
    for o, a in opts:
        if o == '-h':
            host = a
            if ':' in host:
                i = string.find(host, ':')
                host, p = host[:i], host[i+1:]
                if p:
                    port = string.atoi(p)
        if o == '-p':
            port = string.atoi(a)
        if o == '-d':
            directory = a
        if o == '-v':
            verbose = verbose + 1
        if o == '-q':
            verbose = 0
        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(os.path.join("CVS", "Repository")).readline()
        except IOError:
            pass
        else:
            if directory[-1] == '\n':
                directory = directory[:-1]
    if directory:
        x.cd(directory)
    return x
  "   ˆl–ß=¿Jå!¶e	A
ãm\e¥1hßÂƒy§ÁÀ !    ó
!`Nc           @   sz   d  Z  d d l Z d d l Z d d l Z d d l Z d d l Z d d l Z d d l Z d e j	 j
 f d „  ƒ  YZ d S(   s   DNS Dynamic Update SupportiÿÿÿÿNt   Updatec           B   s€   e  Z e j j d
 d
 e j j d  „ Z d
 d
 d „ Z	 d „  Z
 d „  Z d „  Z d „  Z d „  Z d
 d „ Z d
 d d	 „ Z RS(   c      	   C   së   t  t |  ƒ j ƒ  |  j t j j t j j ƒ O_ t | t	 t
 f ƒ r^ t j j | ƒ } n  | |  _ t | t	 ƒ r‹ t j j | ƒ } n  | |  _ |  j |  j |  j | t j j d t d t ƒ| d k	 rç |  j | | d | ƒn  d S(   sä  Initialize a new DNS Update object.

        @param zone: The zone which is being updated.
        @type zone: A dns.name.Name or string
        @param rdclass: The class of the zone; defaults to dns.rdataclass.IN.
        @type rdclass: An int designating the class, or a string whose value
        is the name of a class.
        @param keyring: The TSIG keyring to use; defaults to None.
        @type keyring: dict
        @param keyname: The name of the TSIG key to use; defaults to None.
        The key must be defined in the keyring.  If a keyring is specified
        but a keyname is not, then the key used will be the first key in the
        keyring.  Note that the order of keys in a dictionary is not defined,
        so applications should supply a keyname when a keyring is used, unless
        they know the keyring contains only one key.
        @type keyname: dns.name.Name or string
        @param keyalgorithm: The TSIG algorithm to use; defaults to
        dns.tsig.default_algorithm.  Constants for TSIG algorithms are defined
        in dns.tsig, and the currently implemented algorithms are
        HMAC_MD5, HMAC_SHA1, HMAC_SHA224, HMAC_SHA256, HMAC_SHA384, and
        HMAC_SHA512.
        @type keyalgorithm: string
        t   createt   force_uniquet	   algorithmN(   t   superR    t   __init__t   flagst   dnst   opcodet   to_flagst   UPDATEt
   isinstancet   strt   unicodet   namet	   from_textt   origint
   rdataclasst   zone_rdclasst
   find_rrsett   questiont	   rdatatypet   SOAt   Truet   Nonet   use_tsig(   t   selft   zonet   rdclasst 