def find_revision_number(self, revision=None):
<EOL>self.create()<EOL>revision = self.expand_branch_name(revision)<EOL>output = self.context.capture('<STR_LIT>', '<STR_LIT>', revision, '<STR_LIT>')<EOL>if not (output and output.isdigit()):<EOL><INDENT>msg = "<STR_LIT>"<EOL>raise ValueError(msg)<EOL><DEDENT>return int(output)<EOL>
Find the local revision number of the given revision.