fabric/fabric — pull request #582 by alaski (2012-03-09 22:12:37+00:00)
Title: Add cwd_in_path context manager.

Added cwd_in_path context manager to allow for importing and running of code in the same file as the fabfile.

This allows for including a fabfile in a project which can run code from that project. Currently fabric is more focused on running shell commands but this opens up the ability for more types of tasks.

My use case was tasks like the following which initialize the database for my project:

```
def db_init():
with cwd_in_path():
from localmodule import db
db.create_all()
```