comparison tests/test_rebuildmeta.py @ 331:75f082b5897e

Switch to using url scheme wrappers instead of duplicating each command we wrap. The 'hg svn url' command has been killed; the replacement is '.hg/hgrc'. More stuff related to its disappearance has been stripped, including two tests. HgChangeReceiver now takes a UUID argument, which it uses to ensure that remote repositories remain unchanged. This is a temporary solution, and I'm not entirely satisfied with how it's done either. Access to the UUID file has been isolated in a HgChangeReceiver property. Some more tests have been updated to use ui.pushbuffer()/popbuffer(), and to pass through the Mercurial API. Moved the arguments to wrappers.pull() to the UI configuration. Also, remove HgChangeReceiver.opts in favour of a 'usebranchnames' instance & configuration variable. The name is taken from the ConvertExtension.
author Dan Villiom Podlaski Christiansen <danchr@gmail.com>
date Fri, 15 May 2009 19:18:43 +0200
parents 074f27c68818
children 46e69be8e2c8
comparison
equal deleted inserted replaced
330:5f8f2fd4fd54 331:75f082b5897e
20 svncommands.rebuildmeta(u, 20 svncommands.rebuildmeta(u,
21 dest, 21 dest,
22 os.path.dirname(dest.path), 22 os.path.dirname(dest.path),
23 args=[test_util.fileurl(self.repo_path + 23 args=[test_util.fileurl(self.repo_path +
24 subdir), ]) 24 subdir), ])
25 self.assertTrue(os.path.isdir(os.path.join(src.path, 'svn')),
26 'no .hg/svn directory in the source!')
27 self.assertTrue(os.path.isdir(os.path.join(src.path, 'svn')),
28 'no .hg/svn directory in the destination!')
25 dest = hg.repository(u, os.path.dirname(dest.path)) 29 dest = hg.repository(u, os.path.dirname(dest.path))
26 for tf in ('rev_map', 'uuid', 'url'): 30 for tf in ('rev_map', 'uuid'):
27 self.assertEqual(open(os.path.join(src.path, 'svn', tf)).read(), 31 stf = os.path.join(src.path, 'svn', tf)
28 open(os.path.join(dest.path, 'svn', tf)).read()) 32 self.assertTrue(os.path.isfile(stf), '%r is missing!' % stf)
33 dtf = os.path.join(dest.path, 'svn', tf)
34 self.assertTrue(os.path.isfile(dtf), '%r is missing!' % tf)
35 self.assertEqual(open(stf).read(),
36 open(dtf).read())
29 self.assertEqual(pickle.load(open(os.path.join(src.path, 'svn', 37 self.assertEqual(pickle.load(open(os.path.join(src.path, 'svn',
30 'tag_info'))), 38 'tag_info'))),
31 pickle.load(open(os.path.join(dest.path, 'svn', 39 pickle.load(open(os.path.join(dest.path, 'svn',
32 'tag_info')))) 40 'tag_info'))))
33 self.assertEqual(src.branchtags(), dest.branchtags()) 41 self.assertEqual(src.branchtags(), dest.branchtags())