diff options
author | Daniel Narvaez <dwnarvaez@gmail.com> | 2012-12-26 11:25:03 (GMT) |
---|---|---|
committer | Daniel Narvaez <dwnarvaez@gmail.com> | 2012-12-26 11:25:03 (GMT) |
commit | d23a83060ddad0b6da5504d8cb5d524891ad9631 (patch) | |
tree | be881c67835922bc9d1c23276047b2f0241679c1 /devbot/git.py | |
parent | bc6035454c6138d0974173900e50e33793b2e5d0 (diff) |
pep8ize
Diffstat (limited to 'devbot/git.py')
-rw-r--r-- | devbot/git.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/devbot/git.py b/devbot/git.py index 4a86bd6..4e7d86c 100644 --- a/devbot/git.py +++ b/devbot/git.py @@ -6,6 +6,7 @@ from devbot import utils _root_path = None + def _chdir(func): def wrapped(*args, **kwargs): orig_cwd = os.getcwd() @@ -18,6 +19,7 @@ def _chdir(func): return wrapped + class Module: def __init__(self, path=None, name=None, remote=None, branch="master", tag=None, retry=10): @@ -43,7 +45,7 @@ class Module: if self.tag: command.run(["git", "checkout", self.tag]) - else: + else: command.run(["git", "checkout", self._branch]) def update(self): @@ -68,7 +70,7 @@ class Module: if revision is None: revision = self._branch - command.run(["git", "checkout", revision]) + command.run(["git", "checkout", revision]) @_chdir def describe(self): @@ -93,7 +95,7 @@ class Module: def get_annotation(self, tag): # FIXME this is fragile, there must be a better way - show = subprocess.check_output(["git", "show", tag]) + show = subprocess.check_output(["git", "show", tag]) annotation = [] for line in show.split("\n"): @@ -120,10 +122,12 @@ class Module: return True + def set_root_path(path): global _root_path _root_path = path + def get_root_module(): remote = "git://git.sugarlabs.org/sugar-build/sugar-build.git" |