1. Michał Górny
  2. smart-live-rebuild

Commits

Michał Górny  committed 5f5c899

mercurial: try to get saved rev from HG_REV_ID if possible.

  • Participants
  • Parent commits f9287d3
  • Branches master

Comments (0)

Files changed (1)

File SmartLiveRebuild/vcs/mercurial.py

View file
 
 class HgSupport(VCSSupport):
 	reqenv = ['EHG_PROJECT', 'EHG_PULL_CMD', 'EHG_REPO_URI']
-	optenv = ['EHG_REVISION']
+	optenv = ['EHG_REVISION', 'HG_REV_ID']
 
 	trustopt = ['--config', 'trusted.users=portage']
 
 	def __str__(self):
 		return self.env['EHG_REPO_URI'] or VCSSupport.__str__(self)
 
+	def getsavedrev(self):
+		return self.env['HG_REV_ID']
+
 	def getrev(self):
 		return self.call(['hg', 'tip', '--template', '{node}'] + self.trustopt)