Thats a good idea, and I thought about it.  But we have a lot of
hosts, so I didn't want to have to manage that.  However, this seemed
to work in my capfile.

set :repository, 'http://10.0.1.10/somerepo'
set :local_repository, 'http://10.0.2.10/somerepo'

_cset(:real_revision)
{ query_local_revision(revision,local_repository) { |cmd|
with_env("LC_ALL", "C") { `#{cmd}` }}}

def query_local_revision(revision,repository)
  return revision if revision =~ /^\d+$/
  result = yield(scm(:info, repository, authentication, "-
r#{revision}"))
  YAML.load(result)['Revision']
end

Not too bad!  I think that's clean enough for me to keep.  What do you
think?



On Aug 9, 3:38 pm, "Jamis Buck" <[EMAIL PROTECTED]> wrote:
> What if you used /etc/hosts on all your servers to define an alias,
> which mapped to the correct repository IP address? Then, your recipe
> would just refer to the alias, which would map to the correct IP
> address on the appropriate host(s).
>
> - Jamis
>
> On 8/9/07, dusty <[EMAIL PROTECTED]> wrote:
>
>
>
> > I have a situation where the servers I am deploying to and my laptop
> > have different paths to the repository.  For example, I vpn in and
> > obtain a private IP address.  Our subversion repository is multi-homed
> > with a private IP address on the same network as I.  The other
> > interface has the same ip space as the servers I am deploying to.
>
> > So, what I need to be able to do during deployment is check with the
> > subversion server for the revision number from my localmachine on one
> > repository path, then do the checkout from another.  Something like...
>
> > set :local_repository, 'http://10.0.0.10/somestuff'
> > set :remote_repository, 'http://10.1.0.10/somestuff'
>
> > I'm thinking that I override the real_revision variable and call my
> > own method which hits the local_repository to obtain that number.
> > There are probably plenty of ways I can make this work.  However, I
> > wanted to check with the list and see if there are any suggestions
> > first.
>
> > BTW, I'm not asking anyone to do the work for me, just wanted some
> > ideas in case this was already done somewhere or perhaps there is
> > better way.
>
> > Thanks


--~--~---------~--~----~------------~-------~--~----~
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/capistrano
-~----------~----~----~----~------~----~------~--~---

Reply via email to