Did I find the right examples for you? yes no

All Samples(18)  |  Call(14)  |  Derive(0)  |  Import(4)

            def inner(command, *args, **kwargs):
        repo = kwargs.pop("repo", None)
        if kwargs:
            raise TypeError, kwargs

        args = list(args)

        proc_kwargs = {}
        if repo is not None:
            proc_kwargs["cwd"] = repo

        command_line = [bin_name, command] + args
        print " ".join(command_line)
        try:
            return subprocess.check_output(command_line, **proc_kwargs)
        except subprocess.CalledProcessError as e:
            print proc_kwargs
            print e.output
            raise
        


src/w/p/wptrunner-0.2.5/wptrunner/update.py   wptrunner(Download)
 
import vcs
from vcs import git, hg
manifest = None
import metadata
    def update(self):
        if not os.path.exists(self.repo_path):
            os.makedirs(self.repo_path)
        if not vcs.is_git_root(self.repo_path):
            git("clone", self.remote_url, ".", repo=self.repo_path)
            git("checkout", "-b", self.local_branch, self.target_rev, repo=self.repo_path)
            assert vcs.is_git_root(self.repo_path)
        else:
            if git("status", "--porcelain", repo=self.repo_path):
                raise RepositoryError("Repository in %s not clean" % self.repo_path)
 
            git("fetch",
                self.remote_url,
                "%s:%s" % (self.target_rev,

src/w/p/wptrunner-0.2.5/wptrunner/metadata.py   wptrunner(Download)
import wpttest
import expected
from vcs import git
import manifestupdate
import expected
def paths_changed(rev_old, rev_new, repo):
    data = git("diff", "--name-status", rev_range(rev_old, rev_new), repo=repo)
    lines = [tuple(item.strip() for item in line.strip().split("\t", 1))
             for line in data.split("\n") if line.strip()]
    output = set(lines)