On Jan 31, 2008, at 9:12 AM, John Joseph Bachir wrote:
On Jan 30, 2008 11:07 PM, Jamis Buck <[EMAIL PROTECTED]> wrote:If anyone has the inclination, a patch would be welcome, so long as itdid not complicate the common case.Here's what I put together in 10-minutes, for the sake of discussion. Two things to note: [1] clearly the hardcoded svn command in this file is unacceptable, since that logic should reside in the abstract scm layer... I only know how to do this check for svn though, and wanted a simple patch for the sake of discussion. [2] because this check needs to happen after determining if the repository already exists but before doing an update, I moved the directory-existence checking logic out of sh and into ruby. Is there any particular reason that this logic is being done in sh?
Yeah, it has to be sh because it is being executed on the remote server, not the local host. By moving that to ruby checks and back- ticks, the condition is now being checked on your local server, instead of your remote host, which is not what you actually want.
So, to be clear, the 'scm_run' method executes the given string on all remote hosts.
- Jamis
smime.p7s
Description: S/MIME cryptographic signature
