Skip to content

Commit a2ab923

Browse files
committed
Upload large changesets instead of printing to console
Uses sprunge.us
1 parent 5f5a567 commit a2ab923

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

toolset/run-ci.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,12 @@ def touch(fname):
224224
log.debug("Running `git log --name-only --pretty=\"format:\" %s`" % self.commit_range)
225225
changes = subprocess.check_output("git log --name-only --pretty=\"format:\" %s" % self.commit_range, shell=True)
226226
changes = os.linesep.join([s for s in changes.splitlines() if s]) # drop empty lines
227-
log.debug("Result:\n%s", changes)
227+
if len(changes.splitlines()) > 1000:
228+
log.debug("Change list is >1000 lines, uploading to sprunge.us instead of printing to console")
229+
url = subprocess.check_output("git log --name-only %s | curl -F 'sprunge=<-' http://sprunge.us" % self.commit_range, shell=True)
230+
log.debug("Uploaded to %s", url)
231+
else:
232+
log.debug("Result:\n%s", changes)
228233

229234
# Look for changes to core TFB framework code
230235
if re.search(r'^toolset/', changes, re.M) is not None:

0 commit comments

Comments
 (0)