win32 bzr is confused by filename case changes
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| Bazaar |
High
|
Unassigned | ||
| Breezy |
High
|
Jelmer Vernooij |
Bug Description
bzr 0.14.0dev0 has some problems handling filename case changes on win32:
C:\
test.txt
C:\
C:\
unknown:
TEST.TXT
At this point I would have expected to see:
removed:
test.txt
unknown:
TEST.TXT
(bzr 0.13 appears to get this part right.)
I could try to resolve things in a naive fashion:
C:\
added TEST.TXT
C:\
added:
TEST.TXT
C:\
TEST.TXT
test.txt
If the tree gets committed in this state, then a subsequent "bzr branch branchname" will fail with a "File exists" error.
(bzr-0.13 will also let you screw up the inventory in this fashion, even though "bzr st" suggests that "test.txt"
is removed.)
A workaround is to explicitly "bzr remove" the original filename.
Alexander Belchenko (bialix) wrote : | #1 |
Changed in bzr: | |
importance: | Undecided → Low |
status: | Unconfirmed → Confirmed |
John A Meinel (jameinel) wrote : | #2 |
This might actually be better with dirstate, because we use "os.listdir()" to give us the list of files, rather than relying on os.lstat(fname) to tell us if the file does or doesn't exist.
But it probably doesn't help bug #77740
Alexander Belchenko (bialix) wrote : | #3 |
in some situation bzr tends to do wrong thing. for proper win32 support bzr should understand case-insensitive filesystem well.
Changed in bzr: | |
importance: | Low → High |
CodyC (cody-casterline) wrote : | #4 |
Still exists with 1.5. See below:
C:\sample>bzr init .
C:\sample>bzr add .
added test.txt
C:\sample>bzr commit . -m "initial commit"
Committing to: C:/sample/
added test.txt
Committed revision 1.
C:\sample>bzr add TEST.TXT
added TEST.TXT
C:\sample>bzr ls -v
V test.txt
C:\sample>bzr commit . -m "huh?"
Committing to: C:/sample/
added TEST.TXT
Committed revision 2.
C:\sample>bzr ls -v
V test.txt
C:\sample>bzr log -v
-------
revno: 2
committer: Administrator <Administrator@
branch nick: sample
timestamp: Thu 2008-07-03 01:25:17 +0100
message:
huh?
added:
TEST.TXT
-------
revno: 1
committer: Administrator <Administrator@
branch nick: sample
timestamp: Thu 2008-07-03 01:24:37 +0100
message:
initial commit
added:
test.txt
C:\sample>bzr rm test.txt
deleted test.txt
C:\sample>bzr commit
Committing to: C:/sample/
missing TEST.TXT
deleted TEST.TXT
deleted test.txt
Committed revision 3.
C:\sample>bzr ls -v
C:\sample>bzr version
Bazaar (bzr) 1.5
Python interpreter: C:\Program Files\Bazaar\
Python standard library: C:\Program Files\Bazaar\
bzrlib: C:\Program Files\Bazaar\
Bazaar configuration: C:\Documents and Settings\
\bazaar\2.0
Bazaar log file: C:\Documents and Settings\
Copyright 2005, 2006, 2007, 2008 Canonical Ltd.
http://
bzr comes with ABSOLUTELY NO WARRANTY. bzr is free software, and
you may use, modify and redistribute it under the terms of the GNU
General Public License version 2 or later.
C:\sample>
displayname (displayname) wrote : | #5 |
Sorry to post this twice, but I think it really belongs here. This is another facet of the same problem:
c:\temp\
c:\temp\
c:\temp\BzrBug>cd Branch1
c:\temp\
c:\temp\
c:\temp\
c:\temp\
c:\temp\
added TEST
added TEST/foo
c:\temp\
c:\temp\
c:\temp\
added test
added test/bar
c:\temp\
added:
TEST/
TEST/foo
unknown:
TEST/bar
#### Above is the first sign that something is wrong.
c:\temp\
Committing to: C:/temp/
added TEST
added test
added TEST/foo
added test/bar
Committed revision 1.
#### Notice that both TEST/foo and test/bar are added. However the real problem happens when you try to pull:
c:\temp\
c:\temp\BzrBug>cd Branch2
c:\temp\
c:\temp\
+N TEST/
+N TEST/foo
+N test.moved/
+N test.moved/bar
Conflict adding file TEST. Moved existing file to test.moved.
1 conflicts encountered.
Now on revision 1.
#### Changes from Branch1 cannot be properly pulled to Branch2 because bzr renames the directory during the pull.
This is a problem for me right now since I added many files with the wrong case a few days ago and now cannot pull my changes from my desktop to my laptop. A fix (or even just a workaround) would be greatly appreciated.
Thanks!
Gordon Tyler (doxxx) wrote : | #6 |
Comment #5 appears to be fixed in Bazaar 2.0.0:
<<<
C:\Temp\bzr>bzr init .
Created a standalone tree (format: 2a)
C:\Temp\bzr>mkdir TEST
C:\Temp\bzr>cd TEST
C:\Temp\
C:\Temp\
adding TEST
adding TEST/foo
C:\Temp\
C:\Temp\bzr\TEST>cd ..
C:\Temp\bzr>bzr add test\bar
adding TEST/bar
C:\Temp\bzr>bzr st
added:
TEST/
TEST/bar
TEST/foo
>>>
Although the original bug still seems to exist in a slightly different form:
<<<
C:\Temp\bzr>bzr init .
Created a standalone tree (format: 2a)
C:\Temp\bzr>echo foo > foo
C:\Temp\bzr>bzr add
adding foo
C:\Temp\bzr>bzr commit -m 1
Committing to: C:/Temp/bzr/
added foo
Committed revision 1.
C:\Temp\bzr>ren foo FOO
C:\Temp\bzr>bzr st
removed:
foo
unknown:
FOO
C:\Temp\bzr>bzr add FOO
C:\Temp\bzr>bzr st
removed:
foo
unknown:
FOO
>>>
Attempting to remove 'foo' and add 'FOO' results in the following:
<<<
C:\Temp\bzr>bzr remove foo
bzr: ERROR: Can't safely remove modified or unknown files:
unknown:
FOO
Use --keep to not delete them, or --force to delete them regardless.
C:\Temp\bzr>bzr remove foo --force
deleted FOO
C:\Temp\bzr>bzr add FOO
bzr: ERROR: No such file: u'C:/Temp/bzr/FOO'
>>>
However, after reverting to revision 1, the following works:
<<<
C:\Temp\bzr>bzr revert
N foo
C:\Temp\bzr>ren foo FOO
C:\Temp\bzr>bzr st
removed:
foo
unknown:
FOO
C:\Temp\bzr>bzr mv foo FOO
foo => FOO
C:\Temp\bzr>bzr st
renamed:
foo => FOO
C:\Temp\bzr>
>>>
Changed in bzr: | |
assignee: | nobody → Adriana Miyazaki de Moura (miya) |
assignee: | Adriana Miyazaki de Moura (miya) → nobody |
Aleksandr Smyshliaev (a1s) wrote : | #7 |
This bug also affects "bzr diff" command.
I have attached a patch against current sources that fixes the issue.
Changed in bzr: | |
status: | Confirmed → Incomplete |
Changed in bzr: | |
status: | Incomplete → Confirmed |
tags: | added: check-for-breezy |
tags: | removed: check-for-breezy |
tags: | added: check-for-breezy |
tags: | removed: check-for-breezy |
Changed in brz: | |
status: | New → Triaged |
importance: | Undecided → High |
Changed in brz: | |
assignee: | nobody → Jelmer Vernooij (jelmer) |
Changed in bzr: | |
status: | Confirmed → New |
assignee: | nobody → Stewart J Solomon (highaboveus2) |
Changed in bzr: | |
status: | New → Confirmed |
assignee: | Stewart J Solomon (highaboveus2) → nobody |
this bug related to #77740: bzr lacks case insensitive filesystem support.