Show More
@@ -171,9 +171,8 b' def _preselect(wstatus, changed):' | |||
|
171 | 171 | '''Retrieves modified and added files from a working directory state |
|
172 | 172 | and returns the subset of each contained in given changed files |
|
173 | 173 | retrieved from a change context.''' |
|
174 | modified, added = wstatus[:2] | |
|
175 |
|
|
|
176 | added = [f for f in added if f in changed] | |
|
174 | modified = [f for f in wstatus.modified if f in changed] | |
|
175 | added = [f for f in wstatus.added if f in changed] | |
|
177 | 176 | return modified, added |
|
178 | 177 | |
|
179 | 178 | |
@@ -349,10 +348,9 b' def _kwfwrite(ui, repo, expand, *pats, *' | |||
|
349 | 348 | wlock = repo.wlock() |
|
350 | 349 | try: |
|
351 | 350 | status = _status(ui, repo, wctx, kwt, *pats, **opts) |
|
352 | modified, added, removed, deleted, unknown, ignored, clean = status | |
|
353 | if modified or added or removed or deleted: | |
|
351 | if status.modified or status.added or status.removed or status.deleted: | |
|
354 | 352 | raise util.Abort(_('outstanding uncommitted changes')) |
|
355 | kwt.overwrite(wctx, clean, True, expand) | |
|
353 | kwt.overwrite(wctx, status.clean, True, expand) | |
|
356 | 354 | finally: |
|
357 | 355 | wlock.release() |
|
358 | 356 | |
@@ -503,20 +501,19 b' def files(ui, repo, *pats, **opts):' | |||
|
503 | 501 | wctx = repo[None] |
|
504 | 502 | status = _status(ui, repo, wctx, kwt, *pats, **opts) |
|
505 | 503 | cwd = pats and repo.getcwd() or '' |
|
506 | modified, added, removed, deleted, unknown, ignored, clean = status | |
|
507 | 504 | files = [] |
|
508 | 505 | if not opts.get('unknown') or opts.get('all'): |
|
509 | files = sorted(modified + added + clean) | |
|
506 | files = sorted(status.modified + status.added + status.clean) | |
|
510 | 507 | kwfiles = kwt.iskwfile(files, wctx) |
|
511 | kwdeleted = kwt.iskwfile(deleted, wctx) | |
|
512 | kwunknown = kwt.iskwfile(unknown, wctx) | |
|
508 | kwdeleted = kwt.iskwfile(status.deleted, wctx) | |
|
509 | kwunknown = kwt.iskwfile(status.unknown, wctx) | |
|
513 | 510 | if not opts.get('ignore') or opts.get('all'): |
|
514 | 511 | showfiles = kwfiles, kwdeleted, kwunknown |
|
515 | 512 | else: |
|
516 | 513 | showfiles = [], [], [] |
|
517 | 514 | if opts.get('all') or opts.get('ignore'): |
|
518 | 515 | showfiles += ([f for f in files if f not in kwfiles], |
|
519 | [f for f in unknown if f not in kwunknown]) | |
|
516 | [f for f in status.unknown if f not in kwunknown]) | |
|
520 | 517 | kwlabels = 'enabled deleted enabledunknown ignored ignoredunknown'.split() |
|
521 | 518 | kwstates = zip(kwlabels, 'K!kIi', showfiles) |
|
522 | 519 | fm = ui.formatter('kwfiles', opts) |
General Comments 0
You need to be logged in to leave comments.
Login now