def normalize_rev(self, rev):
        if rev is None or isinstance(rev, basestring) and \
               rev.lower() in ('', 'head', 'latest', 'youngest'):
            return self.youngest_rev
        else:
            try:
                rev = int(rev)
                if 0 <= rev <= self.youngest_rev:
                    return rev
            except (ValueError, TypeError):
                pass
            raise NoSuchChangeset(rev)
Take any revision specification and produce a revision suitable
dataset/ETHPy150Open edgewall/trac/tracopt/versioncontrol/svn/svn_fs.py/SubversionRepository.normalize_rev