comparison hgext/largefiles/overrides.py @ 46368:bb3a5c0df06b

purge: move extension into core mercurial The motivation is simple: it's nicer to avoid gating basic functionality. To reduce the risk of people shooting themselves in the feet, `--confirm` is now the default, unless the extensions is loaded.. For review of the body of the purge command, use this instead of what hg/phabricator will show (the block of code is modified, not just moved): Differential Revision: https://phab.mercurial-scm.org/D9820
author Valentin Gatien-Baron <valentin.gatienbaron@gmail.com>
date Mon, 18 Jan 2021 10:24:20 +0100
parents 4b89cf08d8dc
children d67732a4b58a
comparison
equal deleted inserted replaced
46367:57370e7deb7b 46368:bb3a5c0df06b
1565 return orig(repo, matcher, prefix, uipathfn, opts) 1565 return orig(repo, matcher, prefix, uipathfn, opts)
1566 1566
1567 1567
1568 # Calling purge with --all will cause the largefiles to be deleted. 1568 # Calling purge with --all will cause the largefiles to be deleted.
1569 # Override repo.status to prevent this from happening. 1569 # Override repo.status to prevent this from happening.
1570 @eh.wrapcommand(b'purge', extension=b'purge') 1570 @eh.wrapcommand(b'purge')
1571 def overridepurge(orig, ui, repo, *dirs, **opts): 1571 def overridepurge(orig, ui, repo, *dirs, **opts):
1572 # XXX Monkey patching a repoview will not work. The assigned attribute will 1572 # XXX Monkey patching a repoview will not work. The assigned attribute will
1573 # be set on the unfiltered repo, but we will only lookup attributes in the 1573 # be set on the unfiltered repo, but we will only lookup attributes in the
1574 # unfiltered repo if the lookup in the repoview object itself fails. As the 1574 # unfiltered repo if the lookup in the repoview object itself fails. As the
1575 # monkey patched method exists on the repoview class the lookup will not 1575 # monkey patched method exists on the repoview class the lookup will not