1
.. Taken from http://wiki.bazaar.canonical.com/CasePreservingWorkingTreeUseCases
2
.. FIXME: Probobly needs a bit of restructuring and Rework.
3
.. FIXME: Remove "we" "he" "she" "they" -> Write more like a scientific paper.
5
Case Preserving Working Tree Use Cases
6
======================================
8
This document attempts to describe the desired semantics for Breezy using the
9
bzr format on a Windows file system. Most Windows file systems are "case
10
preserving", in that the original case given for a filename is retained, even
11
though any case can be used to access the file. This is in contrast to some
12
file-systems, used on Windows and elsewhere, that are truly case-insensitve.
15
This document is intended to be in a "psuedo-doctest" format. Lines beginning
16
with '``%``' are entered at a command-prompt, while lines beginning with '``>``'
17
are intended to show that command's output. Where the desired behaviour differs
18
from the current behaviour is marked with lines starting with '``***``'.
20
Before we start you will need a repository to work with:
24
% [make and change into a temp working directory]
27
Windows is a case-preserving file-system. Note that it doesn't matter what case
28
we use when asking for the file - we always get back the exact case the file was
36
> 09/10/2008 01:40 PM 0 Foo
39
> 09/10/2008 01:40 PM 0 Foo
40
% if exist Foo echo Yes
42
% if exist foo echo Yes
45
Bzr should attempt to use the name on the file-system rather than the name
51
*** current behaviour ***
53
*** expected behaviour ***
57
*** current behaviour ***
60
*** expected behaviour ***
64
Supplying the incorrect case to a file already in the inventory should work
65
correctly. Let's add a new file to bzr with the correct case:
73
If Windows lets them see it with a given name:
79
> 09/10/2008 01:48 PM 0 lower
86
*** current behaviour ***
89
*** expected behaviour ***
93
All comments which accept a filename need to handle this situation. Eg, rm:
97
% [make and change into a temp working directory]
104
% bzr ci -m "some changes"
108
*** current behaviour ***
109
> bzr: ERROR: Can't safely remove modified or unknown files:
113
> Use --keep to not delete them, or --force to delete them regardless.
114
*** expected behaviour ***
118
If an external program changes the case of the file underneath us, it must not
130
*** current behaviour ***
135
*** expected behaviour ***
139
And reverting a tree in that state should restore the case of the file:
144
*** current behaviour ***
146
> Conflict adding file Foo. Moved existing file to foo.moved.
147
*** expected behaviour ***
150
But if the user really wants bzr to see the new name, she just does 'bzr mv' as