Skip to content
This repository has been archived by the owner on Jan 31, 2023. It is now read-only.

fixes #25 #27

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

fixes #25 #27

wants to merge 3 commits into from

Conversation

rwst
Copy link
Contributor

@rwst rwst commented May 8, 2014

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

git diff --name-only `git merge-base HEAD FETCH_HEAD`..patchbot/ticket_upstream

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)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why the extra sleep here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
[email protected]:

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
.

@rwst
Copy link
Contributor Author

rwst commented May 29, 2014

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants