=== modified file 'anybox/recipe/openerp/vcs/git.py' --- anybox/recipe/openerp/vcs/git.py 2013-08-26 14:27:37 +0000 +++ anybox/recipe/openerp/vcs/git.py 2013-09-13 13:52:32 +0000 @@ -79,6 +79,12 @@ target_dir, revision) self._switch(revision) + if self._isATrackedBranch(revision): + if not offline: + logger.info("Pull for git repo %s (rev %s)...", + target_dir, rev_str) + subprocess.check_call(['git', 'pull']) + def archive(self, target_path): revision = self.parents()[0] with working_directory_keeper: @@ -91,6 +97,14 @@ '-C', target_path]) subprocess.check_call(['rm', target_tar]) + def _isATrackedBranch(self, revision): + rbp = self._remote_branch_prefix + branches = utils.check_output(["git", "branch", "-a"]) + branch = revision + return re.search( + "^ " + re.escape(rbp) + "\/" + re.escape(branch) + "$", branches, + re.M) + def _needToSwitchRevision(self, revision): """ Check if we need to checkout to an other branch """