Issue 146: mtn_automate cannot be called from hooks (specifically validate_change)

Reported by Judson Lester, Feb 19, 2011

Steps to reproduce the problem:

I'm trying to use validate_change to refuse a commit if there are 
files that are unknown - I have a hard time with commits that are 
broken because they don't include new files needed to run.  So:

1. Write a validate_change hook that includes: 
 local bool, str = mtn_automate("inventory")
2. mtn commit

Expected result:
Around the commit, there should be output of the contents of the 

Actual results:
mtn: lua: misuse: It is illegal to call the mtn_automate() lua 
mtn: lua: misuse: unless from a command function defined by 

Output of `mtn version --full`:

Comment 1 by Thomas Keller, Feb 19, 2011

Some discussion on this topic including common pitfalls:

(also skip to the next day)

Related issues 139, 132, 112, 82, 81, and 75 (hover over the links 
to get a description).

Created: 13 years 3 months ago by Judson Lester

Updated: 13 years 3 months ago

Status: New

Followed by: 1 person


Quick Links:    -     Downloads    -     Documentation    -     Wiki    -     Code Forge    -     Build Status