Mercurial > hg
changeset 8410:1d11d985c179
commit: combine _commitctx and commitctx, drop unused force argument
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Thu, 14 May 2009 13:21:20 -0500 |
parents | e84a8482c6f2 |
children | 4d5916358abd |
files | mercurial/localrepo.py |
diffstat | 1 files changed, 5 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- 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