Mercurial > kallithea
comparison rhodecode/lib/vcs/backends/hg/workdir.py @ 2007:324ac367a4da beta
Added VCS into rhodecode core for faster and easier deployments of new versions
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Mon, 20 Feb 2012 23:00:54 +0200 |
parents | |
children | 03a770980b55 |
comparison
equal
deleted
inserted
replaced
2006:34d009e5147a | 2007:324ac367a4da |
---|---|
1 from rhodecode.lib.vcs.backends.base import BaseWorkdir | |
2 from rhodecode.lib.vcs.exceptions import BranchDoesNotExistError | |
3 | |
4 from ...utils.hgcompat import hg_merge | |
5 | |
6 | |
7 class MercurialWorkdir(BaseWorkdir): | |
8 | |
9 def get_branch(self): | |
10 return self.repository._repo.dirstate.branch() | |
11 | |
12 def get_changeset(self): | |
13 return self.repository.get_changeset() | |
14 | |
15 def checkout_branch(self, branch=None): | |
16 if branch is None: | |
17 branch = self.repository.DEFAULT_BRANCH_NAME | |
18 if branch not in self.repository.branches: | |
19 raise BranchDoesNotExistError | |
20 | |
21 hg_merge.update(self.repository._repo, branch, False, False, None) |