commit: combine _commitctx and commitctx, drop unused force argument
authorMatt Mackall <mpm@selenic.com>
Thu, 14 May 2009 13:21:20 -0500
changeset 8410 1d11d985c179
parent 8409 e84a8482c6f2
child 8411 4d5916358abd
commit: combine _commitctx and commitctx, drop unused force argument
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