Example #1
0
File: git.py Project: konker/pyvcs
    def push(self, remote='origin', branch='master'):
        cmd = "%s push --porcelain %s %s" % (GIT, remote, branch)
        stdout,stderr = exec_cmd(cmd, self.repo_directory)
        if ('[rejected]' in stdout or 'fatal' in stderr):
            return NOT_OK,stderr

        return OK,stdout
Example #2
0
File: git.py Project: konker/pyvcs
    def pull(self, remote='origin', branch='master'):
        cmd = "%s pull %s %s" % (GIT, remote, branch)
        stdout,stderr = exec_cmd(cmd, self.repo_directory)
        if ('conflict' in stdout):
            return NOT_OK,stdout

        return OK,stdout
Example #3
0
File: git.py Project: konker/pyvcs
    def commit_all(self, message):
        cmd = "%s commit --all -m \"%s\"" % (GIT, message)
        stdout,stderr =  exec_cmd(cmd, self.repo_directory)
        if (stderr != ''):
            return NOT_OK,stderr

        return OK,stdout
Example #4
0
File: git.py Project: konker/pyvcs
    def add(self, filename='.'):
        cmd = "%s add %s" % (GIT, filename)
        stdout,stderr =  exec_cmd(cmd, self.repo_directory)
        if (stderr != ''):
            return NOT_OK,stderr

        return OK,stdout
Example #5
0
File: git.py Project: konker/pyvcs
 def diff(self):
     cmd = "%s diff --porcelain" % GIT
     stdout,stderr = exec_cmd(cmd, self.repo_directory)
     return self._parse_diff(stdout, stderr)
Example #6
0
File: git.py Project: konker/pyvcs
 def status(self):
     cmd = "%s status --porcelain -uall" % GIT
     stdout,stderr = exec_cmd(cmd, self.repo_directory)
     return self._parse_status(stdout, stderr)