comparison mercurial/commands.py @ 43859:fb4a6d584756

status: split morestatus data loading from display This is a small refactoring in preparation for adding more morestatus functionality (notably for templated/JSON output) - the goal is to use the data inside the status display loop, as well as output the overall state in a templatable/structured way. Differential Revision: https://phab.mercurial-scm.org/D7593
author Rodrigo Damazio Bovendorp <rdamazio@google.com>
date Mon, 09 Dec 2019 18:15:38 -0800
parents a6483107a07a
children 7315464f0613
comparison
equal deleted inserted replaced
43858:79c0121220e3 43859:fb4a6d584756
6865 or opts.get(b'copies') 6865 or opts.get(b'copies')
6866 or ui.configbool(b'ui', b'statuscopies') 6866 or ui.configbool(b'ui', b'statuscopies')
6867 ) and not opts.get(b'no_status'): 6867 ) and not opts.get(b'no_status'):
6868 copy = copies.pathcopies(ctx1, ctx2, m) 6868 copy = copies.pathcopies(ctx1, ctx2, m)
6869 6869
6870 morestatus = None
6871 if (
6872 ui.verbose or ui.configbool(b'commands', b'status.verbose')
6873 ) and not ui.plain():
6874 morestatus = cmdutil.readmorestatus(repo)
6875
6870 ui.pager(b'status') 6876 ui.pager(b'status')
6871 fm = ui.formatter(b'status', opts) 6877 fm = ui.formatter(b'status', opts)
6872 fmt = b'%s' + end 6878 fmt = b'%s' + end
6873 showchar = not opts.get(b'no_status') 6879 showchar = not opts.get(b'no_status')
6874 6880
6886 fm.plain( 6892 fm.plain(
6887 (b' %s' + end) % uipathfn(copy[f]), 6893 (b' %s' + end) % uipathfn(copy[f]),
6888 label=b'status.copied', 6894 label=b'status.copied',
6889 ) 6895 )
6890 6896
6891 if ( 6897 if morestatus:
6892 ui.verbose or ui.configbool(b'commands', b'status.verbose') 6898 morestatus.formatfooter(fm)
6893 ) and not ui.plain():
6894 cmdutil.morestatus(repo, fm)
6895 fm.end() 6899 fm.end()
6896 6900
6897 6901
6898 @command( 6902 @command(
6899 b'summary|sum', 6903 b'summary|sum',