fab-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Fab-user] RFC: Implementing a current working directory / path refa


From: Nicolas Steinmetz
Subject: Re: [Fab-user] RFC: Implementing a current working directory / path refactoring feature
Date: Mon, 24 Nov 2008 11:04:08 +0100

2008/11/23 Jeff Forcier <address@hidden>
My understanding of how this would be implemented, and I believe this
is what Christian meant too, is that the implicit path prefixing
*only* occurs on the *remote* end. So in this case, the first argument
to put() above would be relative to your local cwd (wherever you
called 'fab'), and only the second argument would be implicitly
updated (to 'workdir/package.tar.gz').

Hmm ok I'm more clear now about this feature. So if we consider that workdir apply only in remote (this way, it has some great interests), can we change of workdir within a single "operation" like :

def deploy():
    cd('workdir1')
    put('build/archive.tgz', 'archive.tgz')
    cd('workdir2') # let's say the directory where I have all my scripts
    run("deploy.sh")
 
It means that cd() has to use only the last version it has been set.

Other questions, what happens if at the put statement we set an absolute path ?
    cd('workdir1')
    put('build/archive.tgz', '/var/deployment/archive.tgz')

Would it be interepreted as <value of workdir>/var/deployment/archive.tgz or as /var/deployment/archive.tgz or as there is a first /, then it starts back from the server's root ?

--
Nicolas Steinmetz
http://www.steinmetz.fr - http://www.unelectronlibre.info/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]