def __init__(self): ''' Constructor ''' cl = pysvn.Client() self.client = cl self.client.callback_get_login = self.get_login self.__parser = configuration(os.path.normpath(os.path.join(os.path.dirname(__file__),'../conf/lia.ini'))) self.workspace = self.__parser.Global.workspace
def __init__(self): cliente = clienteLog() self.Logger = cliente.InicializaLogConsole() self.Configuration = configuration(self.Logger) self.MainProcess()
def get_login(self, realm, username, may_save): c = configuration('/tmp/lia/subversion.ini') return True, c.Account.username, c.Account.password, True
def checkout(self, path, repository): self.client.checkout(path, os.path.join(self.workspace, repository)); return os.path.join(self.workspace, repository); def info(self, path): o = self.client.info(path) for i in o: if i.find("time") >= 0: print i, ":", time.ctime(o[i]) elif i.find("revision") >= 0: print i, ":", o[i].number else: print i, ":", o[i] if __name__ == '__main__': c = configuration('/tmp/lia/subversion.ini') svn = subversion() path = svn.checkout(c.SVNPath.https2, 'test4') for root, dirs, files in os.walk(path): for f in files: if os.path.isdir(os.path.join(root, f)): print os.path.join(root, f) elif re.search(".svn", os.path.join(root, f)) != None: print os.path.join(root, f) else: print os.path.join(root,f) svn.info(os.path.join(root, f))