Binary file support
Alexander Belchenko
bialix at ukr.net
Fri Oct 14 10:54:07 BST 2005
John Arbash Meinel пишет:
> I know Aaron mentioned a patch in the past, to add a binary flag to
> files, so that we can more properly handle diff and merge.
What about different text files?
I mean that text files may use different line endings on different
platforms: LF, CRLF, CR, other?
At now bzr save in the repository actual line endings from edited file.
I often faced with problem, when after patching some of bzrlib/* python
files on Windows all line endings was changed to CRLF by patch utility
and following diff show me that all file content is deleted and then
added with patch changes. So I need convert patched files to LF line
endigns manually. It's not difficult, but sometimes I forget about this.
I think it will be useful if inventory will save for each text file
additional metadata about used line endings:
* Actual (the same as in file on disk, used in current bzr implementation)
* LF
* CRLF
* CR
* other?
In this case when edited file pass through diff command then difference
in line endings can be ignored if metadata say that file stored with LF
line endings. When commit this file it will be stored in repository with
LF only lineendings regardless of actual state on disk (and may be
change file on disk for sync purposes).
May be this idea is too stupid, but I every day face with different line
endings during multiplatform development.
Alexander
More information about the bazaar
mailing list