Conversation
There was a problem hiding this comment.
Why the extra sleep here?
There was a problem hiding this comment.
Not sure. When testing this I had the impression the server locked upon me.
But there appears to be a general delay of 5 min between failed tickets the
cause of which I haven't examined. It just seemed safe at the time.
On Tue, May 20, 2014 at 4:34 PM, Robert Bradshaw
notifications@github.comwrote:
In src/patchbot.py:
@@ -403,6 +404,14 @@ def test_a_ticket(self, ticket=None):
history = open("%s/history.txt" % self.log_dir, "a")
history.write("%s %s\n" % (datetime(), ticket['id']))
history.close()
if not ticket['spkgs']:ticket_id = ticket['id']fetch_from_trac(ticket_id)ticket_is_safe = inplace_safe()if self.safe_only and not ticket_is_safe:print "Unsafe ticket and --safe-only set. Bailing out..."time.sleep(10)Why the extra sleep here?
—
Reply to this email directly or view it on GitHubhttps://github.com//pull/27/files#r12846649
.
|
However, I would agree that this patch is not ready simply because bailing out does not work. Patchbot will just try the same ticket again. See #42. |
This not only implements the --safe-only option but, for the purpose, refactors the pull_from_trac method into smaller chunks that get utilized. Patchbot will no longer taint SAGE_ROOT with unsafe file merges and thus no longer unnecessarily rebuilds in the original SAGE_ROOT after an unsafe build in tmp/. The central trick is to get the patched file list before merging via the magic command