]> code.ossystems Code Review - openembedded-core.git/commitdiff
metadata_scm.bbclass: Make errors quiet if we're not in a git based scm
authorJoe Sauer <jsauer@vernier.com>
Tue, 8 Jun 2010 19:54:26 +0000 (20:54 +0100)
committerRichard Purdie <rpurdie@linux.intel.com>
Tue, 8 Jun 2010 19:54:26 +0000 (20:54 +0100)
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
meta/classes/metadata_scm.bbclass

index 4f66011b0d5b770603a47636ee170738b173f562..b3c06dd7f6fb32810c0f51e8c0dfc30d7d21efc2 100644 (file)
@@ -63,14 +63,14 @@ def base_get_metadata_svn_revision(path, d):
        return revision
 
 def base_get_metadata_git_branch(path, d):
-       branch = os.popen('cd %s; git branch | grep "^* " | tr -d "* "' % path).read()
+       branch = os.popen('cd %s; git branch 2>&1 | grep "^* " | tr -d "* "' % path).read()
 
        if len(branch) != 0:
                return branch
        return "<unknown>"
 
 def base_get_metadata_git_revision(path, d):
-       rev = os.popen("cd %s; git log -n 1 --pretty=oneline --" % path).read().split(" ")[0]
+       rev = os.popen("cd %s; git log -n 1 --pretty=oneline -- 2>&1" % path).read().split(" ")[0]
        if len(rev) != 0:
                return rev
        return "<unknown>"