comparison tests/test_fetch_branches.py @ 551:d17cec76e769

replay: correctly handle renaming the parent dir of a branch
author Augie Fackler <durin42@gmail.com>
date Sat, 06 Feb 2010 13:01:35 -0600
parents 45df4d9320fa
children d96aa92d9ad9
comparison
equal deleted inserted replaced
550:f0159775e0f1 551:d17cec76e769
24 def openbranches(self, repo): 24 def openbranches(self, repo):
25 hctxs = [repo[hn] for hn in repo.heads()] 25 hctxs = [repo[hn] for hn in repo.heads()]
26 branches = set(ctx.branch() for ctx in hctxs if 26 branches = set(ctx.branch() for ctx in hctxs if
27 ctx.extra().get('close', None) != '1') 27 ctx.extra().get('close', None) != '1')
28 return sorted(branches) 28 return sorted(branches)
29
30 def test_rename_branch_parent(self, stupid=False):
31 repo = self._load_fixture_and_fetch('rename_branch_parent_dir.svndump', stupid)
32 heads = [repo[n] for n in repo.heads()]
33 heads = dict([(ctx.branch(), ctx) for ctx in heads])
34 # Let these tests disabled yet as the fix is not obvious
35 self.assertEqual(['dev_branch'], self.openbranches(repo))
36
37 def test_rename_branch_parent_stupid(self):
38 self.test_rename_branch_parent(stupid=True)
29 39
30 def test_unrelatedbranch(self, stupid=False): 40 def test_unrelatedbranch(self, stupid=False):
31 repo = self._load_fixture_and_fetch('unrelatedbranch.svndump', stupid) 41 repo = self._load_fixture_and_fetch('unrelatedbranch.svndump', stupid)
32 heads = [repo[n] for n in repo.heads()] 42 heads = [repo[n] for n in repo.heads()]
33 heads = dict([(ctx.branch(), ctx) for ctx in heads]) 43 heads = dict([(ctx.branch(), ctx) for ctx in heads])