Commits

Michał Górny committed ee352c8

bzr: Implement getsavedrev() per bug #343355.

  • Participants
  • Parent commits 90fb6b4

Comments (0)

Files changed (1)

File SmartLiveRebuild/vcs/bzr.py

 
 class BzrSupport(VCSSupport):
 	reqenv = ['EBZR_CACHE_DIR', 'EBZR_STORE_DIR', 'EBZR_UPDATE_CMD']
-	optenv = ['EBZR_OPTIONS', 'EBZR_REPO_URI', 'EBZR_REVISION']
+	optenv = ['EBZR_OPTIONS', 'EBZR_REPO_URI', 'EBZR_REVISION', 'EBZR_TREE_CRC32']
 
 	def __init__(self, *args):
 		VCSSupport.__init__(self, *args)
 			inp.close()
 			raise ValueError('Unable to find crc32 in .bzr/checkout/dirstate')
 
+	def getsavedrev(self):
+		crc = self.env['EBZR_TREE_CRC32']
+		return int(crc) if crc else None
+
 	@staticmethod
 	def revcmp(oldrev, newrev):
 		return oldrev == newrev