[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Note for people using Subversion within PowerShell on Windows

From: Andy Levy <andy.levy_at_gmail.com>
Date: Tue, 23 Nov 2010 16:21:42 -0500

On Tue, Nov 23, 2010 at 16:08, Ryan Schmidt
<subversion-2010d_at_ryandesign.com> wrote:
> On Nov 23, 2010, at 10:19, Andy Levy wrote:
>> I was just experimenting with a PowerShell v2 session (instead of the
>> basic Command Prompt) and got the following:
>> PS C:\_Projects> svn diff -r {2010-11-22}:HEAD
>> svn: Syntax error in revision argument '-encodedCommand'
>> If the revision range is enclosed in quotes, it works properly:
>> PS C:\_Projects> svn diff -r "{2010-11-22}:HEAD"
>> You can also escape the curly braces with the backtick character.
>> PS C:\_Projects> svn diff -r `{2010-11-22`}:HEAD
>> I believe the issue is specifically with the curly braces {}, as those
>> denote a code block in PowerShell.
>> Using a revision range of 3000:HEAD does not require that the range be
>> enclosed in quotes, but I'm going to try to get in the habit of just
>> quoting the revision range regardless.
>> Command Prompt works either way - quoted or unquoted, doesn't matter.
>> I'm on XP, it's probably an issue on newer versions of Windows as
>> well. Not sure how many folks out there are actually using svn.exe on
>> Windows in PowerShell, but it's in the list archive now in case anyone
>> has a similar issue.
> Yes, some shells require you to escape the curly braces.
> I was hoping at this point to refer you to the page in the book where this is explained, but it appears not to be explained there.
> http://svnbook.red-bean.com/nightly/en/svn.tour.revs.specifiers.html#svn.tour.revs.dates
> Perhaps you could submit feedback to the authors of the book and ask them to include this information? They have their own mailing list.

Issue 107 submitted. http://code.google.com/p/svnbook/issues/detail?id=107

I'd guess most *NIX folks are probably already aware of what
escaping/quoting needs to be done in their shells, but being a
relative newcomer to PowerShell on Windows, this was new to me (though
looking back on it, I should have seen it coming). An extra note in
the book can't hurt.
Received on 2010-11-23 22:22:58 CET

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.