~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/commands.py

  • Committer: Martin Pool
  • Date: 2005-08-29 04:05:28 UTC
  • Revision ID: mbp@sourcefrog.net-20050829040528-3fb016af15c4e4c0
- smart_add routine now doesn't print filenames directly, but rather
  returns them to the caller for appropriate display.  the add command
  displays them in the same way as before.

Show diffs side-by-side

added added

removed removed

Lines of Context:
468
468
    
469
469
    def run(self, file_list, verbose=False, no_recurse=False):
470
470
        from bzrlib.add import smart_add
471
 
        smart_add(file_list, verbose, not no_recurse)
 
471
 
 
472
        recurse = not no_recurse
 
473
        for path, kind, file_id in smart_add(file_list, verbose, recurse):
 
474
            print 'added', path
472
475
 
473
476
 
474
477
 
1373
1376
class cmd_upgrade(Command):
1374
1377
    """Upgrade branch storage to current format.
1375
1378
 
1376
 
    This should normally be used only after the check command tells
1377
 
    you to run it.
 
1379
    The check command or bzr developers may sometimes advise you to run
 
1380
    this command.
1378
1381
    """
1379
1382
    takes_args = ['dir?']
1380
1383
 
1414
1417
 
1415
1418
        save_ui = bzrlib.ui.ui_factory
1416
1419
        bzrlib.trace.info('running tests...')
1417
 
        bzrlib.trace.disable_default_logging()
1418
1420
        try:
1419
1421
            bzrlib.ui.ui_factory = bzrlib.ui.SilentUIFactory()
1420
1422
            result = selftest(verbose=verbose)
1424
1426
                bzrlib.trace.info('tests failed')
1425
1427
            return int(not result)
1426
1428
        finally:
1427
 
            bzrlib.trace.enable_default_logging()
1428
1429
            bzrlib.ui.ui_factory = save_ui
1429
1430
 
1430
1431