34
34
def report_changes(to_file, old, new, specific_files,
35
35
show_short_reporter, show_long_callback,
36
36
short=False, want_unchanged=False,
37
want_unversioned=False, show_ids=False, classify=True):
37
want_unversioned=False, show_ids=False):
38
38
"""Display summary of changes.
40
40
This compares two trees with regards to a list of files, and delegates
77
76
delta.unversioned if not new.is_ignored(unversioned[0])]
78
77
show_long_callback(to_file, delta,
80
show_unchanged=want_unchanged,
79
show_unchanged=want_unchanged)
84
82
def show_tree_status(wt, show_unchanged=None,
120
117
:param verbose: If True, show all merged revisions, not just
122
119
:param versioned: If True, only shows versioned files.
123
:param classify: Add special symbols to indicate file kind.
124
120
:param show_long_callback: A callback: message = show_long_callback(to_file, delta,
125
121
show_ids, show_unchanged, indent, filter), only used with the long output
166
162
# Reporter used for short outputs
167
163
reporter = _mod_delta._ChangeReporter(output_file=to_file,
168
unversioned_filter=new.is_ignored, classify=classify)
164
unversioned_filter=new.is_ignored)
169
165
report_changes(to_file, old, new, specific_files,
170
166
reporter, show_long_callback,
171
167
short=short, want_unchanged=show_unchanged,
172
want_unversioned=want_unversioned, show_ids=show_ids,
168
want_unversioned=want_unversioned, show_ids=show_ids)
175
170
# show the ignored files among specific files (i.e. show the files
176
171
# identified from input that we choose to ignore).
202
to_file.write("%s %s\n" % (prefix, unicode(conflict)))
197
to_file.write("%s %s\n" % (prefix, conflict))
203
198
# Show files that were requested but don't exist (and are
204
199
# not versioned). We don't involve delta in this; these
205
200
# paths are really the province of just the status
384
379
These are all empty initially, because by default nothing should get
387
_mod_hooks.Hooks.__init__(self, "bzrlib.status", "hooks")
388
self.add_hook('post_status',
382
_mod_hooks.Hooks.__init__(self)
383
self.create_hook(_mod_hooks.HookPoint('post_status',
389
384
"Called with argument StatusHookParams after Bazaar has "
390
385
"displayed the status. StatusHookParams has the attributes "
391
386
"(old_tree, new_tree, to_file, versioned, show_ids, short, "
392
387
"verbose). The last four arguments correspond to the command "
393
388
"line options specified by the user for the status command. "
394
389
"to_file is the output stream for writing.",
396
self.add_hook('pre_status',
391
self.create_hook(_mod_hooks.HookPoint('pre_status',
397
392
"Called with argument StatusHookParams before Bazaar "
398
393
"displays the status. StatusHookParams has the attributes "
399
394
"(old_tree, new_tree, to_file, versioned, show_ids, short, "
400
395
"verbose). The last four arguments correspond to the command "
401
396
"line options specified by the user for the status command. "
402
397
"to_file is the output stream for writing.",
406
401
class StatusHookParams(object):