Contents
Description
belongs to development of 1.6
currently wikisync is broken for direction both and acl protected pages for writing
localwiki is standalone on port 8080
remotewiki (TestWiki) is apache2/cgi based on localhost port 80
= Parameters = ## This is the most important parameter, you need to define it in any case - the others are optional remoteWiki:: TestWiki ## remotePrefix:: TestBed/ ## localPrefix:: FooBarWikiContents/ ## This will synchronise all pages starting with "My": pageMatch:: Example.* ## pageList:: PageOne,PageTwo,Testpage ## groupList:: Syncgroup direction:: Both = Log = ...
Example2 is acl protected and readonly on the remote wiki. It is by direction down uploaded to the wiki. There a user is logged in and has before rights.
Now he changes something in Example2 and try to synchronize again.
Because he can't write as anonymous user to the page so SyncPages should protect that
if direction == BOTH: yield remote.merge_diff_pre(sp.remote_name, compress(diff), new_local_rev, current_remote_rev, current_remote_rev, local_full_iwid, sp.name) try: #XXX except very_current_remote_rev = remote.merge_diff_post(yielder.fetch_result()) except NotAllowedException: self.log_status(ActionClass.ERROR, _("The page %s could not be merged because you are not allowed to modify the page in the remote wiki."), (sp.name, )) return else: very_current_remote_rev = current_remote_rev
wikisync.merge_diff_post fails with if isinstance(result, xmlrpclib.Fault): so we can't get into except NotAllowedException: but we have at this time very_current_remote_rev.has_key('faultCode') normally its an integer.
and we get a traceback
--> --> Traceback (most recent call last): File "/usr/lib/python2.4/site-packages/MoinMoin/request/__init__.py", line 1157, in run handler(self.page.page_name, self) File "/usr/lib/python2.4/site-packages/MoinMoin/action/SyncPages.py", line 495, in execute ActionClass(pagename, request).render() File "/usr/lib/python2.4/site-packages/MoinMoin/action/SyncPages.py", line 207, in render self.sync(params, local, remote) File "/usr/lib/python2.4/site-packages/MoinMoin/action/SyncPages.py", line 491, in sync rpc_aggregator.scheduler(remote.create_multicall_object, handle_page, m_pages, 8, remote.prepare_multicall) File "/usr/lib/python2.4/site-packages/MoinMoin/util/rpc_aggregator.py", line 73, in scheduler call = gen.fetch_call() File "/usr/lib/python2.4/site-packages/MoinMoin/util/rpc_aggregator.py", line 32, in fetch_call next_item = self._gen.next() File "/usr/lib/python2.4/site-packages/MoinMoin/action/SyncPages.py", line 480, in run tags.add(remote_wiki=remote_full_iwid, remote_rev=very_current_remote_rev, current_rev=new_local_rev, direction=direction, normalised_name=sp.name) File "/usr/lib/python2.4/site-packages/MoinMoin/wikisync.py", line 477, in add self.tags.append(Tag(**kwargs)) File "/usr/lib/python2.4/site-packages/MoinMoin/wikisync.py", line 380, in __init__ assert (isinstance(remote_wiki, basestring) and isinstance(remote_rev, int) AssertionError Additionally cgitb raised this exception: Traceback (most recent call last): File "/usr/lib/python2.4/site-packages/MoinMoin/failure.py", line 147, in handle handler.handle() File "/usr/lib/python2.4/site-packages/MoinMoin/support/cgitb.py", line 576, in handle doc = view.format(formatter, self.context) File "/usr/lib/python2.4/site-packages/MoinMoin/support/cgitb.py", line 354, in format return formatter.section(self.formatContent(), {'class': 'cgitb'}) File "/usr/lib/python2.4/site-packages/MoinMoin/failure.py", line 33, in formatContent content = ( File "/usr/lib/python2.4/site-packages/MoinMoin/failure.py", line 83, in formatDebugInfo info = [self.debugInfoHideScript(), File "/usr/lib/python2.4/site-packages/MoinMoin/failure.py", line 97, in formatTraceback return self.formatAllTracebacks(self.formatOneTraceback) File "/usr/lib/python2.4/site-packages/MoinMoin/failure.py", line 109, in formatAllTracebacks tracebacks.append(formatFuction((type, value, tb))) File "/usr/lib/python2.4/site-packages/MoinMoin/support/cgitb.py", line 432, in formatOneTraceback output = [self.formatter.subTitle('Traceback'), File "/usr/lib/python2.4/site-packages/MoinMoin/support/cgitb.py", line 445, in tracebackFrames frames.append(frame.format(self.formatter)) File "/usr/lib/python2.4/site-packages/MoinMoin/support/cgitb.py", line 202, in format items = [self.formatCall(), File "/usr/lib/python2.4/site-packages/MoinMoin/support/cgitb.py", line 211, in formatCall call = '%s in %s%s' % (self.formatFile(), File "/usr/lib/python2.4/site-packages/MoinMoin/support/cgitb.py", line 233, in formatArguments formatvalue=formatValue) File "inspect.py", line 740, in formatargvalues specs.append(strseq(args[i], convert, join)) File "inspect.py", line 695, in strseq return convert(object) File "inspect.py", line 737, in convert return formatarg(name) + formatvalue(locals[name]) File "/usr/lib/python2.4/site-packages/MoinMoin/support/cgitb.py", line 229, in formatValue return '=' + self.formatter.repr(value) File "/usr/lib/python2.4/site-packages/MoinMoin/support/cgitb.py", line 133, in repr return pydoc.html.repr(object) File "pydoc.py", line 360, in repr return Repr.repr(self, object) File "repr.py", line 24, in repr return self.repr1(x, self.maxlevel) File "pydoc.py", line 367, in repr1 return self.escape(cram(stripid(repr(x)), self.maxother)) File "/usr/lib/python2.4/site-packages/MoinMoin/wikisync.py", line 390, in __repr__ 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) AttributeError: 'Tag' object has no attribute 'remote_wiki'
using in SyncPages rpc_aggregator.scheduler_simple(remote.create_multicall_object, handle_page, m_pages) gives Fault: <Fault 1: 'exceptions.TypeError:xmlrpc_getDiff() takes at least 4 arguments (2 given)'>
Steps to reproduce
- do this...
Example
Component selection
- general
Details
MoinMoin Version |
|
OS and Version |
|
Python Version |
|
Server Setup |
|
Server Details |
|
Language you are using the wiki in (set in the browser/UserPreferences) |
|
Workaround
Discussion
Plan
- Priority:
- Assigned to:
- Status: fixed with 1888:ffe2e789a7c6