Example #1
0
    def __init__(self, who, files, comments, isdir=0, links=None,
                 revision=None, when=None, branch=None, category=None,
                 revlink='', properties={}, repository='', project=''):
        self.who = who
        self.comments = comments
        self.isdir = isdir
        if links is None:
            links = []
        self.links = links

        self.revision = util.none_or_str(revision)
        if when is None:
            when = util.now()
        self.when = when
        self.branch = util.none_or_str(branch)
        self.category = util.none_or_str(category)
        self.revlink = revlink
        self.properties = Properties()
        self.properties.update(properties, "Change")
        self.repository = repository
        self.project = project

        # keep a sorted list of the files, for easier display
        self.files = files[:]
        self.files.sort()
Example #2
0
 def test_int(self):
     self.assertEqual(util.none_or_str(199), "199")
Example #3
0
 def test_str(self):
     self.assertEqual(util.none_or_str("hi"), "hi")
Example #4
0
 def test_none(self):
     self.assertEqual(util.none_or_str(None), None)
Example #5
0
 def test_int(self):
     self.assertEqual(util.none_or_str(199), "199")
Example #6
0
 def test_str(self):
     self.assertEqual(util.none_or_str("hi"), "hi")
Example #7
0
 def test_none(self):
     self.assertEqual(util.none_or_str(None), None)