On Jan 3, 2017, at 1:31 PM, Scott Doctor <[email protected]> wrote: > > I added my binary files. Did not get any warning. Should I get a warning if > fossil detects that a file is binary?
$ mkdir x $ cd x $ f init ../x.fossil $ f open ../x.fossil $ dd if=/dev/random of=x count=1k 1024+0 records in 1024+0 records out 524288 bytes transferred in 0.033915 secs (15458863 bytes/sec) $ f add x ADDED x $ f ci -m 'a binary file' ./x contains binary data. Use --no-warnings or the "binary-glob" setting to disable this warning. Commit anyhow (a=all/y/N)? What does “file my-supposed-binary-file” tell you? (Presuming you’re not doing this on Windows, or you’re on a Windows box that has an implementation of file(1), such as via Cygwin or WSL.) > The files are partial text with a bunch of embedded binary control codes. Fossil only searches the first N bytes of the file to work out if it is text or binary. It doesn’t scan the whole thing. If you want the full details, see looks_like_utf8() in src/lookslike.c. (or …utf16() if you’re on Windows.) > Should I force fossil to recognize a file as being binary No. The only reason Fossil cares about this kind of thing at all is to do various things convenient to the developer. (i.e. Show the file data in Fossil UI, offer CRLF conversions, etc.) From a certain perspective, Fossil treats *all* files as binary, which is why you can have mixed CRLF line endings in a “text” file and Fossil doesn’t get confused. > On a separate topic: Next time, start a new thread, please. They cost nothing, and they keep the conversations organized and searchable. > How do I change a previously added file into an unversioned file? As far as I know, you can’t. You have to decide when you check the file in, using “fossil unversioned add” instead of “fossil add”. I wouldn’t recommend using unversioned files in your case anyway, since it requires a special checkout command to retrieve them. It sounds like you want them to be part of the default checkout, so... > an unversioned file will be replaced by a newer version and the older version > disappears. Correct? Yes. That’s what “unversioned” means. The alternative would be “versioned.” If you think you will ever need to roll back to that prior version, such as for testing an old shipped version of the system to replicate a reported customer problem, then I recommend not using unversioned files. _______________________________________________ fossil-users mailing list [email protected] http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

