def change_prop(self, name, value): if name == PROP_MERGEINFO: for (path, ranges) in parse_mergeinfo_property(value).items(): inhranges = list() for range in ranges: (_, _, inheritable) = range if inheritable: inhranges.append(range) if inhranges: self.rev.mergeinfo[path] = inhranges
def test_empty(self): self.assertEqual({}, properties.parse_mergeinfo_property(""))
def test_simple_individual(self): self.assertEqual({"/trunk": [(1, 1, True)]}, properties.parse_mergeinfo_property("/trunk:1\n"))
def test_simple_range_uninheritable(self): self.assertEqual({"/trunk": [(1, 2, False)]}, properties.parse_mergeinfo_property("/trunk:1-2*\n"))
def test_simple_range(self): self.assertEqual({"/trunk": [(1, 2, True)]}, properties.parse_mergeinfo_property("/trunk:1-2\n"))