Mercurial > evolve
changeset 2056:b96ca1b51e04
push: exit obsexchange early if disabled
We were exiting the function later, in particular -after- issuing a message
about exchanging obsmarkers.
author | Pierre-Yves David <pierre-yves.david@ens-lyon.org> |
---|---|
date | Tue, 07 Mar 2017 14:45:02 +0100 |
parents | ce3d68029ed7 |
children | 4c195eb4d2c5 |
files | hgext3rd/evolve/obsexchange.py |
diffstat | 1 files changed, 3 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext3rd/evolve/obsexchange.py Tue Mar 07 14:41:53 2017 +0100 +++ b/hgext3rd/evolve/obsexchange.py Tue Mar 07 14:45:02 2017 +0100 @@ -63,6 +63,8 @@ @eh.wrapfunction(exchange, '_pushobsolete') def _pushobsolete(orig, pushop): """utility function to push obsolete markers to a remote""" + if not obsolete.isenabled(pushop.repo, obsolete.exchangeopt): + return if 'obsmarkers' in pushop.stepsdone: return pushop.stepsdone.add('obsmarkers') @@ -71,8 +73,7 @@ pushop.ui.debug('try to push obsolete markers to remote\n') repo = pushop.repo remote = pushop.remote - if (obsolete.isenabled(repo, obsolete.exchangeopt) and repo.obsstore and - 'obsolete' in remote.listkeys('namespaces')): + if (repo.obsstore and 'obsolete' in remote.listkeys('namespaces')): markers = pushop.outobsmarkers if not markers: obsexcmsg(repo.ui, "no marker to push\n")