Scott,
Fork capistrano-capistrano and send me a pull request, you can find me on
github as `leehambley`.

- Lee

2009/5/19 Scott Johnson <[email protected]>

>
> I have a couple of patches to perforce.rb to fix the 'cap
> deploy:pending' task, which is pretty horribly broken in Capistrano
> 2.5.5 with :scm :perforce.
>
> Where should I submit these patches? Is there a widely accepted fork
> of Jamis's now-defunct github project?
>
> Here's the patches:
> commit 2e1baafbe19493a85c87cb93b8bdf234ab01f208
> Author: Scott Johnson <[email protected]>
> Date:   Mon May 18 13:00:16 2009 -0700
>
>    Fix typo that caused 'cap deploy:pending' to fail with shell
>    syntax error when using Perforce.
>
> diff --git a/lib/capistrano/recipes/deploy/scm/perforce.rb b/lib/
> capistrano/recipes/deploy/scm/perforce.rb
> index eb3fa11..d0d65a7 100644
> --- a/lib/capistrano/recipes/deploy/scm/perforce.rb
> +++ b/lib/capistrano/recipes/deploy/scm/perforce.rb
> @@ -49,7 +49,7 @@ module Capistrano
>
>         # Returns a "p4 changes" command for the two revisions.
>         def log(from=1, to=head)
> -          scm authentication, :changes, "-s submitted", "//#
> {p4client}/...#{rev_no(from)},#(rev_no(to)}"
> +          scm authentication, :changes, "-s submitted", "//#
> {p4client}/...#{rev_no(from)},#{rev_no(to)}"
>         end
>
>         def query_revision(revision)
> commit 4b618a6a5d9e69dfbb0d436e14fbb001d124ee2c
> Author: Scott Johnson <[email protected]>
> Date:   Mon May 18 13:03:58 2009 -0700
>
>    Implement next_revision for perforce, so that 'cap deploy:pending'
>    does not erroneously show the current revision as pending.
>
> diff --git a/lib/capistrano/recipes/deploy/scm/perforce.rb b/lib/
> capistrano/recipes/deploy/scm/perforce.rb
> index d0d65a7..2e26d19 100644
> --- a/lib/capistrano/recipes/deploy/scm/perforce.rb
> +++ b/lib/capistrano/recipes/deploy/scm/perforce.rb
> @@ -58,6 +58,11 @@ module Capistrano
>           yield(command)[/Change (\d+) on/, 1]
>         end
>
> +        # Increments the given revision number and returns it.
> +        def next_revision(revision)
> +          revision.to_i + 1
> +        end
> +
>         # Determines what the response should be for a particular bit
> of text
>         # from the SCM. Password prompts, connection requests,
> passphrases,
>         # etc. are handled here.
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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