Mercurial > evolve
comparison hgext/evolve.py @ 883:d2fa1061df16
evolve: do not exchange obsolescence markers when server refuse it
The server can be configured to refuse obsolescence markers exchange. See
changeset 48804a8d7472 for details about it. We respect server will in the
client.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Wed, 12 Mar 2014 13:01:32 -0700 |
parents | 7fe06f32d1ad |
children | fe089007c466 |
comparison
equal
deleted
inserted
replaced
882:48804a8d7472 | 883:d2fa1061df16 |
---|---|
2250 def _pullobsolete(orig, pullop): | 2250 def _pullobsolete(orig, pullop): |
2251 if not obsolete._enabled: | 2251 if not obsolete._enabled: |
2252 return None | 2252 return None |
2253 if not pullop.remote.capable('_evoext_pullobsmarkers_0'): | 2253 if not pullop.remote.capable('_evoext_pullobsmarkers_0'): |
2254 return orig(pullop) | 2254 return orig(pullop) |
2255 if 'obsolete' not in pullop.remote.listkeys('namespaces'): | |
2256 return None # remote opted out of obsolescence marker exchange | |
2255 tr = None | 2257 tr = None |
2256 ui = pullop.repo.ui | 2258 ui = pullop.repo.ui |
2257 ui.status("OBSEXC: pull obsolescence markers\n") | 2259 ui.status("OBSEXC: pull obsolescence markers\n") |
2258 boundaries = _buildpullobsmerkersboundaries(pullop) | 2260 boundaries = _buildpullobsmerkersboundaries(pullop) |
2259 obsdata = pullop.remote.evoext_pullobsmarkers_0(**boundaries) | 2261 obsdata = pullop.remote.evoext_pullobsmarkers_0(**boundaries) |