[PATCH 2 of 5 flagprocessor v6] revlog: add 'raw' argument to revision and _addrevision

Rémi Chaintron remi.chaintron at gmail.com
Fri Dec 30 12:04:02 EST 2016


Following discussion with marmoute on IRC, I'll drop the rawrevision()
method for now.


On Fri, 30 Dec 2016 at 11:12 Augie Fackler <raf at durin42.com> wrote:

>
> > On Dec 30, 2016, at 10:46 AM, Rémi Chaintron <remi.chaintron at gmail.com>
> wrote:
> >
> > The actual rawrevision() method is simply a personal preference as I
> like to have simpler apis on operations with optional arguments and I've
> seen this in other places, but I do not feel strongly about moving it to
> use the raw argument in calls to revision directly. Let me know what you
> prefer.
>
> https://silkandspinach.net/2004/07/15/avoid-boolean-parameters/
>
> In this particular case, my opinion is that it’s a clear win to avoid the
> boolean parameter since raw=False is actually defined in terms of raw=True,
> so it makes sense to express the one case in terms of the other using a
> function call to expose the structure to the reader.
>
> Not a requirement, but that’s my reasoning for the choice. :)

-- 
Rémi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mercurial-scm.org/pipermail/mercurial-devel/attachments/20161230/19036878/attachment.html>


More information about the Mercurial-devel mailing list