From patchwork Wed Feb 7 22:41:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: D2018: largefiles: register wire protocol commands with modern APIs From: phabricator X-Patchwork-Id: 27441 Message-Id: To: mercurial-devel@mercurial-scm.org Date: Wed, 7 Feb 2018 22:41:21 +0000 This revision was automatically updated to reflect the committed changes. Closed by commit rHGf540b6448738: largefiles: register wire protocol commands with modern APIs (authored by indygreg, committed by ). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D2018?vs=5172&id=5308 REVISION DETAIL https://phab.mercurial-scm.org/D2018 AFFECTED FILES hgext/largefiles/uisetup.py CHANGE DETAILS To: indygreg, #hg-reviewers, durin42 Cc: mercurial-devel diff --git a/hgext/largefiles/uisetup.py b/hgext/largefiles/uisetup.py --- a/hgext/largefiles/uisetup.py +++ b/hgext/largefiles/uisetup.py @@ -165,13 +165,13 @@ overrides.openlargefile) # create the new wireproto commands ... - wireproto.commands['putlfile'] = (proto.putlfile, 'sha') - wireproto.commands['getlfile'] = (proto.getlfile, 'sha') - wireproto.commands['statlfile'] = (proto.statlfile, 'sha') + wireproto.wireprotocommand('putlfile', 'sha')(proto.putlfile) + wireproto.wireprotocommand('getlfile', 'sha')(proto.getlfile) + wireproto.wireprotocommand('statlfile', 'sha')(proto.statlfile) + wireproto.wireprotocommand('lheads', '')(wireproto.heads) # ... and wrap some existing ones - wireproto.commands['heads'] = (proto.heads, '') - wireproto.commands['lheads'] = (wireproto.heads, '') + wireproto.commands['heads'].func = proto.heads # make putlfile behave the same as push and {get,stat}lfile behave # the same as pull w.r.t. permissions checks