check-code: make pushexperiment.py comply with check-code
authorLaurent Charignon <lcharignon@fb.com>
Fri, 04 Dec 2015 15:21:16 -0800
changeset 1549 81a221db8a72
parent 1548 4229d1dae5ad
child 1550 e47dda53a5c2
check-code: make pushexperiment.py comply with check-code
hgext/pushexperiment.py
--- a/hgext/pushexperiment.py	Fri Dec 04 15:19:36 2015 -0800
+++ b/hgext/pushexperiment.py	Fri Dec 04 15:21:16 2015 -0800
@@ -3,7 +3,8 @@
 - Add a new wire protocol command to exchange obsolescence markers. Sending the
   raw file as a binary instead of using pushkey hack.
 - Add a "push done" notification
-- Push obsolescence marker before anything else (This works around the lack of global transaction)
+- Push obsolescence marker before anything else (This works around the lack
+of global transaction)
 
 """
 
@@ -61,7 +62,8 @@
 
 def client_notifypushend(self):
     """wire peer  command to notify a push is done"""
-    self.requirecap('_push_experiment_notifypushend_0', _('hook once push is all done'))
+    self.requirecap('_push_experiment_notifypushend_0',
+                    _('hook once push is all done'))
     return self._call('push_experiment_notifypushend_0')
 
 
@@ -75,7 +77,7 @@
 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"))
+        raise error.Abort(_("destination does not support push"))
     if (obsolete.isenabled(repo, obsolete.exchangeopt) and repo.obsstore
         and remote.capable('_push_experiment_pushobsmarkers_0')):
         # push marker early to limit damage of pushing too early.
@@ -104,8 +106,10 @@
 def extsetup(ui):
     wireproto.wirepeer.push_experiment_pushobsmarkers_0 = client_pushobsmarkers
     wireproto.wirepeer.push_experiment_notifypushend_0 = client_notifypushend
-    wireproto.commands['push_experiment_pushobsmarkers_0'] = (srv_pushobsmarkers, '')
-    wireproto.commands['push_experiment_notifypushend_0'] = (srv_notifypushend, '')
+    wireproto.commands['push_experiment_pushobsmarkers_0'] = \
+        (srv_pushobsmarkers, '')
+    wireproto.commands['push_experiment_notifypushend_0'] = \
+        (srv_notifypushend, '')
     extensions.wrapfunction(wireproto, 'capabilities', capabilities)
     extensions.wrapfunction(obsolete, 'syncpush', syncpush)
     extensions.wrapfunction(localrepo.localrepository, 'push', augmented_push)