Commits

Michał Górny  committed 3dcb171

darcs: Add getsavedrev() per Gentoo bug #343581.

  • Participants
  • Parent commits 24e5661

Comments (0)

Files changed (1)

File SmartLiveRebuild/vcs/darcs.py

 	reqenv = ['EDARCS_REPOSITORY', 'EDARCS_GET_CMD', 'EDARCS_UPDATE_CMD',
 			'EDARCS_LOCALREPO', 'EDARCS_TOP_DIR', 'EDARCS_OPTIONS',
 			'EDARCS_DARCS_CMD']
+	optenv = ['EDARCS_PATCHCOUNT']
 
 	def getpath(self):
 		return '%s/%s' \
 		result = self.call(['darcs', 'show', 'repo'])
 		return int(re.search('Num Patches: ([0-9]+)', result).group(1))
 
+	def getsavedrev(self):
+		pc = self.env['EDARCS_PATCHCOUNT']
+		return int(pc) if pc else None
+
 	@staticmethod
 	def revcmp(oldrev, newrev):
 		return oldrev == newrev