Mercurial > kallithea
comparison rhodecode/tests/vcs/test_hg.py @ 3797:d7488551578e beta
synced vcs with upstream
- moved subprocessio module to VCS
- many small changes to make embedded vcs as similar to to external lib
- use only absolute imports
- patch vcs config during load pylons env
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Sat, 27 Apr 2013 11:24:25 +0200 |
parents | b81680c97494 |
children | 3208aaefc9ca |
comparison
equal
deleted
inserted
replaced
3796:2b5f94fc3b7a | 3797:d7488551578e |
---|---|
2 | 2 |
3 import os | 3 import os |
4 from rhodecode.lib.vcs.backends.hg import MercurialRepository, MercurialChangeset | 4 from rhodecode.lib.vcs.backends.hg import MercurialRepository, MercurialChangeset |
5 from rhodecode.lib.vcs.exceptions import RepositoryError, VCSError, NodeDoesNotExistError | 5 from rhodecode.lib.vcs.exceptions import RepositoryError, VCSError, NodeDoesNotExistError |
6 from rhodecode.lib.vcs.nodes import NodeKind, NodeState | 6 from rhodecode.lib.vcs.nodes import NodeKind, NodeState |
7 from conf import PACKAGE_DIR, TEST_HG_REPO, TEST_HG_REPO_CLONE, \ | 7 from rhodecode.tests.vcs.conf import PACKAGE_DIR, TEST_HG_REPO, TEST_HG_REPO_CLONE, \ |
8 TEST_HG_REPO_PULL | 8 TEST_HG_REPO_PULL |
9 from rhodecode.lib.vcs.utils.compat import unittest | 9 from rhodecode.lib.vcs.utils.compat import unittest |
10 | 10 |
11 | 11 |
12 # Use only clean mercurial's ui | 12 # Use only clean mercurial's ui |
154 def test_branches(self): | 154 def test_branches(self): |
155 # TODO: Need more tests here | 155 # TODO: Need more tests here |
156 | 156 |
157 #active branches | 157 #active branches |
158 self.assertTrue('default' in self.repo.branches) | 158 self.assertTrue('default' in self.repo.branches) |
159 self.assertTrue('git' in self.repo.branches) | 159 self.assertTrue('stable' in self.repo.branches) |
160 | 160 |
161 # closed | 161 # closed |
162 self.assertTrue('git' in self.repo._get_branches(closed=True)) | |
162 self.assertTrue('web' in self.repo._get_branches(closed=True)) | 163 self.assertTrue('web' in self.repo._get_branches(closed=True)) |
163 | 164 |
164 for name, id in self.repo.branches.items(): | 165 for name, id in self.repo.branches.items(): |
165 self.assertTrue(isinstance( | 166 self.assertTrue(isinstance( |
166 self.repo.get_changeset(id), MercurialChangeset)) | 167 self.repo.get_changeset(id), MercurialChangeset)) |