John Mulligan  committed 0555e25

Add descriptions to functions

  • Participants
  • Parent commits c0879f8

Comments (0)

Files changed (1)

 # TODO:
 #   verify that commiting comments wont mess with pending merges
+#   allow user to enter pipe/filename on cli for comment text
 #   override/edit existing commit messages?
 def new_changelog_read(mangler):
+    """monkeypatches a new function allowing
+    access to the a messagemangler object
+    """
     def changelog_read(self, node):
         (manifest, user, t, files, desc, extra) = _changelog_read(self, node)
         desc = mangler.update(node, desc)
 class messsagemangler(object):
+    """commit message mangler/manipulator
+    All commit messages are permanent in mercurial, but we can annotate
+    the message and allow the user to see additions or updates.
+    This update data will be kept as part of the repository just like
+    tags in a file that should be human editable if need be.
+    The file tracks changeset ids in the python cfg format.
+    """
     def __init__(self, ui, repo):
         self.ui = ui
         self.repo = repo
 def reposetup(ui, repo):
+    """monkeypatch in the message mangling read function only
+    when the repo is setup
+    """
     mangler = messsagemangler(ui, repo) = new_changelog_read(mangler)
 def prepdesc(desc):
+    """what the user will see in the editor
+    """
     text = []
     text.append(_("HG: Enter a comment." 
                   "  Lines beginning with 'HG:' are removed."))
 def realrev(repo, rev):
+    """try and fint the current revision
+    """
     if rev is not None:
         return rev
     branch = repo.workingctx().branch()