Mercurial > kallithea
changeset 8705:6329c0f26ace
hg: support update with Mercurial 5.6
Fix:
TypeError: update() takes from 1 to 3 positional arguments but 5 were given
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Thu, 22 Oct 2020 15:45:58 +0200 |
parents | 3669e58f3002 |
children | c6964daffe57 |
files | kallithea/lib/vcs/backends/hg/workdir.py |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/kallithea/lib/vcs/backends/hg/workdir.py Fri Oct 30 23:44:18 2020 +0100 +++ b/kallithea/lib/vcs/backends/hg/workdir.py Thu Oct 22 15:45:58 2020 +0200 @@ -21,4 +21,8 @@ raise BranchDoesNotExistError raw_id = self.repository.branches[branch] - mercurial.merge.update(self.repository._repo, ascii_bytes(raw_id), False, False, None) + try: + mercurial.merge.update(self.repository._repo[ascii_bytes(raw_id)]) + except TypeError: # mergeupdate() missing 3 required positional arguments: 'node', 'branchmerge', and 'force' + # update-update was introduced with Mercurial 5.6 (2c86b9587740/c1b603cdc95a) + mercurial.merge.update(self.repository._repo, ascii_bytes(raw_id), False, False, None)