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

Commits

Michał Górny  committed ab99bd2

mercurial: support comparisons using shortened hashes.

  • Participants
  • Parent commits 5f5c899
  • Branches master

Comments (0)

Files changed (1)

File SmartLiveRebuild/vcs/mercurial.py

View file
 	def getrev(self):
 		return self.call(['hg', 'tip', '--template', '{node}'] + self.trustopt)
 
+	@staticmethod
+	def revcmp(oldrev, newrev):
+		return newrev.startswith(oldrev)
+
 	def getupdatecmd(self):
 		return ' '.join([self.env['EHG_PULL_CMD']] + self.trustopt)