Pylint common/git.py
authorLingchaox Xin <lingchaox.xin@intel.com>
Tue, 4 Mar 2014 08:32:16 +0000 (16:32 +0800)
committerLingchaox Xin <lingchaox.xin@intel.com>
Tue, 4 Mar 2014 08:32:16 +0000 (16:32 +0800)
Change-Id: I410c4f48a7d75a261b5d2a45685aa57a8cefa2d9

common/git.py

index c65f22f..b7f1392 100644 (file)
@@ -43,7 +43,7 @@ class Git(GitRepository):
 
     def get_tag(self, tag_name):
         """Get tag info though tag name"""
-        outs, _, ret = self._git_inout('show',
+        outs, err, ret = self._git_inout('show',
                                          ['-s', '--pretty=format:###',
                                          tag_name])
         if ret:
@@ -77,7 +77,8 @@ class Git(GitRepository):
         return tag
 
     def branch_contains(self, cmitid):
-        outs, _errs, ret = self._git_inout('branch',
+        """shows only the branches that contain the named commit(commitid)"""
+        outs, _, ret = self._git_inout('branch',
                                            ['-a', '--contains', cmitid])
         if not ret:
             branches = []
@@ -121,7 +122,7 @@ def _clone_gitproject(giturl, gerritprj, localdir, bare=False):
 
     # fetch latest code if local dir already exists
     if os.path.isdir(localdir) and \
-            _update_gitproject(localdir, gitpath="%s/%s" %(giturl,gerritprj)):
+            _update_gitproject(localdir, gitpath="%s/%s" %(giturl, gerritprj)):
         return True
 
     try: