Esempio n. 1
0
 def get_changeset(self, rev):
     self.log.debug('PerforceRepository.get_changeset(%r)' % rev)
     if isinstance(rev, int):
         change = rev
     else:
         from p4trac.util import toUnicode
         rev = toUnicode(rev)
         if rev.startswith(u'@'):
             rev = rev[1:]
         try:
             change = int(rev)
         except ValueError:
             raise TracError(u"Invalid changeset number '%s'" % rev)
     return PerforceChangeset(change, self._repos, self.log, self._job_prefix_length)
Esempio n. 2
0
 def get_changeset(self, rev):
     self.log.debug('PerforceRepository.get_changeset(%r)' % rev)
     if isinstance(rev, int):
         change = rev
     else:
         from p4trac.util import toUnicode
         rev = toUnicode(rev)
         if rev.startswith(u'@'):
             rev = rev[1:]
         try:
             change = int(rev)
         except ValueError:
             raise TracError(u"Invalid changeset number '%s'" % rev)
     return PerforceChangeset(change, self._repos, self.log,
                              self._job_prefix_length)
Esempio n. 3
0
    def get_changeset(self, rev):

        self._log.debug("get_changeset(%r)" % rev)

        if isinstance(rev, int):
            change = rev
        else:
            from p4trac.util import toUnicode

            rev = toUnicode(rev)

            if rev.startswith(u"@"):
                rev = rev[1:]

            try:
                change = int(rev)
            except ValueError:
                raise TracError(u"Invalid changeset number '%s'" % rev)

        return PerforceChangeset(change, self._repos, self._log)