pdf-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [pdf-devel] make syntax-check


From: gerel
Subject: Re: [pdf-devel] make syntax-check
Date: Wed, 03 Sep 2008 11:44:45 -0700 (PDT)

Here is the script for a pre-commit though,

--- pre_commit.py ---
from bzrlib import branch
import os

script_cmds = ['make syntax-check', 'make check']

def pre_commit_hook(local, master, old_revno, old_revid,
                    future_revno, future_revid, tree_delta, future_tree):
    success, fails = ([],[])
    for c in script_cmds:
        if (os.system(c) != 0):
            fails.append(c)
        else:
            success.append(c)
    for s in success:
        print ">>> " + s + ": succeeded."
    for f in fails:
        print ">>> " + f + ": failed."


branch.Branch.hooks.install_named_hook('pre_commit', pre_commit_hook,
                                 'Patch safety scripts hook')


--- end of pre_commit.py ---




reply via email to

[Prev in Thread] Current Thread [Next in Thread]