@@ 19,13 19,6 @@ def extsetup(ui):
entry = wrapcommand(commands.table, 'commit', mvcheck)
entry[1].append(('', 'no-move-detection', None,
_('disable automatic' + 'file move detection')))
- try:
- module = extensions.find('fbamend')
- entry = wrapcommand(module.cmdtable, 'amend', mvcheck)
- entry[1].append(('', 'no-move-detection', None,
- _('disable automatic' + 'file move detection')))
- except KeyError:
- pass
def mvcheck(orig, ui, repo, *pats, **opts):
if not opts.get('no_move_detection'):
@@ 58,6 58,17 @@ def uisetup(ui):
] + amendopts + commands.walkopts + commands.commitopts,
_('hg amend [OPTION]...'))(amend)
+ def has_automv(loaded):
+ if not loaded:
+ return
+ automv = extensions.find('automv')
+ entry = extensions.wrapcommand(cmdtable, 'amend', automv.mvcheck)
+ entry[1].append(
+ ('', 'no-move-detection', None,
+ _('disable automatic file move detection')))
+ extensions.afterloaded('automv', has_automv)
+
+
def commit(orig, ui, repo, *pats, **opts):
if opts.get("amend"):
# commit --amend default behavior is to prompt for edit