Ignore:
Timestamp:
Jul 6, 2010, 12:27:50 AM (14 years ago)
Author:
gdb
Message:

Added reporting

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/invirt-dev/invirt-submit-build

    r3035 r3036  
    4747        b.validateBuild(pocket, package, commit)
    4848    except b.InvalidBuild, e:
    49         print >>sys.stderr, "E: %s" % e
     49        msg = "E: %s" % e
     50        print >>sys.stderr, msg
     51        # Prevent an attack by submitting excessively long arguments
     52        args = [arg[:min(len(arg), 80)] for arg in (pocket, package, commit)]
     53        b.runHook('failed-submit', args + [principal], stdin_str=msg)
    5054        sys.exit(1)
    5155
     
    5862    q.close()
    5963    os.rename(q_name, q_path)
     64    short_commit = b.canonicalize_commit(package, commit, shorten=True)
     65    b.runHook('post-submit', [pocket, package, short_commit, principal])
     66    print '%s, your job to build %s for %s:%s has been submitted!' % (principal, short_commit, package, pocket)
    6067
    6168
Note: See TracChangeset for help on using the changeset viewer.