예제 #1
0
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!'
예제 #2
0
    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())
예제 #3
0
    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())
예제 #4
0
    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))
예제 #5
0
 def update(self):
     tree = CVS.tree(self.local_path)
     tree.update()
예제 #6
0
 def commit(self):
     tree = CVS.tree(self.local_path)
     tree.commit(log='Log message')
예제 #7
0
 def checkout(self):
     repository = CVS.Repository(self.root, None)
     repository.get(self.module, self.local_path)
예제 #8
0
 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)
예제 #9
0
 def update(self):
     tree = CVS.tree(self.local_path)
     tree.update()
예제 #10
0
 def commit(self):
     tree = CVS.tree(self.local_path)
     tree.commit(log='Log message')
예제 #11
0
 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)