##// END OF EJS Templates
diffs: drop diffs.differ...
diffs: drop diffs.differ This function did not really add any value, it was yet another layer that was hiding the bug that we use ref[1] without ref[0], and it had this strange undefined behaviour for diffing across repos. Inlining the call to .get_diff do not make the code more complex but makes it more obvious what is going on so it can be cleaned up later.

File last commit:

r2543:03a77098 beta
r3718:b2575bdb beta
Show More
workdir.py
21 lines | 672 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):
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)