comparison tests/test_rebuildmeta.py @ 416:cd6317fe70be

invert the svnmeta/editor relationship
author Dirkjan Ochtman <dirkjan@ochtman.nl>
date Thu, 11 Jun 2009 18:49:52 +0200
parents 343da842dbe6
children 0d3b5acb1d51
comparison
equal deleted inserted replaced
415:b17b2969861c 416:cd6317fe70be
6 6
7 from mercurial import hg 7 from mercurial import hg
8 from mercurial import ui 8 from mercurial import ui
9 9
10 from hgsubversion import svncommands 10 from hgsubversion import svncommands
11 from hgsubversion import hg_delta_editor 11 from hgsubversion import svnmeta
12 12
13 def _do_case(self, name, stupid): 13 def _do_case(self, name, stupid):
14 subdir = test_util.subdir.get(name, '') 14 subdir = test_util.subdir.get(name, '')
15 self._load_fixture_and_fetch(name, subdir=subdir, stupid=stupid) 15 self._load_fixture_and_fetch(name, subdir=subdir, stupid=stupid)
16 assert len(self.repo) > 0 16 assert len(self.repo) > 0
36 open(dtf).read()) 36 open(dtf).read())
37 self.assertEqual(src.branchtags(), dest.branchtags()) 37 self.assertEqual(src.branchtags(), dest.branchtags())
38 srcbi = pickle.load(open(os.path.join(src.path, 'svn', 'branch_info'))) 38 srcbi = pickle.load(open(os.path.join(src.path, 'svn', 'branch_info')))
39 destbi = pickle.load(open(os.path.join(dest.path, 'svn', 'branch_info'))) 39 destbi = pickle.load(open(os.path.join(dest.path, 'svn', 'branch_info')))
40 self.assertEqual(sorted(srcbi.keys()), sorted(destbi.keys())) 40 self.assertEqual(sorted(srcbi.keys()), sorted(destbi.keys()))
41 revkeys = hg_delta_editor.HgChangeReceiver(dest).meta.revmap.keys() 41 revkeys = svnmeta.SVNMeta(dest).revmap.keys()
42 for branch in destbi: 42 for branch in destbi:
43 srcinfo = srcbi[branch] 43 srcinfo = srcbi[branch]
44 destinfo = destbi[branch] 44 destinfo = destbi[branch]
45 if destinfo[:2] == (None, 0): 45 if destinfo[:2] == (None, 0):
46 self.assert_(srcinfo[2] <= destinfo[2]) 46 self.assert_(srcinfo[2] <= destinfo[2])