Files @ 32471bd1f4ee
Branch filter:

Location: kallithea/rhodecode/lib/vcs/backends/hg/workdir.py - annotation

Marcin Kuzminski
Implemented generation of changesets based
on whole diff instead of per file diff. That
can give a big speed improvement for large changesets in
repositories with large history.
- improved handling of binary files
- show renames of binary files
- implemented new diff limit functionality
- unify diff generation between hg and git
- Added binary indicators for changed files,
- added diff lib tests
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):
        return self.repository.get_changeset()

    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)