I think you might be able to trigger this without the 'rename'.
Just doing:
bzr init test
cd test
touch Foo
bzr add Foo
bzr commit -m "Foo"
bzr add foO
bzr commit -m "foO"
At the end I have:
bzr log --short --verbose:
1 John Arbash Meinel 2007-11-29
Foo
added:
Foo
2 John Arbash Meinel 2007-11-29
foO
added:
foO
and
% bzr status
removed:
foO
But
% bzr commit -m 'test'
Committing revision 3 to ".../test/".
bzr: ERROR: no changes to commit. use --unchanged to commit anyhow
This happens because the "bzr status" code hasn't been unified with the "bzr commit" code. (commit iterates through the recorded files, and does a stat to see if they exist on disk, which shows them as present. 'bzr status' iterates through a listdir to see what files exist while it is iterating through the recorded list, so it has already consumed Foo when it sees foO.)
The other problem, is that I don't know of any way to get the real name of a file. You could use "os.listdir(os.path.dirname(path))" and then search through it for possible names, but you don't know if foO is there because of a rename, or if it is actually a different file.
It would be nice if you could do:
st = os.stat('foo')
and have "st" have a st_name or some other property that gives you the exact name on disk.
I think you might be able to trigger this without the 'rename'.
Just doing:
bzr init test
cd test
touch Foo
bzr add Foo
bzr commit -m "Foo"
bzr add foO
bzr commit -m "foO"
At the end I have:
bzr log --short --verbose:
1 John Arbash Meinel 2007-11-29
Foo
added:
Foo
2 John Arbash Meinel 2007-11-29
foO
added:
foO
and
% bzr status
removed:
foO
But
% bzr commit -m 'test'
Committing revision 3 to ".../test/".
bzr: ERROR: no changes to commit. use --unchanged to commit anyhow
This happens because the "bzr status" code hasn't been unified with the "bzr commit" code. (commit iterates through the recorded files, and does a stat to see if they exist on disk, which shows them as present. 'bzr status' iterates through a listdir to see what files exist while it is iterating through the recorded list, so it has already consumed Foo when it sees foO.)
The other problem, is that I don't know of any way to get the real name of a file. You could use "os.listdir( os.path. dirname( path))" and then search through it for possible names, but you don't know if foO is there because of a rename, or if it is actually a different file.
It would be nice if you could do:
st = os.stat('foo')
and have "st" have a st_name or some other property that gives you the exact name on disk.
Does anyone know if that is possible?