About Archive Tag Cloud Translations RSS

You are writing a comment about Deploying Django with Fabric, here is a quick summary:

A look at how to manage deployment complexity with Django using Fabric. Something of a continuation on the post from yesterday.


You are responding to this comment written by Alexander Artemenko on November 7th 2008, 09:17.

I have found, that invoke command, repeated in the loop, actually runs only once. All following tries to invoke same function fail with warning "Skipping xxxxxx (already invoked).".

I looked into the fabric's sources, and found, this interesting docstring in the infoke function:

Invokes the supplied command only if it has not yet been run (with the given arguments, if any).

So, to make it works for different repositories, you need to use such code:

@@ python def git_pull(repo, parent, branch): "Updates the repository." config.repo = repo config.parent = parent config.branch = branch run("cd ~/git/$(repo)/; git pull $(parent) $(branch)")

def pull(): require('fab_hosts', provided_by=[production]) for repo, parent, branch in config.repos: invoke((git_pull, dict(repo=repo, parent=parent, branch=branch))) @@


Please be aware that comment forms go stale after one hour.





Comments may make use of LifeFlow MarkDown. Raw html will be escaped.


Quick Introduction to LifeFlow MarkDown Syntax

A highlighted code block:

@@ ruby
def a (b, c):
  b * c
end
@@

Other common languages work as well: scheme, python, java, html, etc.

Other markdown syntax:

 ### This is an h3 title
#### This is an h4 title
**this is bold**
*this is italics*

1. This is an
2. ordered list

* And an unordered
* list too

[this is a link](http://www.lethain.com/ "Lethain")