[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: Ryan Schmidt <subversion-2010d_at_ryandesign.com>
Date: Tue, 23 Nov 2010 15:08:49 -0600

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.
Received on 2010-11-23 22:09:32 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.