diff options
author | Daniel Narvaez <dwnarvaez@gmail.com> | 2013-01-05 12:36:32 (GMT) |
---|---|---|
committer | Daniel Narvaez <dwnarvaez@gmail.com> | 2013-01-05 12:36:32 (GMT) |
commit | 8d761e4130891324d6e522354e8e477acd998b0a (patch) | |
tree | 1fc892bfea9d0c35d21dddcfd5e39dec64378a29 /devbot/git.py | |
parent | 3e36ee3ae1d63b0f8079349e6a13eb6b37f3e6d5 (diff) |
Allow to specify revisions when pullin
Diffstat (limited to 'devbot/git.py')
-rw-r--r-- | devbot/git.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/devbot/git.py b/devbot/git.py index cb361ef..960fd7c 100644 --- a/devbot/git.py +++ b/devbot/git.py @@ -46,7 +46,7 @@ class Module: else: command.run(["git", "checkout", self._branch]) - def update(self): + def update(self, revision=None): if not os.path.exists(os.path.join(self.local, ".git")): self._clone() return @@ -55,7 +55,9 @@ class Module: command.run(["git", "fetch"], retry=self._retry) - if self.tag: + if revision: + command.run(["git", "checkout", revision]) + elif self.tag: command.run(["git", "checkout", self.tag]) else: command.run(["git", "merge", "--ff-only", |