0d213b070f79

Mark the internal object commit and delete methods as private.
[view raw] [browse files]
author Steve Losh <steve@stevelosh.com>
date Thu, 08 Oct 2009 18:12:44 -0400
parents 022175cc8a90
children f8233e2ca199
branches/tags (none)
files review/api.py

Changes

--- a/review/api.py	Thu Oct 08 18:08:06 2009 -0400
+++ b/review/api.py	Thu Oct 08 18:12:44 2009 -0400
@@ -215,11 +215,11 @@
         if existing:
             if not force:
                 raise SignoffExists
-            existing[0].delete(self.ui, self.repo)
+            existing[0]._delete(self.ui, self.repo)
         
         signoff = ReviewSignoff(self.ui.username(), datetime.utcnow(),
             self.node, opinion, message)
-        signoff.commit(self.ui, self.repo)
+        signoff._commit(self.ui, self.repo)
     
     def add_comment(self, message, filename='', lines=[]):
         """Add (and commit) a comment for the given file and lines.
@@ -240,7 +240,7 @@
         
         comment = ReviewComment(self.ui.username(), datetime.utcnow(),
             self.node, filename, lines, message)
-        comment.commit(self.ui, self.repo)
+        comment._commit(self.ui, self.repo)
     
     def full_diffs(self, filenames=None, opts={}):
         """Return full diffs of the given files (or all files).
@@ -305,7 +305,7 @@
         self.commit_message = commit_message
         self.delete_message = delete_message
     
-    def commit(self, ui, repo):
+    def _commit(self, ui, repo):
         """Write and commit this object to the given repo."""
         
         path = os.path.join(repo.root, self.node, self.container)
@@ -322,7 +322,7 @@
         cmdutil.commit(ui, repo, _commitfunc, [objectpath],
             { 'message': self.commit_message % self.node, 'addremove': True, })
     
-    def delete(self, ui, repo):
+    def _delete(self, ui, repo):
         """Delete and commit this object in the given repo."""
         
         if not self.delete_message: