Mercurial > hgsubversion
comparison tests/test_fetch_branches.py @ 425:f5222d021665
tests: fix for new branch heads change in upstream hg.
| author | Augie Fackler <durin42@gmail.com> |
|---|---|
| date | Mon, 15 Jun 2009 12:26:19 -0500 |
| parents | 1b9d004a8c0a |
| children | 45df4d9320fa |
comparison
equal
deleted
inserted
replaced
| 424:3ae8edc3d8f1 | 425:f5222d021665 |
|---|---|
| 20 source = '%s#%s' % (test_util.fileurl(self.repo_path), anchor) | 20 source = '%s#%s' % (test_util.fileurl(self.repo_path), anchor) |
| 21 repo = hg.clone(ui.ui(), source=source, dest=self.wc_path) | 21 repo = hg.clone(ui.ui(), source=source, dest=self.wc_path) |
| 22 return hg.repository(ui.ui(), self.wc_path) | 22 return hg.repository(ui.ui(), self.wc_path) |
| 23 | 23 |
| 24 def openbranches(self, repo): | 24 def openbranches(self, repo): |
| 25 hctxs = [repo[hn] for hn in repo.heads(closed=False)] | 25 hctxs = [repo[hn] for hn in repo.heads()] |
| 26 branches = set(ctx.branch() for ctx in hctxs) | 26 branches = set(ctx.branch() for ctx in hctxs if |
| 27 branches.discard('closed-branches') | 27 ctx.extra().get('close', None) != '1') |
| 28 return sorted(branches) | 28 return sorted(branches) |
| 29 | 29 |
| 30 def test_unrelatedbranch(self, stupid=False): | 30 def test_unrelatedbranch(self, stupid=False): |
| 31 repo = self._load_fixture_and_fetch('unrelatedbranch.svndump', stupid) | 31 repo = self._load_fixture_and_fetch('unrelatedbranch.svndump', stupid) |
| 32 heads = [repo[n] for n in repo.heads()] | 32 heads = [repo[n] for n in repo.heads()] |
