From e3ac6924f2213a574bd9dfc7e3a80b76ba99c056 Mon Sep 17 00:00:00 2001 From: Tom Prince Date: Sat, 26 Mar 2011 02:40:46 -0400 Subject: [PATCH] TryClient: Don't pass empty diff to buildbot. We created a source stamp with patch being an empty string. Instead, create a source stamp without a patch. Signed-off-by: Tom Prince --- master/buildbot/clients/tryclient.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/master/buildbot/clients/tryclient.py b/master/buildbot/clients/tryclient.py index 9767c2f5800..a0c495f1ed8 100644 --- a/master/buildbot/clients/tryclient.py +++ b/master/buildbot/clients/tryclient.py @@ -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, @@ -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)