[These changes are present in my fork of Fabric at <http://github.com/niklasl/fabric/tree/master>]
== 7. Skipping executed commands == Added the `invoke` operator for prevention of multiple calls of commands. This is a somewhat invasive change, but I hope I've addressed it better now. Here's how it works now: My initial version only invokes a command once (unless you call it manually in code) at all times. Christian had a concern that this may play ill with at least the `set` command. I thus realized that it works very bad with commands that take arguments altogether. Therefore, now anything supplied on the command line is executed even if repeated. But *all* `_execute_command` invokations, including these, are remembered, *including* their arguments (see `_args_hash`). This is currently only used via `invoke`, which will not invoke the same command+args twice. (The only, in my opinion minor, "danger" is if `prompt` is used to possibly change a similar invocation after the command call. Since skips are also printed, even then the user will be notified of the skip.) Note: I won't object much if you find this too complex. I can then perhaps revert to a `call_once` (and associated `depends`) without support for arguments at all.. (Although I think it would be nice if it cooperated with the normal _execute_command.) ------------------------------------------ Best regards, Niklas _______________________________________________ Fab-user mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/fab-user
