Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/devbot/utils.py
diff options
context:
space:
mode:
authorDaniel Narvaez <dwnarvaez@gmail.com>2012-12-25 02:34:09 (GMT)
committer Daniel Narvaez <dwnarvaez@gmail.com>2012-12-25 02:34:09 (GMT)
commit0d0a7194226215703c5536fdae4993a4d4a81816 (patch)
tree10de369d72784edccaab9a34f7eb28911288c9ee /devbot/utils.py
parentd450954d31df8d22c96ccd76d6af1d983266a2d4 (diff)
Refactor to put get_commit_id in the git module
Diffstat (limited to 'devbot/utils.py')
-rw-r--r--devbot/utils.py17
1 files changed, 0 insertions, 17 deletions
diff --git a/devbot/utils.py b/devbot/utils.py
index 2864948..aed5de0 100644
--- a/devbot/utils.py
+++ b/devbot/utils.py
@@ -1,18 +1 @@
-import os
-import subprocess
-
devnull = open("/dev/null", "w")
-
-def get_commit_id(dir):
- orig_cwd = os.getcwd()
- os.chdir(dir)
-
- try:
- commit_id = subprocess.check_output(["git", "rev-parse", "HEAD"],
- stderr=devnull).strip()
- except subprocess.CalledProcessError:
- commit_id = None
-
- os.chdir(orig_cwd)
-
- return commit_id