def modtime(self, path, non_overlayed=False): """ Return the modtime for the file.""" if non_overlayed: # Hmmm commit time for changeset, not file. Good enough. return int(self.repo.changectx(self.version).date()[0]) overlay = self.overlay_path(path) if os.path.exists(overlay) and os.path.getsize(overlay) > 0: return DirectFiles.modtime(self, overlay) return int(self.repo.changectx(self.version).date()[0])