comparison tests/test_fetch_branches.py @ 1255:139a44a63090 stable 1.7

Merge default into stable for a release.
author Augie Fackler <raf@durin42.com>
date Wed, 05 Nov 2014 12:48:59 -0500
parents ba8485b9fee0
children a36e87ae2380
comparison
equal deleted inserted replaced
1230:807c443928d4 1255:139a44a63090
48 r = repo['branch'] 48 r = repo['branch']
49 self.assertEqual(0, r.parents()[0].rev()) 49 self.assertEqual(0, r.parents()[0].rev())
50 self.assertEqual(['a', 'c', 'z'], sorted(r.manifest())) 50 self.assertEqual(['a', 'c', 'z'], sorted(r.manifest()))
51 51
52 def test_renamed_branch_to_trunk(self): 52 def test_renamed_branch_to_trunk(self):
53 config = {'hgsubversion.failonmissing': 'true'} 53 repo = self._load_fixture_and_fetch('branch_rename_to_trunk.svndump')
54 repo = self._load_fixture_and_fetch('branch_rename_to_trunk.svndump',
55 config=config)
56 self.assertEqual(repo['default'].parents()[0].branch(), 'dev_branch') 54 self.assertEqual(repo['default'].parents()[0].branch(), 'dev_branch')
57 self.assert_('iota' in repo['default']) 55 self.assert_('iota' in repo['default'])
58 self.assertEqual(repo['old_trunk'].parents()[0].branch(), 'default') 56 self.assertEqual(repo['old_trunk'].parents()[0].branch(), 'default')
59 self.assert_('iota' not in repo['old_trunk']) 57 self.assert_('iota' not in repo['old_trunk'])
60 expected = ['default', 'old_trunk'] 58 expected = ['default', 'old_trunk']
70 def test_copybeforeclose(self): 68 def test_copybeforeclose(self):
71 repo = self._load_fixture_and_fetch('copybeforeclose.svndump') 69 repo = self._load_fixture_and_fetch('copybeforeclose.svndump')
72 self.assertEqual(repo['tip'].branch(), 'test') 70 self.assertEqual(repo['tip'].branch(), 'test')
73 self.assertEqual(repo['test'].extra().get('close'), '1') 71 self.assertEqual(repo['test'].extra().get('close'), '1')
74 self.assertEqual(repo['test']['b'].data(), 'a\n') 72 self.assertEqual(repo['test']['b'].data(), 'a\n')
73
74 def test_copyafterclose(self):
75 repo = self._load_fixture_and_fetch('copyafterclose.svndump')
76 self.assertEqual(repo['tip'].branch(), 'test')
77 self.assert_('file' in repo['test'])
78 self.assertEqual(repo['test']['file'].data(), 'trunk2\n')
79 self.assert_('dir/file' in repo['test'])
80 self.assertEqual(repo['test']['dir/file'].data(), 'trunk2\n')
81
75 82
76 def test_branch_create_with_dir_delete_works(self): 83 def test_branch_create_with_dir_delete_works(self):
77 repo = self._load_fixture_and_fetch('branch_create_with_dir_delete.svndump') 84 repo = self._load_fixture_and_fetch('branch_create_with_dir_delete.svndump')
78 self.assertEqual(repo['tip'].manifest().keys(), 85 self.assertEqual(repo['tip'].manifest().keys(),
79 ['alpha', 'beta', 'iota', 'gamma', ]) 86 ['alpha', 'beta', 'iota', 'gamma', ])