##// END OF EJS Templates
Don't use -p flag together with -s in git calls. Latest...
Don't use -p flag together with -s in git calls. Latest git version changes behaviour of such call changing the output. In all the calls where -p -s was used we're only interested in list of changesets and not the diff.

File last commit:

r3796:2b5f94fc beta
r4106:4e429252 default
Show More
workdir.py
22 lines | 748 B | text/x-python | PythonLexer
from rhodecode.lib.vcs.backends.base import BaseWorkdir
from rhodecode.lib.vcs.exceptions import BranchDoesNotExistError
from rhodecode.lib.vcs.utils.hgcompat import hg_merge
class MercurialWorkdir(BaseWorkdir):
def get_branch(self):
return self.repository._repo.dirstate.branch()
def get_changeset(self):
wk_dir_id = self.repository._repo[None].parents()[0].hex()
return self.repository.get_changeset(wk_dir_id)
def checkout_branch(self, branch=None):
if branch is None:
branch = self.repository.DEFAULT_BRANCH_NAME
if branch not in self.repository.branches:
raise BranchDoesNotExistError
hg_merge.update(self.repository._repo, branch, False, False, None)