/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar
0.9.1 by Aaron Bentley
Get trivial case passing
1
class MultiParent(object):
2
3
    def __init__(self):
4
        self.hunks = []
5
6
    @staticmethod
7
    def from_lines(text, parents=()):
8
        diff = MultiParent()
9
        diff.hunks.append(NewText(text))
10
        return diff
11
12
    @classmethod
13
    def from_texts(cls, text, parents=()):
14
        return cls.from_lines(text.splitlines(True),
15
                              [p.splitlines(True) for p in parents])
16
17
18
class NewText(object):
19
20
    def __init__(self, lines):
21
        self.lines = lines
22
23
    def __eq__(self, other):
24
        if self.__class__ is not other.__class__:
25
            return False
26
        return (other.lines == self.lines)