2007-07-03T01:51:03  <CIA-20> moin: Thomas Waldmann <tw AT waldmann-edv DOT de> * 2288:0f44ed5ed2a1 1.7/MoinMoin/_tests/ (pep8.py test_sourcecode.py): test_sourcecode: remove tests that pep8 checker also does, enable warnings, add crlf check to pep8 checker
2007-07-03T02:08:44  <CIA-20> moin: Thomas Waldmann <tw AT waldmann-edv DOT de> * 2289:9d347f8bfd1c 1.7/MoinMoin/_tests/test_sourcecode.py: test_sourcecode: fixed docstring
2007-07-03T07:49:45  <lanius> ThomasWaldmann: well i only ask because there is code for it in the event-log
2007-07-03T07:50:04  <lanius> xorAxAx: what is the preferred behaviour if you request an item which is locked: a.) wait for it to be unlocked b.) get a read online item
2007-07-03T08:26:26  <ThomasWaldmann> moin
2007-07-03T08:28:43  <ThomasWaldmann> lanius: what do you mean exactly by "which is locked" and "read online item"?
2007-07-03T08:29:45  <lanius> a real lock
2007-07-03T08:29:52  <lanius> and read only means you cannot save the changs
2007-07-03T08:32:28  <ThomasWaldmann> i guess waiting for it a limited time (and then raise an exception) should be ok
2007-07-03T08:34:01  <ThomasWaldmann> do we have r and rw items already?
2007-07-03T08:35:17  <lanius> no, my idea is the following
2007-07-03T08:35:21  <lanius> if you get an item it is r only
2007-07-03T08:35:29  <lanius> when you lock it it becomes w
2007-07-03T08:35:35  <lanius> and on unlocking r again
2007-07-03T08:36:24  <ThomasWaldmann> most item accesses are just showing some page (and Page class is ro), PageEditor is rw
2007-07-03T08:36:45  <lanius> yes that's why the default, when getting the item, is r
2007-07-03T08:38:25  <ThomasWaldmann> sounds ok
2007-07-03T08:39:14  <ThomasWaldmann> hmm, we just have to make sure that the (meta)data we are modifying and saving is the most recent version
2007-07-03T08:39:15  <dreimark> ThomasWaldmann: lanius: so we always will have edit_locking in lock mode ? Its ok with me I use it only this way
2007-07-03T08:39:40  <dreimark> on most of our wikis
2007-07-03T08:40:10  <ThomasWaldmann> dreimark: no, this is a different lock afaics
2007-07-03T08:41:24  <ThomasWaldmann> dreimark: btw, try running py.test now, it checks for pep8 :)
2007-07-03T08:41:58  <dreimark> done no failure because you fixed them already :)
2007-07-03T08:43:02  <dreimark> ThomasWaldmann:  MoinMoin/_tests/test_sourcecode.py[6091]  its a bit more as 3600 you don't count the pyc files too ?
2007-07-03T08:43:35  <ThomasWaldmann> it filters for *.py
2007-07-03T08:44:30  <ThomasWaldmann> ehrm, it was about 3600 for me, is this latest 1.7 main repo?
2007-07-03T08:45:14  <ThomasWaldmann> (did you copy some additional code into MoinMoin/.. and subdirs?
2007-07-03T08:45:39  <dreimark> no additional code and should be up to date
2007-07-03T08:46:36  <ThomasWaldmann> 3517 for me
2007-07-03T08:46:59  <ThomasWaldmann> you are on windows?
2007-07-03T08:47:04  <dreimark> and I lied one error AssertionError: '/MoinMoin/parser/_tests/test_text_moin_wiki.py' does not end with a newline char!
2007-07-03T08:47:09  <dreimark> no linux
2007-07-03T08:47:31  <dreimark> I have no windows since hmm I can't remember many years
2007-07-03T08:47:47  <ThomasWaldmann> hmm, no error for me
2007-07-03T08:48:01  <ThomasWaldmann> lucky guy :)
2007-07-03T08:49:01  <ThomasWaldmann> 000b840 203d 6f4e 656e 000a
2007-07-03T08:49:21  <ThomasWaldmann> this is how this file ends here - definitely with a newline char
2007-07-03T08:49:21  <dreimark> If I look in that file it ends with a new line and blanks
2007-07-03T08:50:22  <dreimark> aha ok, hehe my fault a new test  testIndentingAndSpaceBetweenTwoMacroCall
2007-07-03T08:50:44  <ThomasWaldmann> 47175 bytes long
2007-07-03T08:50:45  <dreimark> which was not submitted yesterday so its not corrected from ThomasWaldmann
2007-07-03T08:51:28  <dreimark> How much py files do you have I have 405
2007-07-03T08:52:29  <ThomasWaldmann> 404
2007-07-03T08:53:14  <lanius> dreimark: yeah lock and edit-lock are different things
2007-07-03T08:53:28  <ThomasWaldmann> hmm, i maybe should filter for *.py before yielding a test
2007-07-03T08:54:22  <dreimark> hg revert and I found 405 files
2007-07-03T08:54:51  <ThomasWaldmann> use hg status
2007-07-03T08:56:38  <dreimark> May be you should exclude the wiki/data/pages
2007-07-03T08:57:05  <dreimark> but I have not seen the +1 file there
2007-07-03T08:58:38  <CIA-20> moin: Thomas Waldmann <tw AT waldmann-edv DOT de> * 2290:49188b1e803c 1.7/MoinMoin/_tests/test_sourcecode.py: test_sourcecode: only yield tests for *.py files, fixes test count
2007-07-03T08:59:44  <ThomasWaldmann> hg status should tell you. if it does not, see .hgignore.
2007-07-03T09:36:47  <xorAxAx> lanius: if the metadata modification is atomic, publishing an icon even if it is locked is ok
2007-07-03T09:37:01  <xorAxAx> lanius: i.e. it doesnt need to be locked at all (which is important)
2007-07-03T09:40:14  <lanius> xorAxAx: publishing an item?
2007-07-03T09:40:40  <lanius> s/item/icon/
2007-07-03T09:41:12  <xorAxAx> ?
2007-07-03T09:41:26  <lanius> i don't understand what you said in your first sentence
2007-07-03T09:41:38  <xorAxAx> ah, indeed
2007-07-03T09:41:41  <xorAxAx> me neither
2007-07-03T09:41:44  <lanius> :)
2007-07-03T09:41:52  <xorAxAx> well, its ok to allow for reads
2007-07-03T09:42:01  <xorAxAx> even if it is write locked
2007-07-03T09:42:11  <xorAxAx> assuming that the metadatamodification is atomic
2007-07-03T09:42:31  <xorAxAx> i.e. the metadata file is moved into place (or in a transaction in the DB)
2007-07-03T09:42:40  <lanius> yes right
2007-07-03T09:42:54  <xorAxAx> and the new revision is only known to the item after the other bits were saved
2007-07-03T09:43:25  <xorAxAx> but then you need a write lock for the item until the save() happens
2007-07-03T09:46:55  <lanius> is that really necessray?
2007-07-03T09:47:46  <xorAxAx> otherwise the other threads will see half finished current revisions
2007-07-03T09:47:56  <xorAxAx> well, you only need to update the current revision pointer in the last step
2007-07-03T09:48:11  <xorAxAx> hmm, no
2007-07-03T09:48:16  <xorAxAx> you need a lock
2007-07-03T09:48:31  <lanius> what kind of lock
2007-07-03T09:48:57  <lanius> read lock you mean
2007-07-03T09:48:59  <lanius> or transactions
2007-07-03T09:50:36  <xorAxAx> hmm
2007-07-03T09:50:40  <xorAxAx> yes
2007-07-03T09:50:42  <xorAxAx> thats bad
2007-07-03T09:50:53  <xorAxAx> no, you dont need a read lock
2007-07-03T09:50:56  <xorAxAx> a write lock is enough
2007-07-03T09:51:25  <lanius> no cause item[rev] does a call on backend.has_revision() which will return true
2007-07-03T09:52:23  <xorAxAx> no, it will return false
2007-07-03T09:52:29  <xorAxAx> you will have to create the item on save
2007-07-03T09:52:42  <lanius> s/item/revision/
2007-07-03T09:52:49  <xorAxAx> yes
2007-07-03T09:53:01  <lanius> but this is some kind of transaction then again
2007-07-03T09:53:18  <xorAxAx> well, you only need to do it in the correct order
2007-07-03T09:53:23  <xorAxAx> i recommend writing it down and thinking about it
2007-07-03T09:54:15  <lanius> there is no correct order
2007-07-03T09:55:15  <lanius> because as soon as you call create_revision it is there with no content
2007-07-03T09:55:20  <lanius> and no metadata
2007-07-03T09:56:14  <xorAxAx> well, b0rked backend API i would say :)
2007-07-03T09:56:57  <lanius> the only thing to avoid that is read-locks or transactions
2007-07-03T09:57:03  <lanius> and we decided to not do that
2007-07-03T09:58:31  <lanius> i don't think it is really necessary in the case of moin
2007-07-03T09:58:48  <lanius> because it doesn't matter if you get a half-finished file, just reload
2007-07-03T09:59:04  <xorAxAx> you dont need transactions
2007-07-03T09:59:13  <xorAxAx> only an atomic backend call
2007-07-03T09:59:23  <xorAxAx> i am not talking about the data
2007-07-03T09:59:24  <lanius> atomic for what
2007-07-03T09:59:40  <xorAxAx> well, if you think so, then try to figure out the metadata problem
2007-07-03T10:00:21  <lanius> atomic for what
2007-07-03T10:02:26  <dreimark> ThomasWaldmann: investigating more later but 405 sounds better as 404
2007-07-03T10:03:01  <dreimark> xorAxAx: http://moinmoin.wikiwikiweb.de/HierarchicalAccessControlList can you comment on the new questions
2007-07-03T10:03:12  <xorAxAx> dreimark: its on my todoliste
2007-07-03T10:05:48  <lanius> xorAxAx: what operation must be atomic in your opinion?
2007-07-03T10:06:51  <xorAxAx> lanius: well, the most important stuff is writing
2007-07-03T10:07:02  <xorAxAx> i.e. metadata
2007-07-03T10:07:08  <lanius> writing is no operation
2007-07-03T10:07:12  <xorAxAx> and atomicness doesnt matter there
2007-07-03T10:07:21  <xorAxAx> but dirty read isuses
2007-07-03T10:07:57  <lanius> writing metadata of one revision is atomic
2007-07-03T10:08:51  <lanius> no it is not, since it involves two operations, setMetadata and removeMetadata
2007-07-03T10:09:14  <lanius> but lets imagine it is for now, would that fullfill your request?
2007-07-03T10:09:34  <xorAxAx> yes
2007-07-03T10:09:54  <xorAxAx> the problem is dirty read - you read something that is dirtied by another process when you write it
2007-07-03T10:10:02  <xorAxAx> as we talked about a few times already
2007-07-03T10:10:41  <lanius> lets talk about it until it is clear :-)
2007-07-03T10:10:49  <xorAxAx> as usual :)
2007-07-03T10:10:54  <xorAxAx> but i have to go now
2007-07-03T10:11:29  <lanius> a pity
2007-07-03T10:12:02  <lanius> so i have to think about the metadata interface again
2007-07-03T10:12:37  <lanius> or maybe this is no problem since both setMetadata and removeMetadata are atomic there are no dirty reads
2007-07-03T10:14:31  <xorAxAx> right :) the problem is on the upper level
2007-07-03T10:14:57  <lanius> you still see a problem?
2007-07-03T10:17:30  <xorAxAx> of course
2007-07-03T10:18:00  <xorAxAx> thread A reads metadata, calculates something, writes metadata; inbetween, B wrote metadata
2007-07-03T10:19:39  <lanius> yes, we said that this is possible and no problem
2007-07-03T10:27:26  <xorAxAx> thats a large problem
2007-07-03T10:27:29  <xorAxAx> and not possible
2007-07-03T10:27:38  <xorAxAx> because that will corrupt the metadata
2007-07-03T10:28:36  <ThomasWaldmann> lanius: if the editor saves a page, it will have to:
2007-07-03T10:29:25  <lanius> xorAxAx: why will it corrupt metadata, it will just overwrite metadata
2007-07-03T10:29:31  <lanius> xorAxAx: if it uses the same revision
2007-07-03T10:29:35  <xorAxAx> lanius: which will corrupt it
2007-07-03T10:29:43  <lanius> why
2007-07-03T10:29:46  <xorAxAx> lanius: imagine a counter in the metadata
2007-07-03T10:29:47  <ThomasWaldmann> write lock it, read CURRENT metadata, check if the current rev is still the rev the edit was based on (otherwise we have a conflicting save in between), if yes, modify metadata (esp. increment current), save metadata and data, release write lock
2007-07-03T10:29:57  <xorAxAx> lanius: or any metadata key that depends on others
2007-07-03T10:30:06  <xorAxAx> anything that needs some referential integrity
2007-07-03T10:31:07  <lanius> ThomasWaldmann: right (what counter)
2007-07-03T10:31:17  <lanius> xorAxAx: the only solution is read locks
2007-07-03T10:31:49  <ThomasWaldmann> that only needs a write lock, if some other users reads an old rev, it is no problem
2007-07-03T10:31:54  <lanius> xorAxAx: and PageEditor checks if the revision was incremented in between
2007-07-03T10:32:07  <xorAxAx> the pageeditor?!?!?!
2007-07-03T10:32:12  <lanius> yes
2007-07-03T10:32:17  * xorAxAx is gone
2007-07-03T10:33:42  <ThomasWaldmann> incrementing current should occur in a way that when it gets visible on disk, all other stuff is already done
2007-07-03T10:34:13  <lanius> current is not metadata
2007-07-03T10:34:28  <lanius> it is updating the current file, nothing new?
2007-07-03T10:35:24  <ThomasWaldmann> for moin_fs16, updating the current file would just happen after saving the page data
2007-07-03T10:35:32  <lanius> that is not possible
2007-07-03T10:35:40  <lanius> since it will be updated when the new revision is created
2007-07-03T10:35:49  <lanius> after which the metadata and data will be set
2007-07-03T10:37:17  <ThomasWaldmann> hmm, what happens if some parallel process accesses such a new "empty" revision?
2007-07-03T10:37:30  <lanius> it gets empty content
2007-07-03T10:37:44  <lanius> but it can't save anything since the item is locked
2007-07-03T10:38:16  <ThomasWaldmann> that would be slightly confusing, esp. if someone uses this as base for an own edit :D
2007-07-03T10:39:38  <ThomasWaldmann> did you look at how the old code does handle current?
2007-07-03T10:39:50  <lanius> i did but that is not possible anymore
2007-07-03T10:40:00  <lanius> since we now have multiple operations
2007-07-03T10:40:08  <lanius> and we need them for the flexibility
2007-07-03T10:41:16  <lanius> and the item is edit-locked so the user sees that someone else is editing it
2007-07-03T10:47:09  <ThomasWaldmann> hmm, sell it as a feature :D
2007-07-03T10:47:40  <ThomasWaldmann> other editor sees edit-lock and doesn't get any content, so he can't edit :-P
2007-07-03T10:48:00  <lanius> he can edit
2007-07-03T10:48:03  <ThomasWaldmann> -> no conflict, no overlooking of edit-lock warning
2007-07-03T10:48:15  <lanius> there is a conflict
2007-07-03T10:48:17  <ThomasWaldmann> but he does not get content
2007-07-03T10:48:38  <lanius> a conflict between his edit and the new edit
2007-07-03T10:48:50  <lanius> well, how often does that happen
2007-07-03T10:49:07  <ThomasWaldmann> hmm, no. in most cases he will get content, just not in the millisecond when the other save happens
2007-07-03T10:53:35  <lanius> ok, but that is a different problem from what xorAxAx is talking about
2007-07-03T11:37:19  <CIA-20> moin: Thomas Waldmann <tw AT waldmann-edv DOT de> * 2315:e56af6f9b2cc 1.7-maninfo-vpv/MoinMoin/_tests/test_sourcecode.py: tests: test for crlf in Python sourcecode
2007-07-03T11:37:23  <CIA-20> moin: Thomas Waldmann <tw AT waldmann-edv DOT de> * 2316:5638ffa2fb38 1.7-maninfo-vpv/ (4 files in 4 dirs): replace crlf in python src files by lf
2007-07-03T11:37:24  <CIA-20> moin: Thomas Waldmann <tw AT waldmann-edv DOT de> * 2317:9df10b5358b5 1.7-maninfo-vpv/MoinMoin/_tests/test_sourcecode.py: test_sourcecode: add test for trailing spaces (currently disabled), other minor changes
2007-07-03T11:37:29  <CIA-20> moin: Thomas Waldmann <tw AT waldmann-edv DOT de> * 2318:938d6761519f 1.7-maninfo-vpv/MoinMoin/_tests/test_sourcecode.py: test_sourcecode: ignore/test/fix modes for trailing spaces, fixed file mode to use binary
2007-07-03T11:37:31  <CIA-20> moin: Alexander Schremmer <alex AT alexanderweb DOT de> * 2319:27cd29db1b96 1.7-maninfo-vpv/MoinMoin/conftest.py: Fix conftest to allow generative tests.
2007-07-03T11:37:32  <CIA-20> moin: Thomas Waldmann <tw AT waldmann-edv DOT de> * 2320:a6a4eaa948aa 1.7-maninfo-vpv/MoinMoin/_tests/ (test_sourcecode.py pep8.py): test_sourcecode: added PEP8 checker
2007-07-03T11:37:33  <CIA-20> moin: Thomas Waldmann <tw AT waldmann-edv DOT de> * 2321:bb9853b194f7 1.7-maninfo-vpv/MoinMoin/conftest.py: merge main
2007-07-03T11:37:34  <CIA-20> moin: Thomas Waldmann <tw AT waldmann-edv DOT de> * 2322:959d0815e149 1.7-maninfo-vpv/MoinMoin/_tests/ (pep8.py test_sourcecode.py): pep8: don't count stuff we ignore, added comments about pep8 test usage
2007-07-03T11:37:39  <CIA-20> moin: Thomas Waldmann <tw AT waldmann-edv DOT de> * 2323:71f7bde1077b 1.7-maninfo-vpv/MoinMoin/_tests/test_sourcecode.py: test_sourcecode: trying to use generative tests (doesn't work yet)
2007-07-03T11:37:42  <CIA-20> moin: Thomas Waldmann <tw AT waldmann-edv DOT de> * 2324:751e149a9a0a 1.7-maninfo-vpv/MoinMoin/_tests/test_sourcecode.py: test_sourcecode: fix generative test
2007-07-03T11:37:45  <CIA-20> moin: Thomas Waldmann <tw AT waldmann-edv DOT de> * 2325:01f05e74aa9c 1.7-maninfo-vpv/ (212 files in 55 dirs): Big PEP8 and whitespace cleanup
2007-07-03T11:37:48  <CIA-20> moin: Thomas Waldmann <tw AT waldmann-edv DOT de> * 2326:0005f996ff92 1.7-maninfo-vpv/MoinMoin/wikidicts.py: wikidicts: add comment about (empty) dict entry syntax
2007-07-03T11:37:53  <CIA-20> moin: Thomas Waldmann <tw AT waldmann-edv DOT de> * 2327:0f44ed5ed2a1 1.7-maninfo-vpv/MoinMoin/_tests/ (pep8.py test_sourcecode.py): test_sourcecode: remove tests that pep8 checker also does, enable warnings, add crlf check to pep8 checker
2007-07-03T11:37:59  <CIA-20> moin: Thomas Waldmann <tw AT waldmann-edv DOT de> * 2328:9d347f8bfd1c 1.7-maninfo-vpv/MoinMoin/_tests/test_sourcecode.py: test_sourcecode: fixed docstring
2007-07-03T11:38:04  <CIA-20> moin: Thomas Waldmann <tw AT waldmann-edv DOT de> * 2329:49188b1e803c 1.7-maninfo-vpv/MoinMoin/_tests/test_sourcecode.py: test_sourcecode: only yield tests for *.py files, fixes test count
2007-07-03T11:38:07  <CIA-20> moin: Ville-Pekka Vainio <vpivaini AT cs DOT helsinki DOT fi> * 2330:36b2837e8504 1.7-maninfo-vpv/ (214 files in 55 dirs): big main branch merge, resolved conflict in xmlrpc/__init__.py
2007-07-03T11:38:10  <CIA-20> moin: Ville-Pekka Vainio <vpivaini AT cs DOT helsinki DOT fi> * 2331:441d26a5208c 1.7-maninfo-vpv/MoinMoin/action/SisterDiff.py: cleanup imports in SisterDiff
2007-07-03T11:44:49  <ThomasWaldmann> vpv: do you have py.test installed?
2007-07-03T11:45:32  <vpv> not yet, but you kind of read my mind, I'd like to test my code :)
2007-07-03T11:54:38  <ThomasWaldmann> it is quite easy (it has a script you just put into your .profile and you're done)
2007-07-03T11:55:31  <ThomasWaldmann> and the tests will find most of pep8 problems now :) you should also add some tests for your new code.
2007-07-03T13:09:42  <dreimark> 500 on MM
2007-07-03T13:11:42  <ThomasWaldmann> retry
2007-07-03T13:49:04  <dreimark> :)
2007-07-03T14:39:15  <dreimark> http://moinmoin.wikiwikiweb.de/RecentChanges?action=fullsearch&context=180&value=underlay&titlesearch=Titles gives an exception
2007-07-03T14:40:10  <dreimark> sometimes I get the same in 1.7 too,
2007-07-03T14:45:33  <dreimark> http://moinmoin.wikiwikiweb.de/MoinMoinBugs/ExceptionFormattingATextThatIsBeingFormatted
2007-07-03T14:45:43  <dreimark> now it goes well again
2007-07-03T15:13:46  <CIA-20> moin: Heinrich Wendel <h_wendel@cojobo.net> * 2127:cedcc31ce699 1.7-storage-hwendel/MoinMoin/ (4 files in 3 dirs): rename lock to edit_lock
2007-07-03T15:13:54  <CIA-20> moin: Heinrich Wendel <h_wendel@cojobo.net> * 2128:8dc9f99459a7 1.7-storage-hwendel/MoinMoin/storage/ (6 files in 2 dirs): some locking code
2007-07-03T15:35:52  <ThomasWaldmann> dreimark: that code is a bit strange :)
2007-07-03T15:36:45  <ThomasWaldmann> if one is not very careful, i18n stuff could lead to deep recursion
2007-07-03T15:41:32  <ThomasWaldmann> lanius: your tests are broken, I guess it is due to a tarfile problem that is already fixed in main branch
2007-07-03T15:42:48  <ThomasWaldmann> (better do that soon, the conflicts won't get less)
2007-07-03T15:48:57  <ThomasWaldmann> (tarfile creates 00000001 directory instead of a file, which leads to access denied errors in the tests)
2007-07-03T15:50:29  <CIA-20> moin: Ville-Pekka Vainio <vpivaini AT cs DOT helsinki DOT fi> * 2332:0950ab8ef0ff 1.7-maninfo-vpv/MoinMoin/script/xmlrpc/manimport.py: PEP8 fixes (some lines still too long, but IMO better that way), ismanfile function, dry-run option, fixed tempdir removal bug and diff file handling bug
2007-07-03T15:53:51  <ThomasWaldmann> vpv: do tests fail because of too long lines? I thought I had switched off that warning/error?
2007-07-03T15:56:28  <vpv> I've only used the pep8.py thing for now, that fails of course
2007-07-03T15:56:50  <vpv> I haven't used any py.test stuff yet
2007-07-03T15:57:16  <ThomasWaldmann> ah, ok. the test_sourcecode has built-in sane defaults for pep8. :)
2007-07-03T15:58:17  <ThomasWaldmann> (imho that w<80 pep8 recommendation is not sane in the age of hi res screens)
2007-07-03T15:59:08  <vpv> does test_sourcecode always test the whole tree? Can I just give it my "own" source files to check?
2007-07-03T15:59:41  <ThomasWaldmann> (for docs, it might be nice to use <80 - because you can usually break the word flow as required, but py src lines broken just because of some more than 80chars width suck)
2007-07-03T16:00:17  <ThomasWaldmann> it tests the whole tree, but is fast enough (at least on the machine I tried :)
2007-07-03T16:00:37  <ThomasWaldmann> which is maybe not representative :D
2007-07-03T16:05:43  <CIA-20> moin: Ville-Pekka Vainio <vpivaini AT cs DOT helsinki DOT fi> * 2333:c191c0230b04 1.7-maninfo-vpv/MoinMoin/script/xmlrpc/manimport.py: fix a couple things from previous commit, ismanfile takes a filename now, not a list, cleaner code
2007-07-03T16:19:22  <dreimark> ThomasWaldmann: 15:35:52 what is strange ?
2007-07-03T16:19:25  <CIA-20> moin: Ville-Pekka Vainio <vpivaini AT cs DOT helsinki DOT fi> * 2334:ffecf2963185 1.7-maninfo-vpv/MoinMoin/xmlrpc/__init__.py: pep8 whitespace cleanup
2007-07-03T16:19:26  <CIA-20> moin: Ville-Pekka Vainio <vpivaini AT cs DOT helsinki DOT fi> * 2335:2dc65f64c07d 1.7-maninfo-vpv/MoinMoin/action/SisterDiff.py: pep8 cleanup for SisterDiff
2007-07-03T16:20:33  <dreimark> I have no idea why it not fails always
2007-07-03T16:20:45  <xorAxAx> lanius: do you have any questions? :)
2007-07-03T16:21:23  <xorAxAx> vpv: do you have negotiated a prototype milestone with karsten?
2007-07-03T16:23:33  <vpv> xorAxAx: well, in my original schedule I was hoping to get the publication phase done by the end of this week, or next week at the latest. I have submitted a resource request to the Fedora Infrastructure team, when they hopefully give me a public test environment, then we could have something to show.
2007-07-03T16:23:40  <vpv> (what a long answer ;)
2007-07-03T16:25:14  <xorAxAx> sounds good
2007-07-03T16:28:09  <vpv> I'm just a bit worried about the RPM stuff, since the concencus in the Fedora side seems to be that I should take the man files from the RPMs. That also means repository handling etc. I'll probably be working the next weekend too to try to get these things somewhat done.
2007-07-03T16:29:00  <xorAxAx> doesnt fedora have some repo infrastructure?
2007-07-03T16:29:09  <xorAxAx> (debian lacks some globally used one as well)
2007-07-03T16:29:16  <xorAxAx> unlike freebsd and soon ubuntu
2007-07-03T16:30:48  <vpv> they do, and the metadata is in XML files, and the yum package updater is python, so it shouldn't be a problem, it'll just take some studying for me to do :P
2007-07-03T16:32:09  <xorAxAx> well, i mean a source repository and not a package repository
2007-07-03T16:34:13  <vpv> they kind of have that too, but they'd prefer me to use the RPMs since the man pages could be modified during the RPM building phase in the .spec file, so the man files that go to the RPM may be different from the man pages that are in the source packages.
2007-07-03T16:38:56  <xorAxAx> indeed
2007-07-03T16:39:07  <xorAxAx> but that wouldnt simplify applying the changes
2007-07-03T16:39:58  <vpv> good point
2007-07-03T17:17:30  <johill> hehe
2007-07-03T17:17:31  <johill> /home/johannes/Projects/moin/moin-1.7/wikiconfig.py:12: SyntaxWarning: import * only allowed at module level
2007-07-03T17:19:54  <ThomasWaldmann> huh?
2007-07-03T17:20:19  * ThomasWaldmann somehow expected that to work
2007-07-03T17:20:45  <xorAxAx> man fast locals
2007-07-03T17:23:59  <ThomasWaldmann> feel free to remove it or replace it by something working. I just wanted to have some local config file so that we don't have fluctuations in the repo file all the time due to developer's test settings.
2007-07-03T17:48:11  <CIA-20> moin: Ville-Pekka Vainio <vpivaini AT cs DOT helsinki DOT fi> * 2336:5c353446930f 1.7-maninfo-vpv/MoinMoin/script/xmlrpc/manimport.py: Add branch/distro into namespace and as a required option
2007-07-03T19:01:46  <ThomasWaldmann> vpv:
2007-07-03T19:01:54  <ThomasWaldmann> -        msg = diff(self.request,  self.page.get_raw_body(),otherpage.get_raw_body())
2007-07-03T19:01:57  <ThomasWaldmann> +        msg = diff(self.request, self.page.get_raw_body(),
2007-07-03T19:02:00  <ThomasWaldmann> +                   otherpage.get_raw_body())
2007-07-03T19:02:01  <ThomasWaldmann> plese DON'T
2007-07-03T19:02:51  <ThomasWaldmann> (this is one of the reasons why I said that 80chars width makes no sense)
2007-07-03T19:05:14  <dreimark> bbl
2007-07-03T19:06:35  <ThomasWaldmann> lanius: +            write_filename = self.get_page_path(name, "revisions", get_rev_string(revno) + ".meta")   is this a tmp file?
2007-07-03T19:10:30  <lanius> yes
2007-07-03T19:10:45  <lanius> xorAxAx: i still don't understand the problem
2007-07-03T19:12:56  <xorAxAx> lanius: there are threads A and B
2007-07-03T19:13:07  <xorAxAx> there is the item I with rev 1
2007-07-03T19:13:28  <xorAxAx> let m := I[1].metadata
2007-07-03T19:14:20  <xorAxAx> A reads m[somekey], B reads m[somekey], B writes m[somekey], A reads m[someotherkey] and uses that to calculate the new vlaue, A writes m[somekey]
2007-07-03T19:14:24  <xorAxAx> now the data is corrupt
2007-07-03T19:14:38  <xorAxAx> because m[somekey] doesnt match m[someotherkey] anymore
2007-07-03T19:14:47  <lanius> the only way ican think to fix that is read locks
2007-07-03T19:15:03  <xorAxAx> well, we said that the way to fix this is explicit write locks
2007-07-03T19:15:14  <lanius> but how do they help
2007-07-03T19:15:38  <xorAxAx> both threads must get write locks before they start reading
2007-07-03T19:16:07  <xorAxAx> and the metadata object disallows writing if there is no lock
2007-07-03T19:17:25  <lanius> is it sufficient if you get the item and then lock it (assuming that the program follows the correct logic) or do we have to make sure that we have some mode parameter on the ItemCollection
2007-07-03T19:17:50  <xorAxAx> the metadata object has to check this
2007-07-03T19:18:06  <xorAxAx> but you dont need some central lock manager class, i dont think so
2007-07-03T19:18:13  <lanius> assume the follwing
2007-07-03T19:18:28  <lanius> you get an item from the collection: item = ItemCollection["test"]
2007-07-03T19:18:31  <xorAxAx> yes
2007-07-03T19:18:32  <lanius> this is readonly now
2007-07-03T19:18:36  <xorAxAx> yes
2007-07-03T19:18:50  <lanius> now you do item.lock 0 True
2007-07-03T19:18:57  <lanius> and you have a r/w item
2007-07-03T19:19:05  <lanius> after wrting you do item.lock = False
2007-07-03T19:19:24  <lanius> is that sufficient?
2007-07-03T19:19:50  <xorAxAx> no
2007-07-03T19:20:01  <xorAxAx> well, is that a single instance attrib?
2007-07-03T19:20:07  <lanius> yes
2007-07-03T19:20:11  <xorAxAx> you need a backend call for that of course
2007-07-03T19:20:16  <lanius> yes
2007-07-03T19:20:18  <xorAxAx> some locking primitive in the backend
2007-07-03T19:20:28  <lanius> (i already implemented the call, but not the check in metadata/data)
2007-07-03T19:20:53  <xorAxAx> note that you cannot implement locking as a sequence of operations, it must be an atomic backend operation
2007-07-03T19:21:08  <lanius> yes
2007-07-03T19:21:34  <xorAxAx> if you like that .lock syntax, of course you can do that using properties
2007-07-03T19:21:54  <xorAxAx> i dont see point compared to some lock()/unlock() methods, though
2007-07-03T19:22:31  <xorAxAx> well, as we have multiple locks, lock_writes(), unlock_writes() would be even better
2007-07-03T19:22:32  <lanius> it's no difference, i got used to properties
2007-07-03T19:22:44  <lanius> multiple?
2007-07-03T19:22:51  <xorAxAx> editlock for example :)
2007-07-03T19:23:01  <xorAxAx> hmm
2007-07-03T19:23:04  <xorAxAx> an item lock
2007-07-03T19:23:07  <lanius> edit-ock is only metadata
2007-07-03T19:23:12  <xorAxAx> yes :)
2007-07-03T19:23:17  <xorAxAx> i am thinking about term clashes
2007-07-03T19:23:24  <xorAxAx> and confusion by names
2007-07-03T19:23:32  <lanius> yeah
2007-07-03T19:23:37  <xorAxAx> we need t least an item lock and a metadata lock
2007-07-03T19:23:50  <lanius> i would say that is one thing
2007-07-03T19:23:53  <xorAxAx> the item lock could be done as a lock on the item metadata realm
2007-07-03T19:24:37  <xorAxAx> you could e.g. have some generic lock() unlock() methods in the backend that accept a single name
2007-07-03T19:24:55  <lanius> that's what i have, take a ook at my last commit
2007-07-03T19:24:57  <xorAxAx> that can be mapped to a db table or the old locking system (which would create files+folders)
2007-07-03T19:25:00  <xorAxAx> :-)
2007-07-03T19:25:03  <xorAxAx> will do
2007-07-03T19:25:09  <xorAxAx> but not now
2007-07-03T19:25:24  <lanius> and the item lock will lock the whole item, so also the metadata
2007-07-03T19:25:50  <xorAxAx> but not recursively, i.e. not the metadata of the revs, right?
2007-07-03T19:25:57  <xorAxAx> (would be difficult to implement i guess)
2007-07-03T19:26:14  <lanius> everything, no other write operation on the wohle item
2007-07-03T19:26:35  <xorAxAx> hmm, ok
2007-07-03T19:26:49  * xorAxAx gone buying food
2007-07-03T19:27:01  <lanius> bye
2007-07-03T20:11:19  <ThomasWaldmann> lanius: if it is a tmp file and you name another tmp file .tmp, maybe do the same with that one :)
2007-07-03T20:12:12  <lanius> yes
2007-07-03T20:12:45  <xorAxAx> how can you generate temp files without ensuring uniqueness?
2007-07-03T20:12:55  <xorAxAx> any number of workers might be in that block of code
2007-07-03T20:13:37  <lanius> that was my problem
2007-07-03T20:13:45  <lanius> but if we enforce write locks
2007-07-03T20:28:56  <ThomasWaldmann> zenhase: how is it going? the repo is so silent recently...
2007-07-03T20:29:35  <xorAxAx> grzywacz: hi, how was your exam?
2007-07-03T20:48:03  <grzywacz> xorAxAx, hi, depends. ;)
2007-07-03T20:48:21  <grzywacz> I'll tell you if I'm happy after I write the other one in two days time. ;)
2007-07-03T20:48:35  <xorAxAx> how are both related? :)
2007-07-03T20:51:26  <grzywacz> xorAxAx, if I pass the next one I won't care about this. :P
2007-07-03T20:51:36  <grzywacz> Because I'll have enough points scored to finish my studies. ;-)
2007-07-03T20:51:41  <xorAxAx> wow
2007-07-03T20:51:49  <xorAxAx> i see, you are further than me
2007-07-03T20:51:55  <xorAxAx> how is your grade called?
2007-07-03T20:52:32  <grzywacz> Hm, master's in CS? I'm finishing 4th year now, so only writing a thesis will be left for 5th...
2007-07-03T20:52:56  <xorAxAx> do they actually call it masters like it was set in bologna? :)
2007-07-03T20:53:14  <grzywacz> No idea?
2007-07-03T20:53:21  <xorAxAx> well, how is it called in polish
2007-07-03T20:53:27  <grzywacz> magister
2007-07-03T20:53:34  <xorAxAx> ok
2007-07-03T20:54:04  <xorAxAx> it doesnt look like they realised the bolognas stuff already
2007-07-03T20:54:25  <xorAxAx> http://en.wikipedia.org/wiki/Bologna_process
2007-07-03T20:54:33  <xorAxAx> http://en.wikipedia.org/wiki/Bologna_process#Poland
2007-07-03T20:54:58  <xorAxAx> hmm, it says that magister matches master
2007-07-03T20:55:37  <grzywacz> Let me check my ects points. ;)
2007-07-03T20:55:51  <xorAxAx> grzywacz: weird that your failing grade is 2 and not 1
2007-07-03T20:55:54  <xorAxAx> or even 0
2007-07-03T20:56:26  <grzywacz> Depends, I'd probably find it weird if it was to become the other way round. ;)
2007-07-03T20:56:49  <xorAxAx> hmm?
2007-07-03T20:57:18  <grzywacz> So ok, 243 ECTS points now.
2007-07-03T20:57:40  <xorAxAx> we have 30 per semester
2007-07-03T20:58:10  <grzywacz> And... +72 after this academic year.
2007-07-03T20:58:16  <grzywacz> Well, I can get more if I want to.
2007-07-03T21:39:37  <vpv> ThomasWaldmann: ok, I'll fix those tomorrow, the whole SisterDiff need work anyway
2007-07-03T22:02:46  <xorAxAx> lanius: you need a timeout in the backend locking interface
2007-07-03T22:03:09  <xorAxAx> to be most flexible here
2007-07-03T22:07:20  <xorAxAx> hmm, holy moinbot is not online
2007-07-03T22:07:27  <xorAxAx> i have nobody to chat with
2007-07-03T22:40:45  <lanius> xorAxAx: what timeout to you propose for default
2007-07-03T22:41:01  <xorAxAx> no idea :)
2007-07-03T22:41:16  <lanius> sounds good :-)
2007-07-03T22:41:44  <ThomasWaldmann> shorter than tcp timeout
2007-07-03T22:41:45  <xorAxAx> btw, the backend methods should not be item specific
2007-07-03T22:41:57  <xorAxAx> they should be generic
2007-07-03T22:42:00  <dreimark> xorAxAx: is moinBot` a clone
2007-07-03T22:42:06  <lanius> xorAxAx: what do you mean with that?
2007-07-03T22:42:08  <xorAxAx> dreimark: no?
2007-07-03T22:42:16  <xorAxAx> lanius: they should work for any string passed in as name
2007-07-03T22:42:25  <xorAxAx> lanius: and the upper layers should decide what to pass in
2007-07-03T22:42:28  <dreimark> I see moinBot`
2007-07-03T22:42:31  <xorAxAx> dreimark: me too
2007-07-03T22:42:33  <xorAxAx> its the logging bot
2007-07-03T22:42:59  <lanius> xorAxAx: do we really need that
2007-07-03T22:43:02  <dreimark> first time I recognized ` at the end
2007-07-03T22:43:27  <xorAxAx> lanius: yes, i dont see any disadvantages
2007-07-03T22:44:24  <lanius> xorAxAx: you have to store the log somewhere else then, not in the item dir
2007-07-03T22:44:28  <lanius> s/log/lock
2007-07-03T22:44:37  <xorAxAx> lanius: well, the backend will find a place
2007-07-03T22:45:25  <xorAxAx> and you need rev locking anyway
2007-07-03T22:45:38  <lanius> do i?
2007-07-03T22:45:53  <xorAxAx> how else do you want to implement metadata updates? lock the item?
2007-07-03T22:45:58  <lanius> yes
2007-07-03T22:46:13  <xorAxAx> hmm, might be enough, yes
2007-07-03T22:46:29  <xorAxAx> nevertheless, i would say that a generic lock operation is nice and doesnt have any disadvantages
2007-07-03T22:46:36  <lanius> i don't think there are really use cases for metadata locking only
2007-07-03T22:46:39  <lanius> yeah, should be simple to implement
2007-07-03T22:47:07  <xorAxAx> in a db you would use a separate table anyway
2007-07-03T22:47:16  <lanius> yeah
2007-07-03T22:47:35  <xorAxAx> to be able to use locking primitives if available
2007-07-03T22:47:43  <xorAxAx> you could even use a separate locking daemon
2007-07-03T22:47:57  <xorAxAx> like nfs :)
2007-07-03T22:48:16  <lanius> i wouldn't take nfs as a good example for anything :D
2007-07-03T22:48:33  <xorAxAx> then like ... cvsnt :)
2007-07-03T23:54:40  <dreimark> do we have a check for FAT32 in setup.py
2007-07-03T23:55:36  <dreimark> because some of the filenames in underlay are to large in 1.7 so it cant go well.
2007-07-03T23:56:44  <dreimark> and FAT has some more issues which does make more trouble too
2007-07-03T23:57:27  <dreimark> I guess we should tell don't  install on FAT32 or you have this and this problem
2007-07-03T23:58:43  <ThomasWaldmann> how much is fat maxlen? ntfs maxlen?

MoinMoin: MoinMoinChat/Logs/moin-dev/2007-07-03 (last edited 2007-10-29 19:06:04 by localhost)