diff mercurial/commands.py @ 23325:4165cfd67519

remove: recurse into subrepositories with --subrepos/-S flag Like 'forget', git and svn subrepos are currently not supported. Unfortunately the name 'remove' is already used in the subrepo classes, so we break the convention of naming the subrepo function after the command.
author Matt Harbison <matt_harbison@yahoo.com>
date Sat, 15 Nov 2014 21:36:19 -0500
parents 3177d710630d
children 1cbc00ff2373
line wrap: on
line diff
--- a/mercurial/commands.py	Sat Nov 15 13:50:43 2014 +0900
+++ b/mercurial/commands.py	Sat Nov 15 21:36:19 2014 -0500
@@ -5086,7 +5086,7 @@
     [('A', 'after', None, _('record delete for missing files')),
     ('f', 'force', None,
      _('remove (and delete) file even if added or modified')),
-    ] + walkopts,
+    ] + subrepoopts + walkopts,
     _('[OPTION]... FILE...'),
     inferrepo=True)
 def remove(ui, repo, *pats, **opts):
@@ -5131,7 +5131,8 @@
         raise util.Abort(_('no files specified'))
 
     m = scmutil.match(repo[None], pats, opts)
-    return cmdutil.remove(ui, repo, m, after, force)
+    subrepos = opts.get('subrepos')
+    return cmdutil.remove(ui, repo, m, "", after, force, subrepos)
 
 @command('rename|move|mv',
     [('A', 'after', None, _('record a rename that has already occurred')),