Exemple #1
0
 def setUp(self):
     self.repo_path = mkdtemp()
     self.repo_pathb = u2hg(self.repo_path)
     self.ui = ui.ui()
     self.ui.setconfig(b'ui', b'quiet', True)
     HgRepository.create_repo(self.repo_path)
     self.repo = hg.repository(self.ui, self.repo_pathb)
Exemple #2
0
 def setUp(self):
     self.repo_path = mkdtemp()
     self.ui = ui.ui()
     self.ui.setconfig('ui', 'quiet', True)
     HgRepository.create_repo(self.repo_path)
     self.repo = hg.repository(self.ui, self.repo_path)
     commands.commit(self.ui, self.repo, message='foo', user='******',
                     addremove=True)
     self.app = create_app(repo_path=self.repo_path,
                           revision_id=REVISION_DEFAULT)
Exemple #3
0
 def test_create_repo(self):
     repo_path = mkdtemp()
     try:
         HgRepository.create_repo(repo_path)
         for f in [os.path.join('content', 'attachments', 'mercurial.png'),
                   os.path.join('content', 'post', 'example-post.rst'),
                   os.path.join('content', 'post', 'lorem-ipsum.rst'),
                   os.path.join('content', 'about.rst'),
                   os.path.join('static', 'screen.css'),
                   os.path.join('templates', 'base.html'),
                   os.path.join('templates', 'posts.html'),
                   os.path.join('templates', 'post_list.html'),
                   'config.yaml', '.hgignore', '.hg']:
             self.assertTrue(os.path.exists(os.path.join(repo_path, f)),
                             'Not found: %s' % f)
     finally:
         rmtree(repo_path)
Exemple #4
0
 def test_create_repo(self):
     repo_path = mkdtemp()
     try:
         HgRepository.create_repo(repo_path)
         for f in [os.path.join('content', 'attachments', 'mercurial.png'),
                   os.path.join('content', 'post', 'example-post.rst'),
                   os.path.join('content', 'post', 'lorem-ipsum.rst'),
                   os.path.join('content', 'about.rst'),
                   os.path.join('static', 'screen.css'),
                   os.path.join('templates', 'base.html'),
                   os.path.join('templates', 'posts.html'),
                   os.path.join('templates', 'post_list.html'),
                   'config.yaml', '.hgignore', '.hg']:
             self.assertTrue(os.path.exists(os.path.join(repo_path, f)),
                             'Not found: %s' % f)
     finally:
         rmtree(repo_path)
Exemple #5
0
 def setUp(self):
     self.repo_path = mkdtemp()
     self.ui = ui.ui()
     self.ui.setconfig('ui', 'quiet', True)
     HgRepository.create_repo(self.repo_path)
     self.repo = hg.repository(self.ui, self.repo_path)
Exemple #6
0
 def test_load_hg_repository(self):
     HgRepository.create_repo(self.repo_path)
     repo = load_repo(self.repo_path)
     self.assertTrue(isinstance(repo, HgRepository))
Exemple #7
0
 def test_load_hg_repository(self):
     HgRepository.create_repo(self.repo_path)
     repo = load_repo(self.repo_path)
     self.assertTrue(isinstance(repo, HgRepository))