Skip to content

Commit

Permalink
TryClient: Don't pass empty diff to buildbot.
Browse files Browse the repository at this point in the history
We created a source stamp with patch being an empty string. Instead, create a
source stamp without a patch.

Signed-off-by: Tom Prince <tom.prince@ualberta.net>
  • Loading branch information
tomprince committed Mar 26, 2011
1 parent 8e385ae commit e3ac692
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions master/buildbot/clients/tryclient.py
Expand Up @@ -53,8 +53,10 @@ def get(self):
d.addCallback(self.getPatch)
d.addCallback(self.done)
return d
def readPatch(self, res, patchlevel):
self.patch = (patchlevel, res)
def readPatch(self, diff, patchlevel):
if not diff:
diff = None
self.patch = (patchlevel, diff)
def done(self, res):
# TODO: figure out the branch and project too
ss = SourceStamp(self.branch, self.baserev, self.patch,
Expand Down Expand Up @@ -425,6 +427,8 @@ def createJob(self):
diff = sys.stdin.read()
else:
diff = open(difffile,"r").read()
if not diff:
diff = None
patch = (self.config['patchlevel'], diff)
ss = SourceStamp(branch, baserev, patch)
d = defer.succeed(ss)
Expand Down

3 comments on commit e3ac692

@douglatornell
Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm. Forcing diff = None at lines 430/431 breaks a use case I have for triggering builds with special properties set. I have been using:

buildbot try --diff /dev/null

but this change breaks that usage.

@djmitche
Copy link
Member

Choose a reason for hiding this comment

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

why not use 'buildbot sendchange' instead?

@tomprince
Copy link
Member Author

@tomprince tomprince commented on e3ac692 Mar 31, 2011 via email

Choose a reason for hiding this comment

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

Please sign in to comment.