Show More
@@ -420,11 +420,10 b' def _status(ui, repo, wctx, kwt, *pats, ' | |||||
420 | """Bails out if [keyword] configuration is not active. |
|
420 | """Bails out if [keyword] configuration is not active. | |
421 | Returns status of working directory.""" |
|
421 | Returns status of working directory.""" | |
422 | if kwt: |
|
422 | if kwt: | |
423 | opts = pycompat.byteskwargs(opts) |
|
|||
424 | return repo.status( |
|
423 | return repo.status( | |
425 | match=scmutil.match(wctx, pats, opts), |
|
424 | match=scmutil.match(wctx, pats, pycompat.byteskwargs(opts)), | |
426 | clean=True, |
|
425 | clean=True, | |
427 |
unknown=opts.get( |
|
426 | unknown=opts.get('unknown') or opts.get('all'), | |
428 | ) |
|
427 | ) | |
429 | if ui.configitems(b'keyword'): |
|
428 | if ui.configitems(b'keyword'): | |
430 | raise error.Abort(_(b'[keyword] patterns cannot match')) |
|
429 | raise error.Abort(_(b'[keyword] patterns cannot match')) | |
@@ -604,26 +603,26 b' def files(ui, repo, *pats, **opts):' | |||||
604 | else: |
|
603 | else: | |
605 | cwd = b'' |
|
604 | cwd = b'' | |
606 | files = [] |
|
605 | files = [] | |
607 | opts = pycompat.byteskwargs(opts) |
|
606 | ||
608 |
if not opts.get( |
|
607 | if not opts.get('unknown') or opts.get('all'): | |
609 | files = sorted(status.modified + status.added + status.clean) |
|
608 | files = sorted(status.modified + status.added + status.clean) | |
610 | kwfiles = kwt.iskwfile(files, wctx) |
|
609 | kwfiles = kwt.iskwfile(files, wctx) | |
611 | kwdeleted = kwt.iskwfile(status.deleted, wctx) |
|
610 | kwdeleted = kwt.iskwfile(status.deleted, wctx) | |
612 | kwunknown = kwt.iskwfile(status.unknown, wctx) |
|
611 | kwunknown = kwt.iskwfile(status.unknown, wctx) | |
613 |
if not opts.get( |
|
612 | if not opts.get('ignore') or opts.get('all'): | |
614 | showfiles = kwfiles, kwdeleted, kwunknown |
|
613 | showfiles = kwfiles, kwdeleted, kwunknown | |
615 | else: |
|
614 | else: | |
616 | showfiles = [], [], [] |
|
615 | showfiles = [], [], [] | |
617 |
if opts.get( |
|
616 | if opts.get('all') or opts.get('ignore'): | |
618 | showfiles += ( |
|
617 | showfiles += ( | |
619 | [f for f in files if f not in kwfiles], |
|
618 | [f for f in files if f not in kwfiles], | |
620 | [f for f in status.unknown if f not in kwunknown], |
|
619 | [f for f in status.unknown if f not in kwunknown], | |
621 | ) |
|
620 | ) | |
622 | kwlabels = b'enabled deleted enabledunknown ignored ignoredunknown'.split() |
|
621 | kwlabels = b'enabled deleted enabledunknown ignored ignoredunknown'.split() | |
623 | kwstates = zip(kwlabels, pycompat.bytestr(b'K!kIi'), showfiles) |
|
622 | kwstates = zip(kwlabels, pycompat.bytestr(b'K!kIi'), showfiles) | |
624 | fm = ui.formatter(b'kwfiles', opts) |
|
623 | fm = ui.formatter(b'kwfiles', pycompat.byteskwargs(opts)) | |
625 | fmt = b'%.0s%s\n' |
|
624 | fmt = b'%.0s%s\n' | |
626 |
if opts.get( |
|
625 | if opts.get('all') or ui.verbose: | |
627 | fmt = b'%s %s\n' |
|
626 | fmt = b'%s %s\n' | |
628 | for kwstate, char, filenames in kwstates: |
|
627 | for kwstate, char, filenames in kwstates: | |
629 | label = b'kwfiles.' + kwstate |
|
628 | label = b'kwfiles.' + kwstate |
General Comments 0
You need to be logged in to leave comments.
Login now