32
32
visualise Graphically visualise this branch.
37
version_info = (0, 92, 0, 'dev', 0)
39
version_info = (0, 93, 0, 'dev', 0)
39
41
if version_info[3] == 'final':
40
42
version_string = '%d.%d.%d' % version_info[:3]
351
353
(wt, path) = workingtree.WorkingTree.open_containing(filename)
353
355
except NoWorkingTree, e:
355
(br, path) = branch.Branch.open_containing(path)
357
commit = CommitDialog(wt, path, not br)
356
from dialog import error_dialog
357
error_dialog(_('Directory does not have a working tree'),
358
_('Operation aborted.'))
359
return 1 # should this be retval=3?
361
# It is a good habit to keep things locked for the duration, but it
362
# could cause difficulties if someone wants to do things in another
363
# window... We could lock_read() until we actually go to commit
364
# changes... Just a thought.
367
dlg = CommitDialog(wt)
362
373
class cmd_gstatus(GTKCommand):
608
619
register_command(cmd_gselftest)
622
class cmd_test_gtk(GTKCommand):
623
"""Version of selftest that just runs the gtk test suite."""
625
takes_options = ['verbose',
626
Option('one', short_name='1',
627
help='stop when one test fails'),
628
Option('benchmark', help='run the benchmarks.'),
629
Option('lsprof-timed',
630
help='generate lsprof output for benchmarked'
631
' sections of code.'),
633
help='list the tests instead of running them'),
634
Option('randomize', type=str, argname="SEED",
635
help='randomize the order of tests using the given'
636
' seed or "now" for the current time'),
638
takes_args = ['testspecs*']
640
def run(self, verbose=None, one=False, benchmark=None,
641
lsprof_timed=None, list_only=False, randomize=None,
642
testspecs_list=None):
643
from bzrlib import __path__ as bzrlib_path
644
from bzrlib.tests import selftest
646
print '%10s: %s' % ('bzrlib', bzrlib_path[0])
648
print 'No benchmarks yet'
651
test_suite_factory = bench_suite
654
# TODO: should possibly lock the history file...
655
benchfile = open(".perf_history", "at", buffering=1)
657
test_suite_factory = test_suite
662
if testspecs_list is not None:
663
pattern = '|'.join(testspecs_list)
668
result = selftest(verbose=verbose,
671
test_suite_factory=test_suite_factory,
672
lsprof_timed=lsprof_timed,
673
bench_history=benchfile,
675
random_seed=randomize,
678
if benchfile is not None:
681
register_command(cmd_test_gtk)
612
685
gettext.install('olive-gtk')