def test_genignore_single(self):
     self._load_fixture_and_fetch('ignores.svndump', subdir='trunk')
     hg.update(self.repo, 'tip')
     u = self.ui()
     u.pushbuffer()
     svncommands.genignore(u, self.repo, self.wc_path)
     self.assertStringEqual(open(os.path.join(self.wc_path, '.hgignore')).read(),
                            '.hgignore\nsyntax:glob\nblah\notherblah\nbaz/magic\n')
 def test_genignore(self):
     """ Test generation of .hgignore file. """
     test_util.load_fixture_and_fetch('ignores.svndump', self.repo_path,
                                      self.wc_path, noupdate=False)
     u = self.ui()
     u.pushbuffer()
     svncommands.genignore(u, self.repo, self.wc_path)
     self.assertEqual(open(os.path.join(self.wc_path, '.hgignore')).read(),
                      '.hgignore\nsyntax:glob\nblah\notherblah\nbaz/magic\n')
 def test_genignore(self, layout='auto'):
     """ Test generation of .hgignore file. """
     if layout == 'custom':
         config = {
             'hgsubversionbranch.default': 'trunk',
             }
     else:
         config = {}
     repo = self._load_fixture_and_fetch('ignores.svndump',
                                         layout=layout,
                                         noupdate=False,
                                         config=config)
     u = self.ui()
     u.pushbuffer()
     svncommands.genignore(u, repo, self.wc_path)
     self.assertMultiLineEqual(open(os.path.join(self.wc_path, '.hgignore')).read(),
                      '.hgignore\nsyntax:glob\nblah\notherblah\nbaz/magic\n')
 def test_genignore(self, layout='auto'):
     """ Test generation of .hgignore file. """
     if layout == 'custom':
         config = {
             'hgsubversionbranch.default': 'trunk',
         }
     else:
         config = {}
     repo = self._load_fixture_and_fetch('ignores.svndump',
                                         layout=layout,
                                         noupdate=False,
                                         config=config)
     u = self.ui()
     u.pushbuffer()
     svncommands.genignore(u, repo, self.wc_path)
     self.assertMultiLineEqual(
         open(os.path.join(self.wc_path, '.hgignore')).read(),
         '.hgignore\nsyntax:glob\nblah\notherblah\nbaz/magic\n')