197
to_file.write("%s %s\n" % (prefix, unicode(conflict)))
197
to_file.write("%s %s\n" % (prefix, conflict))
198
198
# Show files that were requested but don't exist (and are
199
199
# not versioned). We don't involve delta in this; these
200
200
# paths are really the province of just the status
379
379
These are all empty initially, because by default nothing should get
382
_mod_hooks.Hooks.__init__(self, "bzrlib.status", "hooks")
383
self.add_hook('post_status',
382
_mod_hooks.Hooks.__init__(self)
383
self.create_hook(_mod_hooks.HookPoint('post_status',
384
384
"Called with argument StatusHookParams after Bazaar has "
385
385
"displayed the status. StatusHookParams has the attributes "
386
386
"(old_tree, new_tree, to_file, versioned, show_ids, short, "
387
387
"verbose). The last four arguments correspond to the command "
388
388
"line options specified by the user for the status command. "
389
389
"to_file is the output stream for writing.",
391
self.add_hook('pre_status',
391
self.create_hook(_mod_hooks.HookPoint('pre_status',
392
392
"Called with argument StatusHookParams before Bazaar "
393
393
"displays the status. StatusHookParams has the attributes "
394
394
"(old_tree, new_tree, to_file, versioned, show_ids, short, "
395
395
"verbose). The last four arguments correspond to the command "
396
396
"line options specified by the user for the status command. "
397
397
"to_file is the output stream for writing.",
401
401
class StatusHookParams(object):
445
445
:param params: StatusHookParams.
447
get_shelf_manager = getattr(params.new_tree, 'get_shelf_manager', None)
448
if get_shelf_manager is None:
450
manager = get_shelf_manager()
447
manager = params.new_tree.get_shelf_manager()
451
448
shelves = manager.active_shelves()
453
singular = '%d shelf exists. '
454
plural = '%d shelves exist. '
455
if len(shelves) == 1:
459
params.to_file.write(fmt % len(shelves))
460
params.to_file.write('See "bzr shelve --list" for details.\n')
450
params.to_file.write('%d shelves exist. '
451
'See "bzr shelve --list" for details.\n' % len(shelves))
463
454
hooks = StatusHooks()