def _convert_symbolic_revision(self, revision):
        command = ['-r', six.text_type(revision), '-l', '1']

        if getattr(self.options, 'repository_url', None):
            command.append(self.options.repository_url)

        log = self.svn_log_xml(command)

        if log is not None:
            try:
                root = ElementTree.fromstring(log)
            except __HOLE__ as e:
                # _convert_symbolic_revision() nominally raises a ValueError to
                # indicate any failure to determine the revision number from
                # the log entry.  Here, we explicitly catch a ValueError from
                # ElementTree and raise a generic SCMError so that this
                # specific failure to parse the XML log output is
                # differentiated from the nominal case.
                raise SCMError('Failed to parse svn log - %s.' % e)

            logentry = root.find('logentry')
            if logentry is not None:
                return int(logentry.attrib['revision'])

        raise ValueError
dataset/ETHPy150Open reviewboard/rbtools/rbtools/clients/svn.py/SVNClient._convert_symbolic_revision