diff MoinMoin/wikisync.py @ 1329:4a8c4849d162

Got syncing working with pages that are just in one wiki.
author Alexander Schremmer <alex AT alexanderweb DOT de>
date Sat, 19 Aug 2006 16:06:52 +0200
parents 0c3927a3b8a2
children df88b475c1f0
line wrap: on
line diff
--- a/MoinMoin/wikisync.py	Sat Aug 19 14:45:18 2006 +0200
+++ b/MoinMoin/wikisync.py	Sat Aug 19 16:06:52 2006 +0200
@@ -279,14 +279,14 @@
 
     def createSyncPage(self, page_name):
         normalised_name = normalise_pagename(page_name, self.prefix)
+        if normalised_name is None:
+            return None
         if not self.request.user.may.write(normalised_name):
             return None
-        if normalised_name is None:
-            return None
         page = Page(self.request, page_name)
         revno = page.get_real_rev()
         if revno == 99999999: # I love sane in-band signalling
-            revno = None
+            return None
         return SyncPage(normalised_name, local_rev=revno, local_name=page_name, local_deleted=not page.exists())
 
     # Public methods:
@@ -345,7 +345,7 @@
         self.normalised_name = normalised_name
 
     def __repr__(self):
-        return u"<Tag normalised_pagename=%r remote_wiki=%r remote_rev=%r current_rev=%r>" % (self.normalised_name, self.remote_wiki, self.remote_rev, self.current_rev)
+        return u"<Tag normalised_pagename=%r remote_wiki=%r remote_rev=%r current_rev=%r>" % (getattr(self, "normalised_name", "UNDEF"), self.remote_wiki, self.remote_rev, self.current_rev)
 
     def __cmp__(self, other):
         if not isinstance(other, Tag):