3223 opts=patch.diffallopts(ui, opts)) |
3223 opts=patch.diffallopts(ui, opts)) |
3224 |
3224 |
3225 @command('files', |
3225 @command('files', |
3226 [('r', 'rev', '', _('search the repository as it is in REV'), _('REV')), |
3226 [('r', 'rev', '', _('search the repository as it is in REV'), _('REV')), |
3227 ('0', 'print0', None, _('end filenames with NUL, for use with xargs')), |
3227 ('0', 'print0', None, _('end filenames with NUL, for use with xargs')), |
3228 ] + walkopts + formatteropts, |
3228 ] + walkopts + formatteropts + subrepoopts, |
3229 _('[OPTION]... [PATTERN]...')) |
3229 _('[OPTION]... [PATTERN]...')) |
3230 def files(ui, repo, *pats, **opts): |
3230 def files(ui, repo, *pats, **opts): |
3231 """list tracked files |
3231 """list tracked files |
3232 |
3232 |
3233 Print files under Mercurial control in the working directory or |
3233 Print files under Mercurial control in the working directory or |
3278 end = '\0' |
3278 end = '\0' |
3279 fm = ui.formatter('files', opts) |
3279 fm = ui.formatter('files', opts) |
3280 fmt = '%s' + end |
3280 fmt = '%s' + end |
3281 |
3281 |
3282 m = scmutil.match(ctx, pats, opts) |
3282 m = scmutil.match(ctx, pats, opts) |
3283 ret = cmdutil.files(ui, ctx, m, fm, fmt) |
3283 ret = cmdutil.files(ui, ctx, m, fm, fmt, opts.get('subrepos')) |
3284 |
3284 |
3285 fm.end() |
3285 fm.end() |
3286 |
3286 |
3287 return ret |
3287 return ret |
3288 |
3288 |