Mercurial > hgsubversion
comparison tests/test_fetch_branches.py @ 588:2723152c8111
stupid: fix getcopies() logic
getcopies() assumed that copies where happening withing the current branch.
This is wrong when a branch replaces another, and used to generate wrong copy
records when copy sources existed in parent revision but were coming from an
unrelated revision.
author | Patrick Mezard <pmezard@gmail.com> |
---|---|
date | Tue, 02 Mar 2010 17:06:06 +0100 |
parents | c06f59441f8e |
children | d2ef7220a079 |
comparison
equal
deleted
inserted
replaced
587:c06f59441f8e | 588:2723152c8111 |
---|---|
139 ctx = repo['tip'] | 139 ctx = repo['tip'] |
140 self.assertEqual('1', ctx.extra().get('close', '0')) | 140 self.assertEqual('1', ctx.extra().get('close', '0')) |
141 self.assertEqual('branch1', ctx.branch()) | 141 self.assertEqual('branch1', ctx.branch()) |
142 # r5 is where the replacement takes place | 142 # r5 is where the replacement takes place |
143 ctx = repo[5] | 143 ctx = repo[5] |
144 self.assertEqual(set(['a', 'c', 'dir/e', 'dir2/e']), set(ctx)) | 144 self.assertEqual(set(['a', 'c', 'dir/e', 'dir2/e', 'f', 'g']), set(ctx)) |
145 self.assertEqual('0', ctx.extra().get('close', '0')) | 145 self.assertEqual('0', ctx.extra().get('close', '0')) |
146 self.assertEqual('branch1', ctx.branch()) | 146 self.assertEqual('branch1', ctx.branch()) |
147 self.assertEqual('c\n', ctx['c'].data()) | 147 self.assertEqual('c\n', ctx['c'].data()) |
148 self.assertEqual('d\n', ctx['a'].data()) | 148 self.assertEqual('d\n', ctx['a'].data()) |
149 self.assertEqual('e\n', ctx['dir/e'].data()) | 149 self.assertEqual('e\n', ctx['dir/e'].data()) |
150 self.assertEqual('e\n', ctx['dir2/e'].data()) | 150 self.assertEqual('e\n', ctx['dir2/e'].data()) |
151 self.assertEqual('f\n', ctx['f'].data()) | |
152 self.assertEqual('g\n', ctx['g'].data()) | |
153 for f in ctx: | |
154 self.assertTrue(not ctx[f].renamed()) | |
151 | 155 |
152 def test_replace_branch_with_branch_stupid(self, stupid=False): | 156 def test_replace_branch_with_branch_stupid(self, stupid=False): |
153 self.test_replace_branch_with_branch(True) | 157 self.test_replace_branch_with_branch(True) |
154 | 158 |
155 def suite(): | 159 def suite(): |