# HG changeset patch # User Oben Sonne # Date 1393507363 -3600 # Node ID 046811b7cb2daafabf55bf700dd69c3aac051443 # Parent 1cb3af183d2f692622f84da88d5ca18bd4f91b1f Use format string from HGRC if available This allows repository specific prompts (e.g. no status in large repos or no incoming/outgoing on repos where the remote communication is too slow). diff -r 1cb3af183d2f -r 046811b7cb2d prompt.py --- a/prompt.py Mon Feb 10 14:14:04 2014 +0100 +++ b/prompt.py Thu Feb 27 14:22:43 2014 +0100 @@ -362,7 +362,6 @@ return _with_groups(m.groups(), '^') if current_rev != repo[tip] else '' - if opts.get("angle_brackets"): tag_start = r'\<([^><]*?\<)?' tag_end = r'(\>[^><]*?)?>' @@ -427,6 +426,10 @@ if opts.get("cache_outgoing"): _cache_remote(repo, 'outgoing') + hgrc_fs = repo.ui.config("prompt", "template") + if hgrc_fs is not None: + fs = hgrc_fs + for tag, repl in patterns.items(): fs = re.sub(tag_start + tag + tag_end, repl, fs) ui.status(fs)