/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/commands.py

  • Committer: Robert Collins
  • Date: 2008-07-04 07:01:19 UTC
  • mto: This revision was merged to the branch mainline in revision 3525.
  • Revision ID: robertc@robertcollins.net-20080704070119-qskk0ewwpxpzlfkl
(robertc) Add -Dmemory for quick memory gathering. (Robert Collins)

Show diffs side-by-side

added added

removed removed

Lines of Context:
795
795
            ret = apply_coveraged(opt_coverage_dir, run, *run_argv)
796
796
        else:
797
797
            ret = run(*run_argv)
 
798
        if 'memory' in debug.debug_flags:
 
799
            try:
 
800
                status_file = file('/proc/%s/status' % os.getpid(), 'rb')
 
801
            except IOError:
 
802
                pass
 
803
            else:
 
804
                status = status_file.read()
 
805
                status_file.close()
 
806
                trace.note("Process status after command:")
 
807
                for line in status.splitlines():
 
808
                    trace.note(line)
798
809
        return ret or 0
799
810
    finally:
800
811
        # reset, in case we may do other commands later within the same process