##// END OF EJS Templates
deps: bumped aiohttp==3.11.4 for security fix
deps: bumped aiohttp==3.11.4 for security fix

File last commit:

r1327:278da2b3 default
r1338:18718dd4 default
Show More
hgcompat.py
92 lines | 3.1 KiB | text/x-python | PythonLexer
initial commit
r0 # RhodeCode VCSServer provides access to different vcs backends via network.
core: updated copyrights to 2024
r1327 # Copyright (C) 2014-2024 RhodeCode GmbH
initial commit
r0 #
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
"""
Mercurial libs compatibility
"""
import mercurial
mercurial: fixed code against latest mercurial release....
r310 from mercurial import demandimport
py3: compat and code fixes
r1042
initial commit
r0 # patch demandimport, due to bug in mercurial when it always triggers
# demandimport.enable()
core: moved str_utils and type_utils to lib so it's consistent with ce, and easier to sync up codebases
r1249 from vcsserver.lib.str_utils import safe_bytes
py3: fixed few mercurial cases
r1050
mercurial: fixed code against latest mercurial release....
r310 demandimport.enable = lambda *args, **kwargs: 1
initial commit
r0
from mercurial import ui
from mercurial import patch
from mercurial import config
from mercurial import extensions
from mercurial import scmutil
from mercurial import archival
from mercurial import discovery
from mercurial import unionrepo
from mercurial import localrepo
from mercurial import merge as hg_merge
Martin Bornhold
subrepo: Add patch to turn off mercurial subrepo handling.
r97 from mercurial import subrepo
pull-requests: fixed subrepo case for pull-requests for new mercurial.
r718 from mercurial import subrepoutil
mercurial: use tags module as repo function is deprecated as of 4.2
r274 from mercurial import tags as hg_tag
archive: implemented efficient way to perform archive for each repository.
r894 from mercurial import util as hgutil
py3: compat and code fixes
r1042 from mercurial.commands import clone, pull
from mercurial.node import nullid
initial commit
r0 from mercurial.context import memctx, memfilectx
from mercurial.error import (
LookupError, RepoError, RepoLookupError, Abort, InterventionRequired,
Mercurial: fixed lookup for hg 4.9
r657 RequirementError, ProgrammingError)
initial commit
r0 from mercurial.hgweb import hgweb_mod
Mercurial: addeed mercurial 4.9 support
r656 from mercurial.localrepo import instance
archive: implemented efficient way to perform archive for each repository.
r894 from mercurial.match import match, alwaysmatcher, patternmatcher
initial commit
r0 from mercurial.mdiff import diffopts
from mercurial.node import bin, hex
from mercurial.encoding import tolocal
from mercurial.discovery import findcommonoutgoing
from mercurial.hg import peer
chore(deps): bumped mercurial to 6.7.4, hg-evolve to 11.1.3, fixed related issues
r1248 from mercurial.httppeer import make_peer
py3: compat and code fixes
r1042 from mercurial.utils.urlutil import url as hg_url
Mercurial: fixed lookup for hg 4.9
r657 from mercurial.scmutil import revrange, revsymbol
initial commit
r0 from mercurial.node import nullrev
from mercurial import exchange
from hgext import largefiles
# those authnadlers are patched for python 2.6.5 bug an
# infinit looping when given invalid resources
from mercurial.url import httpbasicauthhandler, httpdigestauthhandler
hg: added compat for fetching revision using new hg 4.9 code
r660
py3: compat and code fixes
r1042 # hg strip is in core now
from mercurial import strip as hgext_strip
hg: added compat for fetching revision using new hg 4.9 code
r660
def get_ctx(repo, ref):
binary envelope: add support for custom response type when using wrapped binary data in envelope
r1107 if not isinstance(ref, int):
ref = safe_bytes(ref)
mercurial: improve lookup logic and chained exceptions that can happen during that operation.
r1142
hg: added compat for fetching revision using new hg 4.9 code
r660 try:
ctx = repo[ref]
mercurial: improve lookup logic and chained exceptions that can happen during that operation.
r1142 return ctx
Mercurial: fixed a case of lookup branches that had 40 characters in length.
r938 except (ProgrammingError, TypeError):
hg: added compat for fetching revision using new hg 4.9 code
r660 # we're unable to find the rev using a regular lookup, we fallback
# to slower, but backward compat revsymbol usage
mercurial: improve lookup logic and chained exceptions that can happen during that operation.
r1142 pass
mercurial: fixed lookup case of pure numeric refs.
r823 except (LookupError, RepoLookupError):
# Similar case as above but only for refs that are not numeric
py3: 2to3 run
r1044 if isinstance(ref, int):
mercurial: fixed lookup case of pure numeric refs.
r823 raise
mercurial: improve lookup logic and chained exceptions that can happen during that operation.
r1142
ctx = revsymbol(repo, ref)
hg: added compat for fetching revision using new hg 4.9 code
r660 return ctx