495
494
def run(self, revision=None, file_list=None):
496
495
from bzrlib.diff import show_diff
496
from bzrlib import find_branch
499
b = find_branch(file_list[0], lock_mode='r')
500
file_list = [b.relpath(f) for f in file_list]
501
if file_list == ['']:
502
# just pointing to top-of-tree
505
b = Branch('.', lock_mode='r')
498
show_diff(Branch('.'), revision, specific_files=file_list)
507
show_diff(b, revision, specific_files=file_list)
586
595
"""Show log of this branch.
588
597
TODO: Option to limit range.
590
TODO: Perhaps show most-recent first with an option for last.
592
600
takes_args = ['filename?']
593
takes_options = ['timezone', 'verbose', 'show-ids']
594
def run(self, filename=None, timezone='original', verbose=False, show_ids=False):
595
from branch import find_branch
596
b = find_branch((filename or '.'), lock_mode='r')
601
takes_options = ['forward', 'timezone', 'verbose', 'show-ids']
603
def run(self, filename=None, timezone='original',
607
from bzrlib import show_log, find_branch
609
direction = (forward and 'forward') or 'reverse'
598
filename = b.relpath(filename)
599
bzrlib.show_log(b, filename,
600
show_timezone=timezone,
612
b = find_branch(filename, lock_mode='r')
613
fp = b.relpath(filename)
615
file_id = b.read_working_inventory().path2id(fp)
617
file_id = None # points to branch root
619
b = find_branch('.', lock_mode='r')
623
show_timezone=timezone,
606
631
class cmd_touching_revisions(Command):
607
"""Return revision-ids which affected a particular file."""
632
"""Return revision-ids which affected a particular file.
634
A more user-friendly interface is "bzr log FILE"."""
609
636
takes_args = ["filename"]
610
637
def run(self, filename):
843
870
failures, tests = 0, 0
845
import doctest, bzrlib.store, bzrlib.tests
872
import doctest, bzrlib.store
846
873
bzrlib.trace.verbose = False
848
875
for m in bzrlib.store, bzrlib.inventory, bzrlib.branch, bzrlib.osutils, \