author | Pierre-Yves David <pierre-yves.david@octobus.net> |
Tue, 23 May 2017 10:48:21 +0200 | |
branch | stable |
changeset 2472 | 3722b2ac1853 |
parent 2125 | e0a25339ff17 |
child 2763 | 4a5b0c373e65 |
permissions | -rw-r--r-- |
2047
ce39d0f9976d
serveronly: give the sub extension a way to access to the 'evolve' module
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
1 |
# Various utility function for the evolve extension |
ce39d0f9976d
serveronly: give the sub extension a way to access to the 'evolve' module
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
2 |
# |
ce39d0f9976d
serveronly: give the sub extension a way to access to the 'evolve' module
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
3 |
# Copyright 2017 Pierre-Yves David <pierre-yves.david@ens-lyon.org> |
ce39d0f9976d
serveronly: give the sub extension a way to access to the 'evolve' module
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
4 |
# |
ce39d0f9976d
serveronly: give the sub extension a way to access to the 'evolve' module
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
5 |
# This software may be used and distributed according to the terms of the |
ce39d0f9976d
serveronly: give the sub extension a way to access to the 'evolve' module
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
6 |
# GNU General Public License version 2 or any later version. |
ce39d0f9976d
serveronly: give the sub extension a way to access to the 'evolve' module
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
7 |
|
ce39d0f9976d
serveronly: give the sub extension a way to access to the 'evolve' module
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
8 |
def obsexcmsg(ui, message, important=False): |
ce39d0f9976d
serveronly: give the sub extension a way to access to the 'evolve' module
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
9 |
verbose = ui.configbool('experimental', 'verbose-obsolescence-exchange', |
ce39d0f9976d
serveronly: give the sub extension a way to access to the 'evolve' module
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
10 |
False) |
ce39d0f9976d
serveronly: give the sub extension a way to access to the 'evolve' module
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
11 |
if verbose: |
ce39d0f9976d
serveronly: give the sub extension a way to access to the 'evolve' module
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
12 |
message = 'OBSEXC: ' + message |
ce39d0f9976d
serveronly: give the sub extension a way to access to the 'evolve' module
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
13 |
if important or verbose: |
ce39d0f9976d
serveronly: give the sub extension a way to access to the 'evolve' module
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
diff
changeset
|
14 |
ui.status(message) |
2054
f9d65d24b9f9
discovery: split discovery related code in 'obsdiscovery'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
2047
diff
changeset
|
15 |
|
f9d65d24b9f9
discovery: split discovery related code in 'obsdiscovery'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
2047
diff
changeset
|
16 |
def obsexcprg(ui, *args, **kwargs): |
f9d65d24b9f9
discovery: split discovery related code in 'obsdiscovery'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
2047
diff
changeset
|
17 |
topic = 'obsmarkers exchange' |
f9d65d24b9f9
discovery: split discovery related code in 'obsdiscovery'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
2047
diff
changeset
|
18 |
if ui.configbool('experimental', 'verbose-obsolescence-exchange', False): |
f9d65d24b9f9
discovery: split discovery related code in 'obsdiscovery'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
2047
diff
changeset
|
19 |
topic = 'OBSEXC' |
f9d65d24b9f9
discovery: split discovery related code in 'obsdiscovery'
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents:
2047
diff
changeset
|
20 |
ui.progress(topic, *args, **kwargs) |