Index: mergebot/trunk/mergebot/svn.py
===================================================================
--- mergebot/trunk/mergebot/svn.py	(revision 34)
+++ mergebot/trunk/mergebot/svn.py	(revision 35)
@@ -10,5 +10,5 @@
 import subprocess
 
-def shell_quote(self, string):
+def shell_quote(string):
     """Given a string, escape the characters interpretted by the shell."""
     for char in ["\\", "\"", "$"]:
@@ -18,10 +18,11 @@
 
 class SvnLib(object):
+    """A library to provide a higher-level set of subversion operations."""
     def __init__(self):
         pass
 
     def logcmd(self, cmd, logfile):
-        """Log the cmd string, then execute it, appending its stdout and stderr to
-        logfile."""
+        """Log the cmd string, then execute it, appending its stdout and stderr
+        to logfile."""
         open(logfile, "a").write("%s: %s\n" % (time.asctime(), cmd))
         return os.system("(%s) >>%s 2>&1" % (cmd, logfile))
@@ -33,6 +34,6 @@
     def does_url_exist_14(self, url):
         """Given a subversion url return true if it exists, false otherwise."""
-        return not subprocess.call(['svn', 'log', '--limit=1', '--non-interactive',
-                                    url],
+        return not subprocess.call(['svn', 'log', '--limit=1',
+                                    '--non-interactive', url],
                         stdout=open('/dev/null', 'w'),
                         stderr=open('/dev/null', 'w'))
@@ -45,11 +46,11 @@
                         stderr=open('/dev/null', 'w'))
 
-    does_url_exist=does_url_exist_14 # default to most compatible form for now
+    does_url_exist = does_url_exist_14 # default to most compatible form for now
 
     def get_branch_info(self, url, logfile):
         """Given a subversion url and a logfile, return (start_revision,
         end_revision) or None if it does not exist."""
-        svncmd = os.popen("svn log --stop-on-copy --non-interactive %s 2>>%s" % \
-            (url, logfile), "r")
+        svncmd = os.popen("svn log --stop-on-copy --non-interactive %s 2>>%s" \
+            % (url, logfile), "r")
         branchlog = svncmd.read()
         returnval = svncmd.close()
@@ -58,6 +59,7 @@
             return None
         logs = branchlog.split("-"*72 + "\n")
-        # If there have been no commits on the branch since it was created, there
-        # will only be one revision listed.... but the log will split into 3 parts.
+        # If there have been no commits on the branch since it was created,
+        # there will only be one revision listed.... but the log will split
+        # into 3 parts.
         endrev = self.get_rev_from_log(logs[1])
         startrev = self.get_rev_from_log(logs[-2])
@@ -65,6 +67,6 @@
 
     def create_branch(self, from_url, to_url, commit_message, logfile):
-        """Create a branch copying from_url to to_url.  Commit as mergebot, and use
-        the provided commit message."""
+        """Create a branch copying from_url to to_url.  Commit as mergebot, and
+        use the provided commit message."""
         svncmd = \
             "svn copy --username=mergebot --password=mergebot -m %s %s %s" \
@@ -73,9 +75,10 @@
 
     def delete_branch(self, url, commit_message, logfile):
-        """This will generate a new revision.  Return the revision number, or -1 on
-        failure.
+        """This will generate a new revision.  Return the revision number, or
+        -1 on failure.
         Assumes that the url exists.  You should call get_branch_info() to
         determine that first"""
-        svncmd = "svn rm --no-auth-cache --username=mergebot --password=mergebot " \
+        svncmd = "svn rm --no-auth-cache " \
+            "--username=mergebot --password=mergebot " \
             "-m %s %s 2>>%s" % (shell_quote(commit_message), url, logfile)
         return self._svn_new_rev_command(svncmd)
@@ -111,11 +114,12 @@
 
     def conflicts_from_merge_results(self, results):
-        "Given the output from merge, return a list of files that had conflicts."
+        """Given the output from merge, return a list of files that had
+        conflicts."""
         conflicts = [filename for status, filename in results if 'C' in status]
         return conflicts
 
     def commit(self, workingdir, commit_message, logfile):
-        """Returns newly committed revision number, or None if there was nothing to
-        commit.  -1 on error."""
+        """Returns newly committed revision number, or None if there was
+        nothing to commit.  -1 on error."""
         svncmd = "cd %s && svn commit --no-auth-cache --username=mergebot " \
             "--password=mergebot -m %s 2>>%s" % (workingdir,
@@ -124,6 +128,6 @@
 
     def _svn_new_rev_command(self, svncmd):
-        """Given an svn command that results in a new revision, return the revision
-        number, or -1 on error."""
+        """Given an svn command that results in a new revision, return the
+        revision number, or -1 on error."""
         pipe = os.popen(svncmd)
         output = pipe.read()
