Mercurial > hg
comparison mercurial/registrar.py @ 45865:d7a508a75d72
strip: move into core
As discussed at the 5.2 sprint, replace strip extension by a core
command, debugstrip. Obviously, the extension stays for backwards
compatibility.
As an implementation note, I moved the strip file as is into core,
which is not done elsewhere, AFAIK. I could have inlined it into
debugcommands, but that doesn't sound great.
Differential Revision: https://phab.mercurial-scm.org/D9285
author | Valentin Gatien-Baron <valentin.gatienbaron@gmail.com> |
---|---|
date | Sun, 08 Nov 2020 16:23:35 -0500 |
parents | 6a0e7bf73bb2 |
children | 89a2afe31e82 |
comparison
equal
deleted
inserted
replaced
45864:11842aad3195 | 45865:d7a508a75d72 |
---|---|
232 self._table[name] = func, list(options), synopsis | 232 self._table[name] = func, list(options), synopsis |
233 else: | 233 else: |
234 self._table[name] = func, list(options) | 234 self._table[name] = func, list(options) |
235 return func | 235 return func |
236 | 236 |
237 def rename(self, old, new): | |
238 """rename a command. Used to add aliases, debugstrip -> | |
239 debugstrip|strip | |
240 """ | |
241 self._table[new] = self._table.pop(old) | |
242 | |
237 | 243 |
238 INTENT_READONLY = b'readonly' | 244 INTENT_READONLY = b'readonly' |
239 | 245 |
240 | 246 |
241 class revsetpredicate(_funcregistrarbase): | 247 class revsetpredicate(_funcregistrarbase): |