You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Sebastian Andersson <bo...@gmail.com> on 2012/11/12 10:48:00 UTC
Case sensitivity bug in windows with powershell.
I searched the reports database but could not find this error reported.
Use a powershell shell and stand in the working copy:
PS c:\temp\WC> svn mkdir APA
PS c:\temp\WC> Set-LocationEx apa
PS c:\temp\WC\apa>svn mkdir banan
results in:
svn: E150000: Can't find parent directory's node while trying to add
'R:\products\PTI\ADAPTERS\SIRI\apa\banan'
svn: E155010: The node 'R:\products\PTI\ADAPTERS\SIRI\apa' was not found.
I don't really know how powershell/windows works when it comes to the
current directory, but Get-Location will say you are in "apa" after
the Set-LocationEx command, instead of the APA directory.
This confuses users not familiar with other operating systems.
/Sebastian
Re: Case sensitivity bug in windows with powershell.
Posted by Ryan Schmidt <su...@ryandesign.com>.
On Nov 12, 2012, at 07:03, Sebastian Andersson <bo...@gmail.com> wrote:
> Powershell contributes to this problem a bit more; in powershell you
> can tab-expand the path names. If you just tab-expand one directory at
> a time, it changes to the correct case of it. But if you write two
> directories at once (ie apa\Banana), only the second directory gets
> changed into the correct case. With a longer path and a single letter
> with the incorrect case, then it is of course a lot less obvious what
> is wrong.
This also describes the behavior of a normal Bash shell on OS X with a normal HFS+ case-insensitive filesystem: tab completion corrects the case of the last typed component only (assuming you've enabled case-insensitive tab completion in the shell, which I have by writing "set completion-ignore-case on" in my ~/.inputrc).
However, this particular case difference doesn't seem to cause problems for Subversion on OS X:
tmp $ svn --version|head -n 2
svn, version 1.7.7 (r1393599)
compiled Nov 9 2012, 20:33:44
tmp $ svnadmin create repo
tmp $ svn co file://`pwd`/repo wc
Checked out revision 0.
tmp $ cd wc
wc $ svn mkdir APA
A APA
wc $ cd apa
apa $ svn mkdir banan
A banan
apa $ ..
wc $ svn ci -m x
Adding APA
Adding APA/banan
Committed revision 1.
wc $
There are of course several other case difference problems for Subversion on OS X.
Re: Case sensitivity bug in windows with powershell.
Posted by Johan Corveleyn <jc...@gmail.com>.
On Mon, Nov 12, 2012 at 2:40 PM, Stefan Sperling <st...@elego.de> wrote:
> On Mon, Nov 12, 2012 at 02:26:05PM +0100, Johan Corveleyn wrote:
>> But anyway, we probably can't do anything about that Powershell
>> behaviour, and perhaps it's possible to work around that from within
>> subversion. So please go ahead and file an issue for this.
>
> How would you work around it? Before filing an issue, we should
> have a vague idea about a workable solution. Or I suppose we could
> file an issue about finding a workable solution :)
Heh :). I admit I don't have a workable solution in mind, but I'm
guessing it's possible (but I'm absolutely not the authority in that
area, and I don't have the source code at hand here, so my guess might
not be worth much :)).
Regardless, I have absolutely no problems with issues that are
impossible to fix either. They are still legitimate issues and we
might as well just track them, even if they will later be closed with
a "won't fix" or something like that (with an explanation of why it's
not possible). Then at least the information is out there.
--
Johan
Re: Case sensitivity bug in windows with powershell.
Posted by Stefan Sperling <st...@elego.de>.
On Mon, Nov 12, 2012 at 02:26:05PM +0100, Johan Corveleyn wrote:
> But anyway, we probably can't do anything about that Powershell
> behaviour, and perhaps it's possible to work around that from within
> subversion. So please go ahead and file an issue for this.
How would you work around it? Before filing an issue, we should
have a vague idea about a workable solution. Or I suppose we could
file an issue about finding a workable solution :)
Re: Case sensitivity bug in windows with powershell.
Posted by Johan Corveleyn <jc...@gmail.com>.
On Mon, Nov 12, 2012 at 2:03 PM, Sebastian Andersson <bo...@gmail.com> wrote:
> On Mon, Nov 12, 2012 at 1:13 PM, Johan Corveleyn <jc...@gmail.com> wrote:
>> Hm, I don't see this problem with "cd" in cmd.exe.
>
> No, the problem is only with powershell, but I do believe powershell
> does what it is designed to do in this case. It uses a unified
> location system for more things than just filesystems (you can cd into
> the registry, LDAP etc) and some of them are case sensitive so it
> preserves the user's typed string. The problem is also with the
> Set-Location cmdlet, the old, default "cd" command in powershell.
>
> Powershell contributes to this problem a bit more; in powershell you
> can tab-expand the path names. If you just tab-expand one directory at
> a time, it changes to the correct case of it. But if you write two
> directories at once (ie apa\Banana), only the second directory gets
> changed into the correct case. With a longer path and a single letter
> with the incorrect case, then it is of course a lot less obvious what
> is wrong.
>
>
> From a usability point of view, this should be fixed in subversion as
> windows (and most OSX users) expect that the file names should be case
> insensitive and other uses of subversion work correctly when the wrong
> case is used, ie:
> PS C:\temp\WC> svn mkdir APA
> A APA
> PS C:\temp\WC> svn mkdir apa\banan
> A APA\banan
>
> At the very least the error message should suggest a fix.
OK, I see.
I still find the behavior of Powershell pretty strange here. You say
that it "preserves the user's typed string", but I do not agree with
that: it ignores the casing that's present on disk, and that should be
the casing that's preserved and shown everywhere. At least that's my
opinion. If it would *really* preserve the user's typed string, then
it should say "apa does not exist" (as with a case-sensitive
filesystem). If Set-Location(Ex) would be consistent with all other
Windows tools, and with the behavior you actually want from
subversion, then it would say "OK, I'm case-insensitive here, the user
asks for apa, but there is APA on disk, so the user means APA, so I'll
act on APA -> c:\temp\WC\APA".
But anyway, we probably can't do anything about that Powershell
behaviour, and perhaps it's possible to work around that from within
subversion. So please go ahead and file an issue for this.
--
Johan
Re: Case sensitivity bug in windows with powershell.
Posted by Sebastian Andersson <bo...@gmail.com>.
On Mon, Nov 12, 2012 at 1:13 PM, Johan Corveleyn <jc...@gmail.com> wrote:
> Hm, I don't see this problem with "cd" in cmd.exe.
No, the problem is only with powershell, but I do believe powershell
does what it is designed to do in this case. It uses a unified
location system for more things than just filesystems (you can cd into
the registry, LDAP etc) and some of them are case sensitive so it
preserves the user's typed string. The problem is also with the
Set-Location cmdlet, the old, default "cd" command in powershell.
Powershell contributes to this problem a bit more; in powershell you
can tab-expand the path names. If you just tab-expand one directory at
a time, it changes to the correct case of it. But if you write two
directories at once (ie apa\Banana), only the second directory gets
changed into the correct case. With a longer path and a single letter
with the incorrect case, then it is of course a lot less obvious what
is wrong.
>From a usability point of view, this should be fixed in subversion as
windows (and most OSX users) expect that the file names should be case
insensitive and other uses of subversion work correctly when the wrong
case is used, ie:
PS C:\temp\WC> svn mkdir APA
A APA
PS C:\temp\WC> svn mkdir apa\banan
A APA\banan
At the very least the error message should suggest a fix.
/Sebastian
--
One laptop per child project: http://laptop.org/
Re: Case sensitivity bug in windows with powershell.
Posted by Johan Corveleyn <jc...@gmail.com>.
On Mon, Nov 12, 2012 at 11:54 AM, Sebastian Andersson <bo...@gmail.com> wrote:
> On Mon, Nov 12, 2012 at 11:44 AM, Johan Corveleyn <jc...@gmail.com> wrote:
>> For those that are not too familiar with powershell (like me): what
>> does Set-LocationEx do?
>>
>> Does it do a rename of APA to apa (like the more usual Windows command
>> 'move APA apa' does)?
>
> Sorry about that, I should have been more clear. No, it is "cd" in
> almost every other shell (and usually in powershell too via aliases).
Hm, I don't see this problem with "cd" in cmd.exe. The cd command does
automatically use on the correct casing of the directory:
[[[
C:\Temp\svntest>svn --version -q
1.7.7-SlikSvn-1.7.7-X64
C:\Temp\svntest>svnadmin create repos
C:\Temp\svntest>svn co file:///C:/Temp/svntest/repos wc
Checked out revision 0.
C:\Temp\svntest>cd wc
C:\Temp\svntest\wc>svn mkdir APA
A APA
C:\Temp\svntest\wc>cd apa
C:\Temp\svntest\wc\APA>svn mkdir banan
A banan
]]]
You see that the last prompt correctly shows APA, the exact casing
like it is on disk, even though I asked Windows to cd into apa. That
looks like the correct behavior of Windows (case-insensitive, but
case-preserving (so showing/using the known casing wherever it is
used)).
So IMO the problem is with the Set-LocationEx call that you do (or the
Windows implementation thereof). It seems to me that Windows should be
consistent and cd you into the correctly cased directory (whichever
case you ask for). Alternatively, maybe Set-LocationEx is documented
as showing this rather strange behavior (in that case, you should not
use it, or you should make sure yourself that the case you ask for is
correct before you call Set-LocationEx).
--
Johan
Re: Case sensitivity bug in windows with powershell.
Posted by Sebastian Andersson <bo...@gmail.com>.
On Mon, Nov 12, 2012 at 11:44 AM, Johan Corveleyn <jc...@gmail.com> wrote:
> For those that are not too familiar with powershell (like me): what
> does Set-LocationEx do?
>
> Does it do a rename of APA to apa (like the more usual Windows command
> 'move APA apa' does)?
Sorry about that, I should have been more clear. No, it is "cd" in
almost every other shell (and usually in powershell too via aliases).
/Sebastian
--
One laptop per child project: http://laptop.org/
Re: Case sensitivity bug in windows with powershell.
Posted by Johan Corveleyn <jc...@gmail.com>.
On Mon, Nov 12, 2012 at 10:48 AM, Sebastian Andersson <bo...@gmail.com> wrote:
> I searched the reports database but could not find this error reported.
>
> Use a powershell shell and stand in the working copy:
> PS c:\temp\WC> svn mkdir APA
> PS c:\temp\WC> Set-LocationEx apa
> PS c:\temp\WC\apa>svn mkdir banan
> results in:
> svn: E150000: Can't find parent directory's node while trying to add
> 'R:\products\PTI\ADAPTERS\SIRI\apa\banan'
> svn: E155010: The node 'R:\products\PTI\ADAPTERS\SIRI\apa' was not found.
>
> I don't really know how powershell/windows works when it comes to the
> current directory, but Get-Location will say you are in "apa" after
> the Set-LocationEx command, instead of the APA directory.
>
>
> This confuses users not familiar with other operating systems.
For those that are not too familiar with powershell (like me): what
does Set-LocationEx do?
Does it do a rename of APA to apa (like the more usual Windows command
'move APA apa' does)?
If so, then what you're seeing is normal. You're renaming the
directory on the filesystem, outside of SVN. In SVN's metadata the
directory is still known as APA, while on disk it's apa. SVN will then
consider APA "missing" and apa "unversioned".
You should do 'svn move APA apa' instead, if you want the move to be
consistent between the filesystem and SVN's metadata.
--
Johan