changeset 1096:33927b0256ce

Changed marshalling format of the full IWID, load full IWID into the RemoteWiki object.
author Alexander Schremmer <alex AT alexanderweb DOT de>
date Sun, 30 Jul 2006 00:02:39 +0200
parents e2cc6b5bed96
children e22024151c2c
files MoinMoin/action/SyncPages.py MoinMoin/config/multiconfig.py docs/CHANGES.aschremmer
diffstat 3 files changed, 10 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/action/SyncPages.py	Sat Jul 29 23:55:31 2006 +0200
+++ b/MoinMoin/action/SyncPages.py	Sun Jul 30 00:02:39 2006 +0200
@@ -22,7 +22,7 @@
 
 
 from MoinMoin import wikiutil, config, user
-from MoinMoin.packages import unpackLine
+from MoinMoin.packages import unpackLine, packLine
 from MoinMoin.PageEditor import PageEditor
 from MoinMoin.Page import Page
 from MoinMoin.wikidicts import Dict, Group
@@ -89,10 +89,14 @@
         remote_interwikiname = self.getInterwikiName()
         remote_iwid = self.connection.interwikiName()[1]
         self.is_anonymous = remote_interwikiname is None
-        
         if not self.is_anonymous and interwikiname != remote_interwikiname:
             raise UnsupportedWikiException(_("The remote wiki uses a different InterWiki name internally than you specified."))
 
+        if self.is_anonymous:
+            self.iwid_full = remote_iwid
+        else:
+            self.iwid_full = packLine([remote_iwid, interwikiname])
+
     def createConnection(self):
         return xmlrpclib.ServerProxy(self.xmlrpc_url, allow_none=True, verbose=True)
 
--- a/MoinMoin/config/multiconfig.py	Sat Jul 29 23:55:31 2006 +0200
+++ b/MoinMoin/config/multiconfig.py	Sun Jul 30 00:02:39 2006 +0200
@@ -14,6 +14,7 @@
 
 from MoinMoin import error, util, wikiutil
 import MoinMoin.auth as authmodule
+from MoinMoin.packages import packLine
 
 _url_re_cache = None
 _farmconfig_mtime = None
@@ -573,7 +574,7 @@
 
         self.iwid = iwid
         if self.interwikiname is not None:
-            self.iwid_full = iwid + ":" + self.interwikiname
+            self.iwid_full = packLine([iwid, self.interwikiname])
         else:
             self.iwid_full = iwid
 
--- a/docs/CHANGES.aschremmer	Sat Jul 29 23:55:31 2006 +0200
+++ b/docs/CHANGES.aschremmer	Sun Jul 30 00:02:39 2006 +0200
@@ -77,7 +77,8 @@
 Week 29: Finished first version of the mergeChanges method. Added Tag and TagStore classes which are currently
          using pickle-based storage. Added getAllPagesEx XMLRPC method.
 Week 30: Implemented IWID support, added function to generate random strings. Added support
-         for editing the InterWikiMap in the wiki. Added locking to the PickleTagStore and the MetaDict classes.
+         for editing the InterWikiMap in the wiki. Added locking to the PickleTagStore and the MetaDict classes. Added handling of
+         various options and detection of anonymous wikis to the SyncPages action.
 
 2006-07-18: the requested daily entry is missing here, see http://moinmoin.wikiwikiweb.de/GoogleSoc2006/BetterProgress
 2006-07-19: the requested daily entry is missing here, see http://moinmoin.wikiwikiweb.de/GoogleSoc2006/BetterProgress