[fossil-users] diff restricted to a dir
Hello, I noticed 'fossil diff .' or 'fossil diff *' in a subdir of the working tree does not work (i.e. produces an error from fossil). Apart from using shell magic, is there a way to restrict 'diff' to use a single dir (e.g. the current one)? Not a big deal, but perhaps there's a short answer. Michai ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
[fossil-users] diff restricted to a dir
> Date: Tue, 8 Jul 2014 16:03:27 +0200 > From: Michai Ramakers > To: "Fossil SCM user's discussion" > Subject: [fossil-users] diff restricted to a dir > Message-ID: > > Content-Type: text/plain; charset=UTF-8 > > Hello, > > I noticed 'fossil diff .' or 'fossil diff *' in a subdir of the > working tree does not work (i.e. produces an error from fossil). > > Apart from using shell magic, is there a way to restrict 'diff' to use > a single dir (e.g. the current one)? > > Not a big deal, but perhaps there's a short answer. > > Michai > > try fossil ls / | fossil diff that worked for me. Basically pipe the output of what fossil knows about the directory to the differ Tomek ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
Re: [fossil-users] diff restricted to a dir
On 8 July 2014 18:09, Tomek Kott wrote: > >> Date: Tue, 8 Jul 2014 16:03:27 +0200 >> From: Michai Ramakers >> To: "Fossil SCM user's discussion" >> Subject: [fossil-users] diff restricted to a dir >> Message-ID: >> >> Content-Type: text/plain; charset=UTF-8 >> >> I noticed 'fossil diff .' or 'fossil diff *' in a subdir of the >> working tree does not work (i.e. produces an error from fossil). >> >> Apart from using shell magic, is there a way to restrict 'diff' to use >> a single dir (e.g. the current one)? > > try > > fossil ls / | fossil diff > > that worked for me. > > Basically pipe the output of what fossil knows about the directory to the > differ Thanks, but are you sure what you're seeing is not by accident..? I don't see the 'diff' documentation specifying 'read list of files on stdin' or anything, and indeed, it doesn't seem to work for me when piping output from 'fossil ls' or anything else (e.g. 'echo bla') to 'fossil diff'; it seems to ignore stdin. Michai ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
Re: [fossil-users] diff restricted to a dir
On Tue, Jul 8, 2014 at 7:01 PM, Michai Ramakers wrote: > On 8 July 2014 18:09, Tomek Kott wrote:> > > fossil ls / | fossil diff > > > > that worked for me. > > > > Basically pipe the output of what fossil knows about the directory to the > > differ > > Thanks, but are you sure what you're seeing is not by accident..? I > don't see the 'diff' documentation specifying 'read list of files on > stdin' or anything, and indeed, it doesn't seem to work for me when > piping output from 'fossil ls' or anything else (e.g. 'echo bla') to > 'fossil diff'; it seems to ignore stdin. > i was wondering the same, but you can get the same effect with: fossil diff $(fossil ls DIR/) or (depending on the shell resp. your portability requirements): fossil diff `fossil ls DIR/` -- - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal "Freedom is sloppy. But since tyranny's the only guaranteed byproduct of those who insist on a perfect world, freedom will have to do." -- Bigby Wolf ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
Re: [fossil-users] diff restricted to a dir
On 8 July 2014 20:22, Stephan Beal wrote: > On Tue, Jul 8, 2014 at 7:01 PM, Michai Ramakers > wrote: >> >> On 8 July 2014 18:09, Tomek Kott wrote:> >> > fossil ls / | fossil diff >> > >> > that worked for me. >> > >> > Basically pipe the output of what fossil knows about the directory to >> > the >> > differ >> >> Thanks, but are you sure what you're seeing is not by accident..? I >> don't see the 'diff' documentation specifying 'read list of files on >> stdin' or anything, and indeed, it doesn't seem to work for me when >> piping output from 'fossil ls' or anything else (e.g. 'echo bla') to >> 'fossil diff'; it seems to ignore stdin. > > i was wondering the same, but you can get the same effect with: > > fossil diff $(fossil ls DIR/) > > or (depending on the shell resp. your portability requirements): > > fossil diff `fossil ls DIR/` right, that works, ok. (Not on windows, but then again, since nobody asked before, I am guessing nobody really uses diff-in-one-dir-only a lot.) Michai ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
[fossil-users] File contains invalid UTF-8, but is not UTF-8.
Hello, I have some Tcl scripts (for IRC) that previously had no problems when I committed. They don't have UTF-8 characters at all, but when I try to commit them I get the warning: ./test.tcl contains invalid UTF-8. Use --no-warnings or the "encoding-glob" setting to disable this warning. Prior to [0cb00c0b8f4e5b03] I was able to commit these without errors/warnings and without encoding-glob settings. I'm not sure why it thinks they have UTF-8 characters (or invalid ones at that). They are just ASCII with a few non-printable characters (0x03 primarily) for IRC colors and one è (0xe8) character. If I remove the the è (0xe8) character I can commit. I didn't think 0xe8 was UTF-8, but maybe I'm mistaken? Thanks, Andy -- TAI64 timestamp: 400053bc3cec ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
Re: [fossil-users] File contains invalid UTF-8, but is not UTF-8.
2014-07-08 20:47 GMT+02:00 Andy Bradford : > Hello, > > I have some Tcl scripts (for IRC) that previously had no problems when I > committed. They don't have UTF-8 characters at all, but when I try to > commit them I get the warning: > > ./test.tcl contains invalid UTF-8. Use --no-warnings or the "encoding-glob" > setting to disable this warning. If you don't want this warning, just set 'encoding-glob' to '*'. But did you ever view this file in the fossil UI? Did the è really look like è there? The warning is meant to warn you that Tcl scripts containing an 0xe8 byte are not portable, it depends on the encoding which character it really is. Better replace that by \0xe8, that will make your script portable, working identical no matter what Tcl's system encoding is set to. > I didn't think 0xe8 was UTF-8, but maybe I'm mistaken? In the fossil UI, all files are displayed assuming the encoding is UTF-8. Invalid bytes are displayed in the browser as the replacement character. If you want that, that's OK, just answer 'y' to the question. More likely is that people are not aware that such characters can cause unexpected problems. Hope this helps. Regards, Jan Nijtmans ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
Re: [fossil-users] File contains invalid UTF-8, but is not UTF-8.
On Tue, Jul 8, 2014 at 8:47 PM, Andy Bradford wrote: > If I remove the the è (0xe8) character I can commit. > > I didn't think 0xe8 was UTF-8, but maybe I'm mistaken? > No characters between 128 and 255 are valid UTF-8, to avoid confusion with the many encodings which use that range. -- - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal "Freedom is sloppy. But since tyranny's the only guaranteed byproduct of those who insist on a perfect world, freedom will have to do." -- Bigby Wolf ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
Re: [fossil-users] diff restricted to a dir
On Tue, Jul 8, 2014 at 8:28 PM, Michai Ramakers wrote: > > fossil diff $(fossil ls DIR/) > > right, that works, ok. (Not on windows, but then again, since nobody > asked before, I am guessing nobody really uses diff-in-one-dir-only a > lot.) > Had never occurred to me until today, and i still haven't tried it myself ;). The $(...) is just a reformulation of Tomek's idea, but i wouldn't have thought of it had he not given his example. -- - stephan beal http://wanderinghorse.net/home/stephan/ http://gplus.to/sgbeal "Freedom is sloppy. But since tyranny's the only guaranteed byproduct of those who insist on a perfect world, freedom will have to do." -- Bigby Wolf ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
Re: [fossil-users] diff restricted to a dir
> > Message: 8 > Date: Tue, 8 Jul 2014 21:40:22 +0200 > From: Stephan Beal > To: "Fossil SCM user's discussion" > Subject: Re: [fossil-users] diff restricted to a dir > Message-ID: > > Content-Type: text/plain; charset="utf-8" > > On Tue, Jul 8, 2014 at 8:28 PM, Michai Ramakers > wrote: > > > > fossil diff $(fossil ls DIR/) > > > > right, that works, ok. (Not on windows, but then again, since nobody > > asked before, I am guessing nobody really uses diff-in-one-dir-only a > > lot.) > > > > Had never occurred to me until today, and i still haven't tried it myself > ;). The $(...) is just a reformulation of Tomek's idea, but i wouldn't > have thought of it had he not given his example. > > -- > - stephan beal > http://wanderinghorse.net/home/stephan/ > http://gplus.to/sgbeal > "Freedom is sloppy. But since tyranny's the only guaranteed byproduct of > those who insist on a perfect world, freedom will have to do." -- Bigby Wolf > -- next part -- FWIW, "fossil ls | fossil diff" works for me both on windows with powershell and on ubuntu with bash (?). What errors are you seeing Michai? You might have found a bug (whether in the shell or fossil I don't know :))? Tomek PS. I only get digests, so responses will be delayed. ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
Re: [fossil-users] File contains invalid UTF-8, but is not UTF-8.
Thus said Jan Nijtmans on Tue, 08 Jul 2014 21:35:07 +0200: > If you don't want this warning, just set 'encoding-glob' to '*'. I might actually want encoding warnings though... > But did you ever view this file in the fossil UI? > Did the è really look like è there? I did not, however, if I put the same file in any web server and serve it up it displays correctly, probably because my browser figured out to use ISO-8859-1, or the server defaulted to it. If I try to view it with Fossil UI it refuses and instead says ``10062 bytes of binary data.'' I suppose this is largely true---all data is binary. :-) It would be nice if there were a button that said, ``display the bytes anyway.'' If I annotate the file it puts a different character there than was included in the .tcl script. If I then change my browser to ISO-8859-1 it displays fine. Also, I notice that you converted (or your email client did) the è from my email to è which are not the same characters (at least not as far as the bytes are concerned). How did it manage to convert è to è? > Better replace that by \0xe8, that will make your script portable, > working identical no matter what Tcl's system encoding is set to. That's a good suggestion for fixing the Tcl script, but I'm still not sure why Fossil thinks that è is UTF-8. I thought it was extended ASCII. > > I didn't think 0xe8 was UTF-8, but maybe I'm mistaken? > > In the fossil UI, all files are displayed assuming the encoding is > UTF-8. That explains the strange character displayed in the browser. If I switch my browser to ISO-8859-1 it displays fine. > More likely is that people are not aware that such characters can > cause unexpected problems. The only thing unexpected has been the warning from Fossil for a file that previously had no warnings. :-) Sounds like my options are either to answer Yes, or update the Tcl file that I have stored in a Fossil repository to use \xe8. Thanks, Andy -- TAI64 timestamp: 400053bc6507 ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
Re: [fossil-users] File contains invalid UTF-8, but is not UTF-8.
Thus said Stephan Beal on Tue, 08 Jul 2014 21:37:50 +0200: > No characters between 128 and 255 are valid UTF-8, to avoid confusion > with the many encodings which use that range. If no characters between 128 and 255 are valid UTF-8, and they can never be valid UTF-8 characters, and are used by many encodings, why doesn't Fossil simply ignore them when they are committed? I guess I'm confused why they are being treated specially as to warrant either a setting or a prompt to continue. Thanks, Andy -- TAI64 timestamp: 400053bc6637 ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
Re: [fossil-users] File contains invalid UTF-8, but is not UTF-8.
On Tue, Jul 8, 2014 at 3:38 PM, Andy Bradford wrote: > That's a good suggestion for fixing the Tcl script, but I'm still not > sure why Fossil thinks that è is UTF-8. I thought it was extended ASCII. > > > > I didn't think 0xe8 was UTF-8, but maybe I'm mistaken? > > > > In the fossil UI, all files are displayed assuming the encoding is > > UTF-8. > > That explains the strange character displayed in the browser. If I > switch my browser to ISO-8859-1 it displays fine. > > > More likely is that people are not aware that such characters can > > cause unexpected problems. > > The only thing unexpected has been the warning from Fossil for a file > that previously had no warnings. :-) > > Sounds like my options are either to answer Yes, or update the Tcl file > that I have stored in a Fossil repository to use \xe8. > UTF-8 characters are encoded as a series of strictly formatted bytes, from 1 to 4 bytes in length. The bit patterns of the bytes control whether a stream is considered valid UTF-8 or not. For UTF-8 the 0xE8 byte must be followed by two bytes of the form 0b10xx. The warning you are seeing is that the stream is invalid UTF-8. 0xE8 byte could be an "extended ASCII" character from one of the ISO-8859-X code pages. Or it could be real binary data that just happens to mostly have ASCII text in it. I think the best idea is to encode these "special" characters as escaped sequences whenever possible. -- Scott Robison ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
Re: [fossil-users] File contains invalid UTF-8, but is not UTF-8.
Interesting question/option, but i have no answer. Something to possibly consider? (sent from a mobile device - please excuse brevity, typos, and top-posting) - stephan beal http://wanderinghorse.net On Jul 8, 2014 11:43 PM, "Andy Bradford" wrote: > Thus said Stephan Beal on Tue, 08 Jul 2014 21:37:50 +0200: > > > No characters between 128 and 255 are valid UTF-8, to avoid confusion > > with the many encodings which use that range. > > If no characters between 128 and 255 are valid UTF-8, and they can never > be valid UTF-8 characters, and are used by many encodings, why doesn't > Fossil simply ignore them when they are committed? I guess I'm confused > why they are being treated specially as to warrant either a setting or a > prompt to continue. > > Thanks, > > Andy > -- > TAI64 timestamp: 400053bc6637 > ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
Re: [fossil-users] File contains invalid UTF-8, but is not UTF-8.
Thus said Scott Robison on Tue, 08 Jul 2014 15:48:05 -0600: > The warning you are seeing is that the stream is invalid UTF-8. 0xE8 > byte could be an "extended ASCII" character from one of the ISO-8859-X > code pages. Or it could be real binary data that just happens to > mostly have ASCII text in it. Until today, I didn't fully realize that Fossil treated all files as UTF-8 streams. Now it is being enforced and that will reveal some files that have extended ASCII in them and the user will have to choose to either deal with the prompt each time they modify the file, consider altering the glob to ignore encodings or change the character if possible. It's starting to sink in though. Thanks for the explanation. Andy -- TAI64 timestamp: 400053bc6971 ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
Re: [fossil-users] File contains invalid UTF-8, but is not UTF-8.
Andy, > If no characters between 128 and 255 are valid UTF-8, and they can > never be valid UTF-8 characters, and are used by many encodings, > why doesn't Fossil simply ignore them when they are committed? I think Stephan said it poorly. A solitary byte in that range is never valid UTF-8, but UTF-8 represents all code points higher than 127 as a sequence of bytes in the 128 to 255 range. Those byte sequences have a structure, so it is possible to tell if a string of bytes in that range represents a valid UTF-8 sequence. -- Shal -- Shal Farley s...@cheshireeng.com Cheshire Engineering Corporation http://www.CheshireEng.com 120 West Olive Avenue+1 626 303 1602 Monrovia, CA 91016 FAX +1 626 303 1590 ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
Re: [fossil-users] File contains invalid UTF-8, but is not UTF-8.
On Tue, Jul 8, 2014 at 3:50 PM, Stephan Beal wrote: > Interesting question/option, but i have no answer. Something to possibly > consider? > > (sent from a mobile device - please excuse brevity, typos, and > top-posting) > - stephan beal > http://wanderinghorse.net > On Jul 8, 2014 11:43 PM, "Andy Bradford" wrote: > >> Thus said Stephan Beal on Tue, 08 Jul 2014 21:37:50 +0200: >> >> > No characters between 128 and 255 are valid UTF-8, to avoid confusion >> > with the many encodings which use that range. >> >> If no characters between 128 and 255 are valid UTF-8, and they can never >> be valid UTF-8 characters, and are used by many encodings, why doesn't >> Fossil simply ignore them when they are committed? I guess I'm confused >> why they are being treated specially as to warrant either a setting or a >> prompt to continue. >> > Maybe this will help, and my apologies if I appear to be talking down to anyone. I'm just trying to be clear: Unicode is a way of expressing codepoints from 0x00 to 0x10 (17 planes of 65,536 code points). 0xE8 is a legitimate Unicode codepoint for "LATIN SMALL LETTER E WITH GRAVE" (essentially the same thing as in ISO-8859-1). If you use UTF-32 to encode it, you'll wind up with a four byte integer 0x00E8 (either little or big endian encoded depending on the platform). If you use UTF-16 to encode it, you'll wind up with a two byte integer 0x00E8 (again varying by endianess). If you use UTF-8 to encode it, you'll wind up with the two byte sequence 0xC3 0xA8 (or 0b110[00011] 0b10[101000] where the bracketed binary digits are the original 0xE8 byte). So the codepoint (character) 0xE8 can appear in UTF-8, but the byte 0xE8 is not the same thing as the code point. -- Scott Robison ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
Re: [fossil-users] File contains invalid UTF-8, but is not UTF-8.
Thus said Stephan Beal on Tue, 08 Jul 2014 23:50:40 +0200: > Interesting question/option, but i have no answer. Something to > possibly consider? Or perhaps just making the documentation more clear that all files must be valid UTF-8. There is already an option to control how encodings are handled, and it is versionable (which means that I can include it with the repository so others won't get warnings if they modify it). I see the setting mentions it here, but I don't recall ever reading anything that indicated that I would get a warning for invalid UTF-8. http://fossil-scm.org/index.html/help/setting This could just be a tool acclimation problem on my part. :-) Andy -- TAI64 timestamp: 400053bc6b46 ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users