Skip to content
Snippets Groups Projects

WIP: drop 4.5 related code

Closed Pierre-Yves David requested to merge topic/stable/drop-4.5 into branch/default
11 files
+ 35
170
Compare changes
  • Side-by-side
  • Inline
Files
11
@@ -721,38 +721,6 @@ def _warnobsoletewc(ui, repo, prevnode=None, wasobs=None):
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):
Loading