changeset 1344:564cc2b53ea9

Reworded a docstring in SyncPages.sync, whitespace cleanup.
author Alexander Schremmer <alex AT alexanderweb DOT de>
date Sun, 20 Aug 2006 15:55:58 +0200
parents 144c3281e88f
children 70e69aad1028
files MoinMoin/action/SyncPages.py MoinMoin/wikisync.py MoinMoin/xmlrpc/__init__.py
diffstat 3 files changed, 19 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/action/SyncPages.py	Sun Aug 20 15:49:12 2006 +0200
+++ b/MoinMoin/action/SyncPages.py	Sun Aug 20 15:55:58 2006 +0200
@@ -147,12 +147,12 @@
         # XXX release readlock on self.page
 
         self.page.send_page(self.request, msg=msg)
-    
+
     def sync(self, params, local, remote):
         """ This method does the syncronisation work.
-            Currently, it handles the case where the pages exist on both sides.
-            One of the major missing parts is rename handling.
-            Now there are a few other cases left that have to be implemented:
+            Currently, it handles nearly all cases.
+            The major missing part is rename handling.
+            There are a few other cases left that have to be implemented:
                 Wiki A    | Wiki B   | Remark
                 ----------+----------+------------------------------
                 exists    | non-     | Now the wiki knows that the page was renamed.
@@ -366,3 +366,4 @@
 
 def execute(pagename, request):
     ActionClass(pagename, request).render()
+
--- a/MoinMoin/wikisync.py	Sun Aug 20 15:49:12 2006 +0200
+++ b/MoinMoin/wikisync.py	Sun Aug 20 15:55:58 2006 +0200
@@ -321,15 +321,15 @@
         return "<MoinLocalWiki>"
 
 
-# ------------------ Tags ------------------ 
+# ------------------ Tags ------------------
 
 
 class Tag(object):
     """ This class is used to store information about merging state. """
-    
+
     def __init__(self, remote_wiki, remote_rev, current_rev, direction, normalised_name):
         """ Creates a new Tag.
-        
+
         @param remote_wiki: The identifier of the remote wiki.
         @param remote_rev: The revision number on the remote end.
         @param current_rev: The related local revision.
@@ -393,7 +393,7 @@
 
     def __init__(self, page):
         """ Creates a new TagStore that uses pickle files.
-        
+
         @param page: a Page object where the tags should be related to
         """
 
@@ -419,7 +419,7 @@
             self.tags = []
         else:
             datafile.close()
-    
+
     def commit(self):
         """ Writes the memory contents to the data file. """
         datafile = file(self.filename, "wb")
@@ -471,3 +471,4 @@
 # currently we just have one implementation, so we do not need
 # a factory method
 TagStore = PickleTagStore
+
--- a/MoinMoin/xmlrpc/__init__.py	Sun Aug 20 15:49:12 2006 +0200
+++ b/MoinMoin/xmlrpc/__init__.py	Sun Aug 20 15:55:58 2006 +0200
@@ -130,7 +130,7 @@
             else:
                 # wrap response in a singleton tuple
                 response = (response,)
-    
+
                 # serialize it
                 response = xmlrpclib.dumps(response, methodresponse=1)
 
@@ -182,7 +182,7 @@
         request.
 
         See http://www.xmlrpc.com/discuss/msgReader$1208
-        
+
         Copied from SimpleXMLRPCServer.py
         """
 
@@ -275,7 +275,7 @@
         pagelist = self.request.rootpage.getPageList(filter=p_filter, exists=not options["include_deleted"],
                                                      include_underlay=options["include_underlay"],
                                                      return_objects=options["include_revno"])
-        
+
         if options['include_revno']:
             pages = []
             for x in pagelist:
@@ -289,7 +289,7 @@
 
     def xmlrpc_getRecentChanges(self, date):
         """ Get RecentChanges since date
-        
+
         @param date: date since when rc will be listed
         @rtype: list
         @return: a list of changed pages since date, which should be in
@@ -695,7 +695,7 @@
     def xmlrpc_mergeDiff(self, pagename, diff, local_rev, delta_remote_rev, last_remote_rev, interwiki_name, normalised_name):
         """ Merges a diff sent by the remote machine and returns the number of the new revision.
             Additionally, this method tags the new revision.
-            
+
             @param pagename: The pagename that is currently dealt with.
             @param diff: The diff that can be applied to the version specified by delta_remote_rev.
                 If it is None, the page is deleted.
@@ -704,7 +704,7 @@
             @param last_remote_rev: The last revno of the page `pagename` that is known by the other wiki site.
             @param interwiki_name: Used to build the interwiki tag.
             @param normalised_name: The normalised pagename that is common to both wikis.
-            
+
             @return Returns the current revision number after the merge was done. Or one of the following errors:
                 * "SUCCESS" - the page could be merged and tagged successfully.
                 * "NOT_EXIST" - item does not exist and there was not any content supplied.
@@ -720,7 +720,7 @@
         pagename = self._instr(pagename)
 
         comment = u"Remote Merge - %r" % unpackLine(interwiki_name)[-1]
-        
+
         # User may read page?
         if not self.request.user.may.read(pagename) or not self.request.user.may.write(pagename):
             return self.notAllowedFault()
@@ -759,7 +759,7 @@
             return LASTREV_INVALID
 
         current_rev = currentpage.get_real_rev()
-        
+
         tags = TagStore(currentpage)
         tags.add(remote_wiki=interwiki_name, remote_rev=local_rev, current_rev=current_rev, direction=BOTH, normalised_name=normalised_name)