233
233
Not versioned and not matching an ignore pattern.
235
Additionally for directories, symlinks and files with an executable
236
bit, Bazaar indicates their type using a trailing character: '/', '@'
235
Additionally for directories, symlinks and files with a changed
236
executable bit, Bazaar indicates their type using a trailing
237
character: '/', '@' or '*' respectively. These decorations can be
238
disabled using the '--no-classify' option.
239
240
To see ignored files use 'bzr ignored'. For details on the
240
241
changes to file texts, use 'bzr diff'.
281
285
def run(self, show_ids=False, file_list=None, revision=None, short=False,
282
versioned=False, no_pending=False, verbose=False):
286
versioned=False, no_pending=False, verbose=False,
283
288
from bzrlib.status import show_tree_status
285
290
if revision and len(revision) > 2:
299
304
show_tree_status(tree, show_ids=show_ids,
300
305
specific_files=relfile_list, revision=revision,
301
306
to_file=self.outf, short=short, versioned=versioned,
302
show_pending=(not no_pending), verbose=verbose)
307
show_pending=(not no_pending), verbose=verbose,
308
classify=not no_classify)
305
311
class cmd_cat_revision(Command):
797
803
require_versioned=True)
798
804
# find_ids_across_trees may include some paths that don't
799
805
# exist in 'tree'.
800
entries = sorted((tree.id2path(file_id), tree.inventory[file_id])
801
for file_id in file_ids if file_id in tree)
807
(tree.id2path(file_id), tree.inventory[file_id])
808
for file_id in file_ids if tree.has_id(file_id))
803
810
entries = tree.inventory.entries()
2311
2318
:Other filtering:
2313
The --message option can be used for finding revisions that match a
2314
regular expression in a commit message.
2320
The --match option can be used for finding revisions that match a
2321
regular expression in a commit message, committer, author or bug.
2322
Specifying the option several times will match any of the supplied
2323
expressions. --match-author, --match-bugs, --match-committer and
2324
--match-message can be used to only match a specific field.
2316
2326
:Tips & tricks:
2398
2408
Option('signatures',
2399
2409
help='Show digital signature validity'),
2412
help='Show revisions whose properties match this '
2415
ListOption('match-message',
2416
help='Show revisions whose message matches this '
2419
ListOption('match-committer',
2420
help='Show revisions whose committer matches this '
2423
ListOption('match-author',
2424
help='Show revisions whose authors match this '
2427
ListOption('match-bugs',
2428
help='Show revisions whose bugs match this '
2401
2432
encoding_type = 'replace'
2524
2560
match_using_deltas = (len(file_ids) != 1 or filter_by_dir
2525
2561
or delta_type or partial_history)
2565
match_dict[''] = match
2567
match_dict['message'] = match_message
2569
match_dict['committer'] = match_committer
2571
match_dict['author'] = match_author
2573
match_dict['bugs'] = match_bugs
2527
2575
# Build the LogRequest and execute it
2528
2576
if len(file_ids) == 0:
2529
2577
file_ids = None
2532
2580
start_revision=rev1, end_revision=rev2, limit=limit,
2533
2581
message_search=message, delta_type=delta_type,
2534
2582
diff_type=diff_type, _match_using_deltas=match_using_deltas,
2535
exclude_common_ancestry=exclude_common_ancestry,
2583
exclude_common_ancestry=exclude_common_ancestry, match=match_dict,
2536
2584
signature=signatures
2538
2586
Logger(b, rqst).show(lf)
3026
3074
old_file_id = rev_tree.path2id(relpath)
3076
# TODO: Split out this code to something that generically finds the
3077
# best id for a path across one or more trees; it's like
3078
# find_ids_across_trees but restricted to find just one. -- mbp
3028
3080
if name_from_revision:
3029
3081
# Try in revision if requested
3030
3082
if old_file_id is None:
3032
3084
"%r is not present in revision %s" % (
3033
3085
filename, rev_tree.get_revision_id()))
3035
content = rev_tree.get_file_text(old_file_id)
3087
actual_file_id = old_file_id
3037
3089
cur_file_id = tree.path2id(relpath)
3039
if cur_file_id is not None:
3040
# Then try with the actual file id
3042
content = rev_tree.get_file_text(cur_file_id)
3044
except errors.NoSuchId:
3045
# The actual file id didn't exist at that time
3047
if not found and old_file_id is not None:
3048
# Finally try with the old file id
3049
content = rev_tree.get_file_text(old_file_id)
3052
# Can't be found anywhere
3090
if cur_file_id is not None and rev_tree.has_id(cur_file_id):
3091
actual_file_id = cur_file_id
3092
elif old_file_id is not None:
3093
actual_file_id = old_file_id
3053
3095
raise errors.BzrCommandError(
3054
3096
"%r is not present in revision %s" % (
3055
3097
filename, rev_tree.get_revision_id()))
3057
from bzrlib.filters import (
3058
ContentFilterContext,
3059
filtered_output_bytes,
3061
filters = rev_tree._content_filter_stack(relpath)
3062
chunks = content.splitlines(True)
3063
content = filtered_output_bytes(chunks, filters,
3064
ContentFilterContext(relpath, rev_tree))
3066
self.outf.writelines(content)
3099
from bzrlib.filter_tree import ContentFilterTree
3100
filter_tree = ContentFilterTree(rev_tree,
3101
rev_tree._content_filter_stack)
3102
content = filter_tree.get_file_text(actual_file_id)
3069
self.outf.write(content)
3104
content = rev_tree.get_file_text(actual_file_id)
3106
self.outf.write(content)
3072
3109
class cmd_local_time_offset(Command):
3291
3328
raise errors.BzrCommandError("please specify a commit"
3292
3329
" message with either --message or --file")
3293
3330
if my_message == "":
3294
raise errors.BzrCommandError("empty commit message specified")
3331
raise errors.BzrCommandError("Empty commit message specified."
3332
" Please specify a commit message with either"
3333
" --message or --file or leave a blank message"
3334
" with --message \"\".")
3295
3335
return my_message
3297
3337
# The API permits a commit with a filter of [] to mean 'select nothing'