コード例 #1
0
ファイル: Database.py プロジェクト: gregoriorobles/CVSAnalY
    def __init__(self, identifier, uri, name, type):
        if identifier is None:
            self.identifier = DBRepository.id_counter
            DBRepository.id_counter += 1
        else:
            self.identifier = identifier

        self.uri = to_unicode(uri)
        self.name = to_unicode(name)
        self.type = to_unicode(type)
コード例 #2
0
ファイル: Database.py プロジェクト: gregoriorobles/CVSAnalY
    def __init__(self, identifier, uri, name, type):
        if identifier is None:
            self.identifier = DBRepository.id_counter
            DBRepository.id_counter += 1
        else:
            self.identifier = identifier

        self.uri = to_unicode(uri)
        self.name = to_unicode(name)
        self.type = to_unicode(type)
コード例 #3
0
ファイル: Database.py プロジェクト: gregoriorobles/CVSAnalY
    def __init__(self, identifier, commit):
        if identifier is None:
            self.identifier = DBLog.id_counter
            DBLog.id_counter += 1
        else:
            self.identifier = identifier

        self.rev = to_unicode(commit.revision)
        self.committer = None
        self.author = None
        self.date = commit.date
        self.date_tz = commit.date_tz
        self.author_date = commit.author_date
        self.author_date_tz = commit.author_date_tz
        self.message = to_unicode(commit.message)
        self.composed_rev = commit.composed_rev
コード例 #4
0
ファイル: Database.py プロジェクト: gregoriorobles/CVSAnalY
    def __init__(self, identifier, commit):
        if identifier is None:
            self.identifier = DBLog.id_counter
            DBLog.id_counter += 1
        else:
            self.identifier = identifier

        self.rev = to_unicode(commit.revision)
        self.committer = None
        self.author = None
        self.date = commit.date
        self.date_tz = commit.date_tz
        self.author_date = commit.author_date
        self.author_date_tz = commit.author_date_tz
        self.message = to_unicode(commit.message)
        self.composed_rev = commit.composed_rev
コード例 #5
0
ファイル: Database.py プロジェクト: gregoriorobles/CVSAnalY
    def __init__(self, identifier, name):
        if identifier is None:
            self.identifier = DBTag.id_counter
            DBTag.id_counter += 1
        else:
            self.identifier = identifier

        self.name = to_unicode(name)
コード例 #6
0
ファイル: Database.py プロジェクト: gregoriorobles/CVSAnalY
    def __init__(self, identifier, name):
        if identifier is None:
            self.identifier = DBTag.id_counter
            DBTag.id_counter += 1
        else:
            self.identifier = identifier

        self.name = to_unicode(name)
コード例 #7
0
ファイル: Content.py プロジェクト: rodrigoprimo/CVSAnalY
 def _get_file_contents(self):
     """Returns contents of the file, stripped of whitespace 
         at either end
         """
     # An encode will fail if the source code can't be converted to
     # unicode, ie. it's not already utf-8, or latin-1, or something
     # obvious. This almost always means that the file isn't source
     # code at all.
     return to_unicode(self._file_contents)
コード例 #8
0
ファイル: Database.py プロジェクト: gregoriorobles/CVSAnalY
    def __init__(self, identifier, file_name):
        if identifier is None:
            self.identifier = DBFile.id_counter
            DBFile.id_counter += 1
        else:
            self.identifier = identifier

        self.file_name = to_unicode(file_name)
        self.repository_id = None
コード例 #9
0
ファイル: Database.py プロジェクト: gregoriorobles/CVSAnalY
    def __init__(self, identifier, person):
        if identifier is None:
            self.identifier = DBPerson.id_counter
            DBPerson.id_counter += 1
        else:
            self.identifier = identifier

        self.name = to_unicode(person.name)
        self.email = person.email or None
コード例 #10
0
 def _get_file_contents(self):
         """Returns contents of the file, stripped of whitespace 
         at either end
         """
         # An encode will fail if the source code can't be converted to
         # unicode, ie. it's not already utf-8, or latin-1, or something
         # obvious. This almost always means that the file isn't source
         # code at all. 
         return to_unicode(self._file_contents)
コード例 #11
0
ファイル: Database.py プロジェクト: gregoriorobles/CVSAnalY
    def __init__(self, identifier, file_name):
        if identifier is None:
            self.identifier = DBFile.id_counter
            DBFile.id_counter += 1
        else:
            self.identifier = identifier

        self.file_name = to_unicode(file_name)
        self.repository_id = None
コード例 #12
0
ファイル: Database.py プロジェクト: gregoriorobles/CVSAnalY
    def __init__(self, identifier, person):
        if identifier is None:
            self.identifier = DBPerson.id_counter
            DBPerson.id_counter += 1
        else:
            self.identifier = identifier

        self.name = to_unicode(person.name)
        self.email = person.email or None
コード例 #13
0
ファイル: unicode_test.py プロジェクト: donalus/CVSAnalY
 def testLatin1String(self):
     latin1String = "Hell\xf3 W\xe4rld"
     self.assertEqual (u"Helló Wärld", utils.to_unicode(latin1String))
コード例 #14
0
ファイル: unicode_test.py プロジェクト: donalus/CVSAnalY
 def testAsciiString(self):
     asciiString = "HelloWorld"
     self.assertEqual (u"HelloWorld", utils.to_unicode(asciiString))
コード例 #15
0
ファイル: unicode_test.py プロジェクト: donalus/CVSAnalY
 def testUtf8String(self):
     utf8String = "\xC3\x96\xE1\x9B\x96\x61"
     self.assertEqual (u"\u00d6\u16d6a", utils.to_unicode(utf8String))
コード例 #16
0
ファイル: unicode_test.py プロジェクト: donalus/CVSAnalY
 def testUnicode(self):
     self.assertEqual (u"Hello World", utils.to_unicode(u"Hello World"))