Say that I have the path C:\My\Multi\Component\Path
. Because casing is generally ignored in Windows I could mix and match any casing I please to navigate to this same node in the file system in PowerShell:
1PS> cd C:\My\Multi\Component\Path
2PS> cd C:\my\multi\component\path
3PS> cd C:\My\multi\component\path
4PS> cd C:\my\Multi\Component\PATH
The problem is when I use svn command line tools, for example, svn log .
. This only works if I set the location with line (1) above, i.e. using the exact casing matching the underlying path. If I set the location with 2, 3, or 4, svn balks with, for example:
svn: svn: E155010: The node 'C:\My\multi\component\path' was not found.
I understand that the fact that svn is case-sensitive while Windows is not is causing the issue, and I can live with that. But I want a workaround, to wit: a way to find the underlying, cased-as-originally-created path in PowerShell. I can then send my path through this normalization filter before handing it to svn. Unfortunately, PowerShell refuses to yield the true, underlying path to me. I have examined all the properties of Get-Location, Get-Item, and Get-ChildItem.
Is there a way to get the true path?
svn log $pwd
works correctly in reproduction of your location #2. Yet$pwd
alone returns the improperly-cased path. – alrocsvn log path
rather thancd path; svn log .
? – Michael Sorens