~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/commands.py

  • Committer: Robert Collins
  • Date: 2005-08-24 12:13:13 UTC
  • mto: (974.1.50) (1185.1.10) (1092.3.1)
  • mto: This revision was merged to the branch mainline in revision 1139.
  • Revision ID: robertc@robertcollins.net-20050824121313-f604a90d56310911
merge up with mpool

Show diffs side-by-side

added added

removed removed

Lines of Context:
717
717
                    msg = "The branch %s has no revision %d." % (from_location,
718
718
                                                                 revno)
719
719
                    raise BzrCommandError(msg)
720
 
            
 
720
 
721
721
            merge((to_location, -1), (to_location, 0), this_dir=to_location,
722
722
                  check_clean=False, ignore_zero=True)
723
723
            from_location = pull_loc(br_from)
1344
1344
 
1345
1345
    def run(self, dir='.'):
1346
1346
        from bzrlib.check import check
 
1347
 
1347
1348
        check(find_branch(dir))
1348
1349
 
1349
1350
 
1350
 
 
1351
1351
class cmd_scan_cache(Command):
1352
1352
    hidden = True
1353
1353
    def run(self):
1404
1404
    hidden = True
1405
1405
    takes_options = ['verbose', 'pattern']
1406
1406
    def run(self, verbose=False, pattern=".*"):
 
1407
        import bzrlib.ui
1407
1408
        from bzrlib.selftest import selftest
1408
 
        return int(not selftest(verbose=verbose, pattern=pattern))
 
1409
        # we don't want progress meters from the tests to go to the
 
1410
        # real output.
 
1411
        save_ui = bzrlib.ui.ui_factory
 
1412
        try:
 
1413
            bzrlib.ui.ui_factory = bzrlib.ui.SilentUIFactory()
 
1414
            return int(not selftest(verbose=verbose, pattern=pattern))
 
1415
        finally:
 
1416
            bzrlib.ui.ui_factory = save_ui
1409
1417
 
1410
1418
 
1411
1419
class cmd_version(Command):
1938
1946
 
1939
1947
 
1940
1948
def main(argv):
 
1949
    import bzrlib.ui
 
1950
    
1941
1951
    bzrlib.trace.open_tracefile(argv)
1942
1952
 
 
1953
    bzrlib.ui.ui_factory = bzrlib.ui.TextUIFactory()
 
1954
 
1943
1955
    try:
1944
1956
        try:
1945
1957
            return run_bzr(argv[1:])