# HG changeset patch # User Laurent Charignon # Date 1449271276 28800 # Node ID 81a221db8a7293c11cbbb016106391ad4b9b6a59 # Parent 4229d1dae5add9434f9590ebec275d16a310972b check-code: make pushexperiment.py comply with check-code diff -r 4229d1dae5ad -r 81a221db8a72 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)