comparison tests/test_rebuildmeta.py @ 225:2117cb0118fe

Get rid of .hg/svn/last_rev: We now calculate the last known revision by iterating over all known revisions and finding the highest number. Theoretically, we might be able to simply read the latest entry, but in practice, that's a bug waiting to happen. For instance, we might want to achieve compatibility with '.hg/shamap' as generated by the ConvertExtension, and it not only cannot offer a guarantee of linearity, but it also allows more than one conversion to source exists. I'd say we have other problems to care about until this turns up as a hotspot in profiling. Such as why we leak circa 100MB of memory per 1000 revisions converted ;)
author Dan Villiom Podlaski Christiansen <danchr@gmail.com>
date Fri, 27 Mar 2009 01:09:36 +0100
parents 496ff87e2532
children 074f27c68818
comparison
equal deleted inserted replaced
224:2165461d2dd8 225:2117cb0118fe
20 dest, 20 dest,
21 os.path.dirname(dest.path), 21 os.path.dirname(dest.path),
22 args=[test_util.fileurl(self.repo_path + 22 args=[test_util.fileurl(self.repo_path +
23 subdir), ]) 23 subdir), ])
24 dest = hg.repository(u, os.path.dirname(dest.path)) 24 dest = hg.repository(u, os.path.dirname(dest.path))
25 self.assert_(open(os.path.join(src.path, 'svn', 'last_rev')).read() >=
26 open(os.path.join(dest.path, 'svn', 'last_rev')).read())
27 for tf in ('rev_map', 'uuid', 'url'): 25 for tf in ('rev_map', 'uuid', 'url'):
28 self.assertEqual(open(os.path.join(src.path, 'svn', tf)).read(), 26 self.assertEqual(open(os.path.join(src.path, 'svn', tf)).read(),
29 open(os.path.join(dest.path, 'svn', tf)).read()) 27 open(os.path.join(dest.path, 'svn', tf)).read())
30 self.assertEqual(pickle.load(open(os.path.join(src.path, 'svn', 28 self.assertEqual(pickle.load(open(os.path.join(src.path, 'svn',
31 'tag_info'))), 29 'tag_info'))),