Constant naming convention (was: Re: [PATCH 1 of 7 upgraderepo V2] revlog: add clone method)

Augie Fackler raf at durin42.com
Mon Dec 12 10:12:48 EST 2016


On Mon, Dec 12, 2016 at 11:04:07AM +0100, Pierre-Yves David wrote:
>
>
> On 11/25/2016 04:28 AM, Gregory Szorc wrote:
> >diff --git a/mercurial/revlog.py b/mercurial/revlog.py
> >--- a/mercurial/revlog.py
> >+++ b/mercurial/revlog.py
> >@@ -1818,3 +1818,95 @@ class revlog(object):
> >         if not self._inline:
> >             res.append(self.datafile)
> >         return res
> >+
> >+    DELTAREUSEALWAYS = 'always'
> >+    DELTAREUSESAMEREVS = 'samerevs'
> >+    DELTAREUSENEVER = 'never'
>
> We don't use cap in our names, even for constant, these should be lower
> case.

Can we just align with prevailing Python style here and start using
all caps for constants? This comes up roughly monthly, and I think
it'd be a good clarity win.


More information about the Mercurial-devel mailing list