cache: introduce a changelogsourcebase class
This abstract class will help code that need a cache tracking the changelog
content (eg: the branchmap cache). The cache key used is the same as what the
branchmap uses.
This code was headed for core during the 4.3 cycle but never made it there. So
we starts with a copy in the evolve repository.
# Various utility function for the evolve extension
#
# Copyright 2017 Pierre-Yves David <pierre-yves.david@ens-lyon.org>
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2 or any later version.
shorttemplate = "[{label('evolve.rev', rev)}] {desc|firstline}\n"
def obsexcmsg(ui, message, important=False):
verbose = ui.configbool('experimental', 'verbose-obsolescence-exchange',
False)
if verbose:
message = 'OBSEXC: ' + message
if important or verbose:
ui.status(message)
def obsexcprg(ui, *args, **kwargs):
topic = 'obsmarkers exchange'
if ui.configbool('experimental', 'verbose-obsolescence-exchange', False):
topic = 'OBSEXC'
ui.progress(topic, *args, **kwargs)