This instance will be upgraded to Heptapod 0.23.2 on 2021-08-05 at 11:00 UTC+2 (a few minutes of down time)

Commit fef26935 authored by Anton Shestakov's avatar Anton Shestakov
Browse files

compat: wrap debugstrip from core hg if it exists

Since the debugstrip command from core and strip command from the hgext.strip
extension is now the same thing, we don't have to wrap them separately. Unless,
of course, users have a copy of old (from hg 5.6 and earlier) hgext.strip
laying around that they specifically want to use, but I don't think we want to
support that use case.
parent e5d91fd1f319
......@@ -1179,7 +1179,17 @@ def commitwrapper(orig, ui, repo, *arg, **kwargs):
lockmod.release(tr, lock, wlock)
@eh.wrapcommand(b'strip', extension=b'strip', opts=[
from mercurial import strip
stripcmd = b'debugstrip'
stripext = None
except ImportError:
# hg <= 5.6 (d7a508a75d72)
stripcmd = b'strip'
stripext = b'strip'
@eh.wrapcommand(stripcmd, extension=stripext, opts=[
(b'', b'bundle', None, _(b"delete the commit entirely and move it to a "
b"backup bundle")),
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment