D1242: overlayworkingctx: add ``tomemctx()`` and ``commit()``
durin42 (Augie Fackler)
phabricator at mercurial-scm.org
Thu Dec 7 21:55:07 UTC 2017
durin42 added inline comments.
INLINE COMMENTS
> context.py:2222
> + if len(parents) == 1:
> + parents = [parents[0], None]
> +
use a tuple instead of a list here
> context.py:2246
> +
> + def commit(self, text, parents=None, date=None, extra=None, editor=None,
> + user=None, branch=None):
Let's not put this on this object, and instead ask people to do repo.commitctx(ctx.tomemctx(...)) - it lets us keep the surface area of this just a little smaller.
Also, maybe we can then avoid any proliferation of the allowemptycommit logic by gathering that in commitctx?
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D1242
To: phillco, #hg-reviewers
Cc: durin42, mercurial-devel
More information about the Mercurial-devel
mailing list