##// END OF EJS Templates
Get all commands that operate on files to honour --verbose and --quiet....
Bryan O'Sullivan -
r1255:e825dfea default
parent child Browse files
Show More
@@ -485,6 +485,7 b' def add(ui, repo, *pats, **opts):'
485 names = []
485 names = []
486 for src, abs, rel, exact in walk(repo, pats, opts):
486 for src, abs, rel, exact in walk(repo, pats, opts):
487 if exact:
487 if exact:
488 if ui.verbose: ui.status('adding %s\n' % rel)
488 names.append(abs)
489 names.append(abs)
489 elif repo.dirstate.state(abs) == '?':
490 elif repo.dirstate.state(abs) == '?':
490 ui.status('adding %s\n' % rel)
491 ui.status('adding %s\n' % rel)
@@ -497,11 +498,11 b' def addremove(ui, repo, *pats, **opts):'
497 for src, abs, rel, exact in walk(repo, pats, opts):
498 for src, abs, rel, exact in walk(repo, pats, opts):
498 if src == 'f' and repo.dirstate.state(abs) == '?':
499 if src == 'f' and repo.dirstate.state(abs) == '?':
499 add.append(abs)
500 add.append(abs)
500 if not exact:
501 if ui.verbose or not exact:
501 ui.status('adding ', rel, '\n')
502 ui.status('adding ', rel, '\n')
502 if repo.dirstate.state(abs) != 'r' and not os.path.exists(rel):
503 if repo.dirstate.state(abs) != 'r' and not os.path.exists(rel):
503 remove.append(abs)
504 remove.append(abs)
504 if not exact:
505 if ui.verbose or not exact:
505 ui.status('removing ', rel, '\n')
506 ui.status('removing ', rel, '\n')
506 repo.add(add)
507 repo.add(add)
507 repo.remove(remove)
508 repo.remove(remove)
@@ -966,7 +967,7 b' def forget(ui, repo, *pats, **opts):'
966 for src, abs, rel, exact in walk(repo, pats, opts):
967 for src, abs, rel, exact in walk(repo, pats, opts):
967 if repo.dirstate.state(abs) == 'a':
968 if repo.dirstate.state(abs) == 'a':
968 forget.append(abs)
969 forget.append(abs)
969 if not exact:
970 if ui.verbose or not exact:
970 ui.status('forgetting ', rel, '\n')
971 ui.status('forgetting ', rel, '\n')
971 repo.forget(forget)
972 repo.forget(forget)
972
973
@@ -1404,8 +1405,8 b' def remove(ui, repo, pat, *pats, **opts)'
1404 if c: reason = 'is modified'
1405 if c: reason = 'is modified'
1405 elif a: reason = 'has been marked for add'
1406 elif a: reason = 'has been marked for add'
1406 elif u: reason = 'is not managed'
1407 elif u: reason = 'is not managed'
1407 if reason and exact:
1408 if reason:
1408 ui.warn('not removing %s: file %s\n' % (rel, reason))
1409 if exact: ui.warn('not removing %s: file %s\n' % (rel, reason))
1409 else:
1410 else:
1410 return True
1411 return True
1411 for src, abs, rel, exact in walk(repo, (pat,) + pats, opts):
1412 for src, abs, rel, exact in walk(repo, (pat,) + pats, opts):
General Comments 0
You need to be logged in to leave comments. Login now