changeset 732:05ec92d8150d

pushexperiment: guard against non-push-capable remotes
author Julien Cristau <julien.cristau@logilab.fr>
date Tue, 04 Jun 2013 17:17:47 +0200
parents 63ce4384be50
children d0472c630542
files hgext/pushexperiment.py
diffstat 1 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/pushexperiment.py	Tue Jun 04 17:16:09 2013 +0200
+++ b/hgext/pushexperiment.py	Tue Jun 04 17:17:47 2013 +0200
@@ -73,6 +73,8 @@
 
 def augmented_push(orig, repo, remote, *args, **kwargs):
     """push wrapped that call the wire protocol command"""
+    if not remote.canpush():
+        raise util.Abort(_("destination does not support push"))
     if (obsolete._enabled and repo.obsstore
         and remote.capable('_push_experiment_pushobsmarkers_0')):
         # push marker early to limit damage of pushing too early.