capistrano/capistrano — pull request #629 by leehambley (2013-09-01 11:16:38+00:00)
Title: Shoot at fixing #627.

This patch checks the list of releas directories first, assuming that
the list returned is an array (i.e responds to `#any?()`). If true then
an `rm` is called after mapping the release names onto the end of the
release path (`#join()`). In case the old release directories list is
empty, then an info message is broadcast through the i18n system
indicating that there is no work to be done.

@seenmyfate one thing is not clear to me here, which is what happens if
two servers have differing release lists, it appears that as we're
inside an `on()`, the `capture()` and all subsequent conditionals should
be host specific, which is important if we concatenate the list of
release directories and expect that one single `rm` command can rule
them all?