From: Ralf Jung Date: Fri, 27 Jul 2012 15:30:39 +0000 (+0200) Subject: Support specifying a SHA1 as version X-Git-Url: https://git.ralfj.de/mass-build.git/commitdiff_plain/08936d4ee431ed67dbc75214b364fad42fb72900?ds=sidebyside Support specifying a SHA1 as version --- diff --git a/vcs.py b/vcs.py index b700b6e..9c91e93 100644 --- a/vcs.py +++ b/vcs.py @@ -36,13 +36,13 @@ class Git: branch = repo.heads[branchname] else: branch = repo.create_head(branchname, self.commit) - if isBranch: + if isBranch: # track remote branch branch.set_tracking_branch(origin.refs[branchname]) # update it to the latest remote commit branch.checkout() repo.git.rebase(self.commit) print "...done", - if repo.head.reference.commit != repo.refs[self.commit].commit: + if repo.head.reference.commit != repo.commit(self.commit): print "(keeping local patches around)", print