Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/devbot/git.py
diff options
context:
space:
mode:
authorDaniel Narvaez <dwnarvaez@gmail.com>2012-12-28 16:21:36 (GMT)
committer Daniel Narvaez <dwnarvaez@gmail.com>2012-12-28 16:21:36 (GMT)
commit542477741abe0135c652a78911a0eb9aec9b1a19 (patch)
treefc47abcaeadd22293b8a4782a798d12cc8185727 /devbot/git.py
parent23e0efc9099005c2b789c84a4578624ba2033de3 (diff)
Change how we decide if system check is required
Using mtime will work even if you make local changes and it's less code.
Diffstat (limited to 'devbot/git.py')
-rw-r--r--devbot/git.py27
1 files changed, 0 insertions, 27 deletions
diff --git a/devbot/git.py b/devbot/git.py
index 29365f7..cb361ef 100644
--- a/devbot/git.py
+++ b/devbot/git.py
@@ -2,11 +2,8 @@ import os
import subprocess
from devbot import command
-from devbot import utils
from devbot import config
-_root_path = None
-
def _chdir(func):
def wrapped(*args, **kwargs):
@@ -78,13 +75,6 @@ class Module:
return subprocess.check_output(["git", "describe"]).strip()
@_chdir
- def is_valid(self):
- result = subprocess.call(["git", "rev-parse", "HEAD"],
- stdout=utils.devnull,
- stderr=utils.devnull)
- return result == 0
-
- @_chdir
def get_commit_id(self):
return subprocess.check_output(["git", "rev-parse", "HEAD"]).strip()
@@ -120,11 +110,6 @@ class Module:
return True
-def set_root_path(path):
- global _root_path
- _root_path = path
-
-
def get_module(module):
return Module(path=config.get_source_dir(),
name=module.name,
@@ -132,15 +117,3 @@ def get_module(module):
branch=module.branch,
tag=module.tag,
retry=10)
-
-
-def get_root_module():
- remote = "git://git.sugarlabs.org/sugar-build/sugar-build.git"
-
- module = Module(name=os.path.basename(_root_path),
- remote=remote,
- path=os.path.dirname(_root_path))
- if not module.is_valid():
- return None
-
- return module