Esempio n. 1
0
 def run(self):
     conduit = Conduit()
     conduit.fetch(limit=self.options.limit,
                   quiet=self.options.quiet,
                   verbose=self.options.verbose,
                   authors=self.options.authors,
                   stop_on_unknown_author=\
                       self.options.stop_on_unknown_author)
Esempio n. 2
0
    def run(self):
        conduit = Conduit()
        conduit.pull(limit=self.options.limit,
                     quiet=self.options.quiet,
                     verbose=self.options.verbose,
                     authors=self.options.authors,
                     stop_on_unknown_author=\
                         self.options.stop_on_unknown_author)

        # Optionally verify the new HEAD revision and work tree
        # against a fresh CVS checkout.
        if self.options.verify:
            Verify().eval()
Esempio n. 3
0
    def run(self):
        if os.path.exists(self.directory):
            self.fatal(_("destination path '%s' already exists") % \
                       self.directory)

        conduit = Conduit(self.directory)
        conduit.init(self.repository,
                     bare=self.options.bare,
                     domain=self.options.domain,
                     quiet=self.options.quiet)
        try:
            conduit.fetch(limit=self.options.limit,
                          quiet=self.options.quiet,
                          verbose=self.options.verbose,
                          flush=self.options.no_skip_latest,
                          authors=self.options.authors,
                          stop_on_unknown_author=\
                              self.options.stop_on_unknown_author)

            git = conduit.git

            if not self.options.no_repack:
                git.check_command('repack', '-adF')

            head_branch = git.symbolic_ref('HEAD')
            if head_branch == 'refs/heads/master':
                if self.options.bare:
                    git.check_command('branch', '-f', 'master', conduit.branch)
                else:
                    git.check_command('reset', '-q', '--hard', conduit.branch)
        except:
            shutil.rmtree(self.directory)
            raise

        # Verify after the above rmtree, because someone likely wants
        # to inspect the repository if the verification fails.
        if self.options.verify:
            try:
                olddir = os.getcwd()
                os.chdir(git.git_work_tree)
                Verify().eval()
            finally:
                os.chdir(olddir)
Esempio n. 4
0
 def run(self):
     cvs = Conduit().cvs
     for change in cvs.changes():
         print change
Esempio n. 5
0
 def run(self):
     conduit = Conduit(self.directory)
     conduit.init(self.repository,
                  domain=self.options.domain,
                  bare=self.options.bare,
                  quiet=self.options.quiet)