def make(): ca = raw_input('Insira o CA: ') nome = raw_input('Insira o Nome: ') canome = ca+'-'+nome pacote = canome.upper() builder.build(pacote) full_path = builder.get_full_path(pacote) rep = CVS.get_dir() f = open(os.path.abspath(os.curdir)+os.sep+'CA.txt') for i in f: lista = i.split(' - Versão ') ver = lista[-1].replace(' ', '') if len(lista) > 1: dirs_o = str(lista[0]).split(os.sep) dirs = str(lista[0]).split(dirs_o[-1]) b = CVS.update(dirs[0], dirs_o[-1], ver, full_path, True) if b: print 'OK' move_files(rep, full_path, dirs[0], dirs_o[-1]) b = CVS.update(dirs[0], dirs_o[-1], ver, full_path, False) else: print 'Repositório atualizado!'
def createRepository(self, path): """Create a CVS repository at `path`. :param path: The local path to create a repository in. :return: A CVS.Repository`. """ return CVS.init(path, BufferLogger())
def _runToBaz(self, source_dir, flags, revisions, bazpath): """Actually run the CSCVS utility that imports revisions. :param source_dir: The directory containing the foreign working tree that we are importing from. :param flags: Flags to pass to `totla.totla`. :param revisions: The revisions to import. :param bazpath: The directory containing the Bazaar working tree that we are importing into. """ # XXX: JonathanLange 2008-02-08: We need better documentation for # `flags` and `revisions`. config = CVS.Config(source_dir) config.args = ["--strict", "-b", bazpath, flags, revisions, bazpath] totla.totla(config, self._logger, config.args, SCM.tree(source_dir))
def update(self): tree = CVS.tree(self.local_path) tree.update()
def commit(self): tree = CVS.tree(self.local_path) tree.commit(log='Log message')
def checkout(self): repository = CVS.Repository(self.root, None) repository.get(self.module, self.local_path)
def assertHasCheckout(self, cvs_working_tree): """Assert that `cvs_working_tree` has a checkout of its CVS module.""" tree = CVS.tree(os.path.abspath(cvs_working_tree.local_path)) repository = tree.repository() self.assertEqual(repository.root, cvs_working_tree.root) self.assertEqual(tree.module().name(), cvs_working_tree.module)