comparison tests/test_utility_commands.py @ 550:f0159775e0f1

utility_commands: fix hg svn genignore for single-directory mode
author Augie Fackler <durin42@gmail.com>
date Sat, 06 Feb 2010 11:13:55 -0600
parents b97f5734e5a8
children 00393e9abff8
comparison
equal deleted inserted replaced
549:b97f5734e5a8 550:f0159775e0f1
210 u.pushbuffer() 210 u.pushbuffer()
211 utility_commands.genignore(u, self.repo, self.wc_path) 211 utility_commands.genignore(u, self.repo, self.wc_path)
212 self.assertEqual(open(os.path.join(self.wc_path, '.hgignore')).read(), 212 self.assertEqual(open(os.path.join(self.wc_path, '.hgignore')).read(),
213 '.hgignore\nsyntax:glob\nblah\notherblah\nbaz/magic\n') 213 '.hgignore\nsyntax:glob\nblah\notherblah\nbaz/magic\n')
214 214
215 def test_genignore_single(self):
216 self._load_fixture_and_fetch('ignores.svndump', subdir='trunk')
217 hg.update(self.repo, 'tip')
218 u = ui.ui()
219 u.pushbuffer()
220 utility_commands.genignore(u, self.repo, self.wc_path)
221 self.assertStringEqual(open(os.path.join(self.wc_path, '.hgignore')).read(),
222 '.hgignore\nsyntax:glob\nblah\notherblah\nbaz/magic\n')
223
215 def test_list_authors(self): 224 def test_list_authors(self):
216 test_util.load_svndump_fixture(self.repo_path, 225 test_util.load_svndump_fixture(self.repo_path,
217 'replace_trunk_with_branch.svndump') 226 'replace_trunk_with_branch.svndump')
218 u = ui.ui() 227 u = ui.ui()
219 u.pushbuffer() 228 u.pushbuffer()