| | 244 | def test_get_copy_ancestry(self): |
| | 245 | node = self.repos.get_node('/tags/v1/README.txt') |
| | 246 | ancestry = node.get_copy_ancestry() |
| | 247 | self.assertEqual([(u'tête/README.txt', 6)], ancestry) |
| | 248 | for path, rev in ancestry: |
| | 249 | self.repos.get_node(path, rev) # shouldn't raise NoSuchNode |
| | 250 | |
| | 251 | node = self.repos.get_node(u'/tête/README3.txt') |
| | 252 | ancestry = node.get_copy_ancestry() |
| | 253 | self.assertEqual([(u'tête/README2.txt', 13), |
| | 254 | (u'tête/README.txt', 3)], ancestry) |
| | 255 | for path, rev in ancestry: |
| | 256 | self.repos.get_node(path, rev) # shouldn't raise NoSuchNode |
| | 257 | |
| | 258 | node = self.repos.get_node('/branches/v1x') |
| | 259 | ancestry = node.get_copy_ancestry() |
| | 260 | self.assertEqual([(u'tags/v1.1', 11), |
| | 261 | (u'branches/v1x', 9), |
| | 262 | (u'tags/v1', 7), |
| | 263 | (u'tête', 6)], ancestry) |
| | 264 | for path, rev in ancestry: |
| | 265 | self.repos.get_node(path, rev) # shouldn't raise NoSuchNode |
| | 266 | |
| | 267 | def test_get_copy_ancestry_for_move(self): |
| | 268 | node = self.repos.get_node(u'/tête/dir1/dir2', 5) |
| | 269 | ancestry = node.get_copy_ancestry() |
| | 270 | self.assertEqual([(u'tête/dir2', 4)], ancestry) |
| | 271 | for path, rev in ancestry: |
| | 272 | self.repos.get_node(path, rev) # shouldn't raise NoSuchNode |
| | 273 | |
| | 616 | def test_get_copy_ancestry(self): |
| | 617 | node = self.repos.get_node(u'/README3.txt') |
| | 618 | ancestry = node.get_copy_ancestry() |
| | 619 | self.assertEqual([(u'README2.txt', 13), |
| | 620 | (u'README.txt', 3)], ancestry) |
| | 621 | for path, rev in ancestry: |
| | 622 | self.repos.get_node(path, rev) # shouldn't raise NoSuchNode |
| | 623 | |
| | 624 | def test_get_copy_ancestry_for_move(self): |
| | 625 | node = self.repos.get_node(u'/dir1/dir2', 5) |
| | 626 | ancestry = node.get_copy_ancestry() |
| | 627 | self.assertEqual([(u'dir2', 4)], ancestry) |
| | 628 | for path, rev in ancestry: |
| | 629 | self.repos.get_node(path, rev) # shouldn't raise NoSuchNode |
| | 630 | |