From 58361204106c874bb3d5fcd864c414a247e58b1e Mon Sep 17 00:00:00 2001 From: Anrs Hu Date: Tue, 19 Jun 2012 17:18:09 +0800 Subject: [PATCH] get rev by build --- jenkinsapi/build.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/jenkinsapi/build.py b/jenkinsapi/build.py index 458a4d5..56303e1 100644 --- a/jenkinsapi/build.py +++ b/jenkinsapi/build.py @@ -34,10 +34,8 @@ class Build(JenkinsBase): return self._data["result"] def get_revision(self): - vcs = self.job.get_vcs() - if vcs: - return getattr(self, '_get_%s_rev' % vcs, lambda: None)() - raise NotSupportVCS + vcs = self._data['changeSet']['kind'] or 'git' + return getattr(self, '_get_%s_rev' % vcs, lambda: None)() def _get_svn_rev(self): maxRevision = 0 -- 2.7.4