fabric/fabric — pull request #628 by aventurella (2012-04-29 04:08:43+00:00)
Title: Added @depends decorator

Allows tasks to declare dependencies prior to executing. Dependencies are only executed once. It's pretty much just a convenience around execute(). In the example below "foo" will only print once.

Sample usage:

```python
@task
def foo():
print("foo")

@task
@depends("foo")
def bar():
print("bar")

@depends("bar", "foo")
@task
def baz():
print("baz")

```

Executing *fab baz* will then output:

```
foo
bar
baz
```