def up(self): retcode = self.run('bzr', 'revert')[0] if retcode != 0: raise BuildException( ("Failed to get code from '%s' (bzr revert): %s" % (self.repo_url, retcode))) up_output = self.run('bzr', 'up') if up_output[0] != 0: raise BuildException(("Failed to get code from '%s' (bzr up): %s" % (self.repo_url, retcode))) return up_output
def pull(self): pull_output = self.run('hg', 'pull') if pull_output[0] != 0: raise BuildException( ("Failed to get code from '%s' (hg pull): %s" % (self.repo_url, pull_output[0])) ) update_output = self.run('hg', 'update', '-C')[0] if update_output[0] != 0: raise BuildException( ("Failed to get code from '%s' (hg update): %s" % (self.repo_url, pull_output[0])) ) return update_output
def up(self): retcode = self.run('svn', 'revert', '--recursive', '.')[0] if retcode != 0: raise BuildException( ("Failed to get code from '%s' (svn revert): %s" % (self.repo_url, retcode)) ) retcode, out, err = self.run('svn', 'up', '--accept', 'theirs-full', '--trust-server-cert', '--non-interactive') if retcode != 0: raise BuildException( "Failed to get code from '%s' (svn up): %s" % (self.repo_url, retcode) ) return retcode, out, err
def clone(self): code, out, err = run('git clone --recursive --quiet %s .' % self.repo_url) if code != 0: raise BuildException( "Failed to get code from '%s' (git clone): %s" % (self.repo_url, code))
def clone(self): self.make_clean_working_dir() retcode = self.run('bzr', 'checkout', self.repo_url, '.')[0] if retcode != 0: raise BuildException( ("Failed to get code from '%s' (bzr checkout): %s" % (self.repo_url, retcode)))
def clone(self): self.make_clean_working_dir() output = self.run('hg', 'clone', self.repo_url, '.') if output[0] != 0: raise BuildException( ("Failed to get code from '%s' (hg clone): %s" % (self.repo_url, output[0])) ) return output
def co(self, identifier=None): self.make_clean_working_dir() if identifier: url = self.base_url + identifier else: url = self.repo_url retcode, out, err = self.run('svn', 'checkout', '--quiet', url, '.') if retcode != 0: raise BuildException( "Failed to get code from '%s' (svn checkout): %s" % (url, retcode) ) return retcode, out, err
def conf_file(self): files = self.find('conf.py') if not files: files = self.full_find('conf.py') if len(files) == 1: return files[0] elif len(files) > 1: for file in files: if file.find('doc', 70) != -1: return file else: # Having this be translatable causes this odd error: # ProjectImportError(<django.utils.functional.__proxy__ object at # 0x1090cded0>,) raise BuildException( u"Conf File Missing. Please make sure you have a conf.py in your project." )
def fetch(self): code, out, err = run('git fetch --prune') if code != 0: raise BuildException( "Failed to get code from '%s' (git fetch): %s\n\nStderr:\n\n%s\n\n" % (self.repo_url, code, err))