4211 |
4211 |
4212 @command('^remove|rm', |
4212 @command('^remove|rm', |
4213 [('A', 'after', None, _('record delete for missing files')), |
4213 [('A', 'after', None, _('record delete for missing files')), |
4214 ('f', 'force', None, |
4214 ('f', 'force', None, |
4215 _('forget added files, delete modified files')), |
4215 _('forget added files, delete modified files')), |
4216 ] + subrepoopts + walkopts, |
4216 ] + subrepoopts + walkopts + dryrunopts, |
4217 _('[OPTION]... FILE...'), |
4217 _('[OPTION]... FILE...'), |
4218 inferrepo=True) |
4218 inferrepo=True) |
4219 def remove(ui, repo, *pats, **opts): |
4219 def remove(ui, repo, *pats, **opts): |
4220 """remove the specified files on the next commit |
4220 """remove the specified files on the next commit |
4221 |
4221 |
4255 Returns 0 on success, 1 if any warnings encountered. |
4255 Returns 0 on success, 1 if any warnings encountered. |
4256 """ |
4256 """ |
4257 |
4257 |
4258 opts = pycompat.byteskwargs(opts) |
4258 opts = pycompat.byteskwargs(opts) |
4259 after, force = opts.get('after'), opts.get('force') |
4259 after, force = opts.get('after'), opts.get('force') |
|
4260 dryrun = opts.get('dry_run') |
4260 if not pats and not after: |
4261 if not pats and not after: |
4261 raise error.Abort(_('no files specified')) |
4262 raise error.Abort(_('no files specified')) |
4262 |
4263 |
4263 m = scmutil.match(repo[None], pats, opts) |
4264 m = scmutil.match(repo[None], pats, opts) |
4264 subrepos = opts.get('subrepos') |
4265 subrepos = opts.get('subrepos') |
4265 return cmdutil.remove(ui, repo, m, "", after, force, subrepos) |
4266 return cmdutil.remove(ui, repo, m, "", after, force, subrepos, |
|
4267 dryrun=dryrun) |
4266 |
4268 |
4267 @command('rename|move|mv', |
4269 @command('rename|move|mv', |
4268 [('A', 'after', None, _('record a rename that has already occurred')), |
4270 [('A', 'after', None, _('record a rename that has already occurred')), |
4269 ('f', 'force', None, _('forcibly copy over an existing managed file')), |
4271 ('f', 'force', None, _('forcibly copy over an existing managed file')), |
4270 ] + walkopts + dryrunopts, |
4272 ] + walkopts + dryrunopts, |