Mercurial > evolve
changeset 5177:9f3ad17b62ef
compat: drop 4.5 compatibility for `_filterederror`
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Wed, 04 Mar 2020 16:14:03 +0100 |
parents | b9af7b8f3eee |
children | 61e49d2654cc |
files | hgext3rd/evolve/__init__.py |
diffstat | 1 files changed, 0 insertions(+), 33 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext3rd/evolve/__init__.py Wed Mar 04 16:03:23 2020 +0100 +++ b/hgext3rd/evolve/__init__.py Wed Mar 04 16:14:03 2020 +0100 @@ -269,7 +269,6 @@ bookmarks as bookmarksmod, cmdutil, commands, - context, dirstate, error, help, @@ -721,38 +720,6 @@ ui.warn(b"(%s)\n" % solvemsg) -if util.safehasattr(context, '_filterederror'): # <= hg-4.5 - @eh.wrapfunction(context, '_filterederror') - def evolve_filtererror(original, repo, changeid): - """build an exception to be raised about a filtered changeid - - This is extracted in a function to help extensions (eg: evolve) to - experiment with various message variants.""" - if repo.filtername.startswith(b'visible'): - - unfilteredrepo = repo.unfiltered() - rev = repo[scmutil.revsingle(unfilteredrepo, changeid)] - reason, successors = obshistory._getobsfateandsuccs(unfilteredrepo, rev.node()) - - # Be more precise in case the revision is superseded - if reason == b'superseded': - reason = _(b"successor: %s") % successors[0] - elif reason == b'superseded_split': - if len(successors) <= 2: - reason = _(b"successors: %s") % b", ".join(successors) - else: - firstsuccessors = b", ".join(successors[:2]) - remainingnumber = len(successors) - 2 - successorsmsg = _(b"%s and %d more") % (firstsuccessors, remainingnumber) - reason = _(b"successors: %s") % successorsmsg - - msg = _(b"hidden revision '%s'") % changeid - hint = _(b'use --hidden to access hidden revisions; %s') % reason - return error.FilteredRepoLookupError(msg, hint=hint) - msg = _(b"filtered revision '%s' (not in '%s' subset)") - msg %= (changeid, repo.filtername) - return error.FilteredRepoLookupError(msg) - @eh.wrapcommand(b"update") @eh.wrapcommand(b"pull") def wrapmayobsoletewc(origfn, ui, repo, *args, **opts):