'Add an entry in the hgweb.config file for a new repository.'

def add_entry(self, lhs, rhs):

    lock = threading.Lock()
    lock.acquire(True)
    try:
        self.read_config(force_read=True)
        if rhs.startswith('./'):
            rhs = rhs.replace('./', '', 1)
        self.make_backup()
        self.in_memory_config.set('paths', lhs, rhs)
        self.write_config()
    except Exception as e:
        log.debug(('Exception    in    HgWebConfigManager.add_entry():    %s' % str(e)))
    finally:
        lock.release()
