Browse files

changed single to double quotes for Windows

When getting the current revision from Mercurial on Windows the
following command:

  "hg log -r tip --template '{node|short}'"

fails due to the single quotes not being escaped. To make this
command run properly on Windows, I modified it to the following:

  "hg log -r tip --template \"{node|short}\""

This change seems to be safe on Windows 7, Mac OS X 10.7.2, and
Ubuntu 11.10.
  • Loading branch information...
1 parent a66ea8d commit 716f8f9523db3e46a6bc2b85db375b9d57608f40 Matthew J. Morrison committed Jan 11, 2012
Showing with 2 additions and 2 deletions.
  1. +1 −1 lib/capistrano/recipes/deploy/scm/mercurial.rb
  2. +1 −1 test/deploy/scm/mercurial_test.rb
@@ -59,7 +59,7 @@ def query_revision(changeset)
cmd = scm :log,
"-r #{changeset}",
- "--template '{node|short}'"
+ '--template "{node|short}"'
yield cmd
@@ -39,7 +39,7 @@ def test_log
def test_query_revision
- assert_equal "hg log -r 8a8e00b8f11b --template '{node|short}'", @source.query_revision('8a8e00b8f11b') { |o| o }
+ assert_equal "hg log -r 8a8e00b8f11b --template \"{node|short}\"", @source.query_revision('8a8e00b8f11b') { |o| o }
def test_username_should_be_backwards_compatible

0 comments on commit 716f8f9

Please sign in to comment.