stablerange: move 'depth' inside a new 'stablerange' module
The stablerange used for discovery requires significant amount of code. There is
algorithme, cache, cache persistence, etc. So we create a dedicated module for
it.
The function is directly moved into a rich class handling cache (for now in
memory) because we know we will need it.
# 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.
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)