diff options
author | Markus Lehtonen <markus.lehtonen@linux.intel.com> | 2016-05-16 14:23:43 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-08-25 23:03:46 +0100 |
commit | 6cf74643e9b563c6384a0d23e172c8ea294b7210 (patch) | |
tree | f5eead3bc7aee890f599dddb8ab2f83dcb9551f5 /meta/lib/oeqa/utils/git.py | |
parent | 7fcc9f5ead9d82067b27facf1b47a490b93489c7 (diff) | |
download | poky-6cf74643e9b563c6384a0d23e172c8ea294b7210.tar.gz |
oeqa.utils.git: introduce GitRepo.rev_parse()
(From OE-Core rev: 55726e931536ed0cbd7b80588060b05a3145c934)
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/utils/git.py')
-rw-r--r-- | meta/lib/oeqa/utils/git.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/meta/lib/oeqa/utils/git.py b/meta/lib/oeqa/utils/git.py index 6a2987fbe8..647465467d 100644 --- a/meta/lib/oeqa/utils/git.py +++ b/meta/lib/oeqa/utils/git.py | |||
@@ -38,5 +38,12 @@ class GitRepo(object): | |||
38 | env.update(env_update) | 38 | env.update(env_update) |
39 | return self._run_git_cmd_at(git_args, self.top_dir, env=env) | 39 | return self._run_git_cmd_at(git_args, self.top_dir, env=env) |
40 | 40 | ||
41 | def rev_parse(self, revision): | ||
42 | """Do git rev-parse""" | ||
43 | try: | ||
44 | return self.run_cmd(['rev-parse', revision]) | ||
45 | except GitError: | ||
46 | # Revision does not exist | ||
47 | return None | ||
41 | 48 | ||
42 | 49 | ||