简体   繁体   中英

How to map path to correct casing of the underlying location for svn use

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, ie 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进行了测试,并且在所有情况下都会产生预期的结果。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM