Hi folks,

I was this guy who made this trouble 4 weeks ago in r10769 together with 
implementing reading the last edit comment (which I found doesn't work in some 
circumstances, anyway).

I do not prefer to in inform about changes via 
[email protected] as [email protected] does 
it and I cannot find any reason to do it twice. Perhaps this change was so 
great that I had the better discussed previously; but there are others that are 
much more changing the behaviour or structure. And we have a vcs to revert my 
stuff.

Anyway the intention of that edit was to enable bots to respect reverts and 
prevent edit wars with human users like [1]. This was a very old request (from 
2009) on ms en talk page [2] and it could be easily implemented by the 
Page.comment() method. It was also proposed by an other bot owner who had  some 
problems with reverting bot edits until his bot was able to respect reverts. Ok 
this does not prevent edit wars with different bots and also can stop its work 
as false positive. In most cases it works wrong for log pages and the edits 
must forced like in r10789 and r10790.

I cannot implement such behavior with the last user because the last user 
reverts the previous bot edit which is noticed in the edit comment. But we can 
use a closer MediaWiki message for "Undid revision $rev by $user" if that 
behavior is usefull and in addition use a global option like -forceedit to 
override this restriction. (I prefer to use the config variable and make it 
optionable like some variables in the rewrite branch r10676-r10678)

The exception of this edit block isn't quiet except you use try/exception with 
Page.put(). Otherwise that error raising displays what the given hint. Anyway 
we could have an other error exception class for different upper level 
exception handling.

Finally, Binariz, I am really sorry If I waste your time with that stuff. 
Please do not hesitate to contact me if something is strange with the bot. 
Maybe in 36% it's caused by me [3] ;)

And last but not least

Greetings an Happy New Year to all of you

xqt


[1] http://en.wikipedia.org/w/index.php?title=Yan_Sun&action=history
[2] http://en.wikipedia.org/wiki/User_talk:Xqt#Xqbot_is_edit_warring
[3] http://commons.wikimedia.org/wiki/File:%C3%9Cbertragung_nach_Datum.PNG


----- Original Nachricht ----
Von:     Bináris <[email protected]>
An:      Pywikipedia discussion list <[email protected]>
Datum:   30.12.2012 23:31
Betreff: [Pywikipedia-l] Thank you for the bad joke :-(

> Hi,
> 
> I worked a lot on a script that created a page under my bot's user page,
> finally after tests I renamed
> it<http://hu.wikipedia.org/w/index.php?title=Wikip%C3%A9dia:Elavult_m%C3%A1s
> vitasablonok&diff=12816525&oldid=12815108>to
> project namespace. At the next run the bot worked 8 minutes (hard to
> wait if you want to work with the result), and finally stopped at the last
> moment instead of saving the page.
> 
> Sorry, I forgot to copy the screen, the essence is that it claimed my page
> to be *locked* (what I thought to be protected). I didn't understand, and I
> spent a lot of time with investigating and understanding what happened. The
> page was not protected, of course.
> 
> The result of my investigation is that when the bot finds its own name in
> the last edit comment (that was the fact because of renaming), it supposes
> that the last edit was a revert of its previous edit (why?), and denies
> saving with a fake and misleading "page locked" exception.
> 
> The code in wikipedia.py is:
>             elif self.comment() and username in self.comment():
>                 raise LockedPage(
>                     u'Not allowed to edit %s because last edit maybe
> reverted'
>                     % self.title(asLink=True))
> (line 1970)
> Of course, these type of messages in the argument of *raise* won't appear
> on user's screen, it is hidden into the source code. For some reason,
> Python does not show the message in user exceptions.
> 
> This was my first experience with this kind of error so I was first
> frightened and confused and finally found out that I should use a
> force=True parameter, and so after waiting another 8 minutes I could save
> the page. I solved the case and lost 15-20 minutes.
> 
> Is there really a serious reason to suppose that having found the name of
> the bot in the last edit comment marks a revert and to prevent the bot of
> saving the result of its work?
> 
> Bináris.unhappy.hu <http://xn--binris-rta.unhappy.hu>
> 
> 
> --------------------------------
> 
> _______________________________________________
> Pywikipedia-l mailing list
> [email protected]
> https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l
>

_______________________________________________
Pywikipedia-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/pywikipedia-l

Reply via email to