# HG changeset patch # User Matt Mackall # Date 1242325280 18000 # Node ID 1d11d985c179283727e1fb0cbebe0528f0bde300 # Parent e84a8482c6f2f9e0887f51e42183145406a21df9 commit: combine _commitctx and commitctx, drop unused force argument diff -r e84a8482c6f2 -r 1d11d985c179 mercurial/localrepo.py --- a/mercurial/localrepo.py Thu May 14 13:21:17 2009 -0500 +++ b/mercurial/localrepo.py Thu May 14 13:21:20 2009 -0500 @@ -811,22 +811,21 @@ "(see hg resolve)")) wctx = context.workingctx(self, (p1, p2), text, user, date, extra, changes) - r = self._commitctx(wctx, force, editor, True) + r = self.commitctx(wctx, editor, True) ms.reset() return r finally: wlock.release() - def commitctx(self, ctx): + def commitctx(self, ctx, editor=None, working=False): """Add a new revision to current repository. - Revision information is passed in the context.memctx argument. - commitctx() does not touch the working directory. + Revision information is passed via the context argument. + If editor is supplied, it is called to get a commit message. + If working is set, the working directory is affected. """ - return self._commitctx(ctx, force=True, editor=None, working=False) - def _commitctx(self, ctx, force=False, editor=None, working=True): lock = self.lock() tr = None valid = 0 # don't save the dirstate if this isn't set