[PATCH 2 of 2] wireproto: move wireproto capabilities computation in a subfunction

Matt Mackall mpm at selenic.com
Sun Mar 16 17:40:09 CDT 2014


On Thu, 2014-03-13 at 21:41 -0700, Pierre-Yves David wrote:
> 
> On 03/13/2014 02:43 PM, Matt Mackall wrote:
> > On Thu, 2014-03-13 at 11:48 -0700, pierre-yves.david at ens-lyon.org wrote:
> >> # HG changeset patch
> >> # User Pierre-Yves David <pierre-yves.david at fb.com>
> >> # Date 1394660801 25200
> >> #      Wed Mar 12 14:46:41 2014 -0700
> >> # Node ID ccf1552655b90cac5157e86fc914a0a33c46ea24
> >> # Parent  1bfa5d82da6540e6559c3396c692db848ea650f2
> >> wireproto: move wireproto capabilities computation in a subfunction
> >
> >>   WIREPROTOCAPS = ['lookup', 'changegroupsubset', 'branchmap', 'pushkey',
> >>                    'known', 'getbundle', 'unbundlehash', 'batch']
> >
> > Lowercase this, please. It's not C nor is it a constant.
> 
> This mimic the naming in local repo.

Do you intend it to be constant, or no? That's the only reason you'd
ever name something all caps, and that reason is not in the coding
style. And I'm afraid it looks REALLY attractive to just extend this
rather than wrapping a function, so I think it's not actually going to
succeed in being constant.

(FYI, largefiles is already broken here: it mangles proto caps globally
rather than per-repo when enabled in just one hgwebdir repo. This can
cause some interesting bugs depending on the order clients visit repos.)

-- 
Mathematics is the supreme nostalgia of our time.




More information about the Mercurial-devel mailing list