Re: [fossil-users] fossil-users Digest, Vol 120, Issue 2
Thus said Stephan Beal on Tue, 02 Jan 2018 04:33:56 +0100: > That's not what i'm seeing: > > [stephan@host:~]$ echo -e "1\n2\n3" > 1 > 2 > 3 > [stephan@host:~]$ echo $(echo -e "1\n2\n3") > 1 2 3 Hmm, that's interesting. Have a look at this... Here's a file that has newlines in it, and which I will commit as a comment to a ticket from command line arguments. Then I will inspect the artifact that was generated from the ticket: $ cat first.txt First from file. With multiple lines. $ fossil ticket add title "Test" comment "$(cat first.txt)" ticket add succeeded for 0e9c37eab5c7123d530097be4b298ba507a443af $ fossil artifact 07760c2485 D 2018-01-02T05:54:32.670 J comment First\sfrom\sfile.\n\nWith\smultiple\slines. J title Test K 0e9c37eab5c7123d530097be4b298ba507a443af U amb Z 360677764c30fd6bb5049d637b0c1c28 Notice that the J-card shows all the newlines except the last two (which were stripped I presume by the shell). Now let's append: $ cat second.txt Second from file. With multiple lines. $ fossil ticket change 0e9c37eab +comment "$(cat second.txt)" ticket set succeeded for 0e9c37eab5c7123d530097be4b298ba507a443af $ fossil artifact 34db266dcb0f117b D 2018-01-02T06:03:46.839 J +comment \nSecond\sfrom\sfile.\n\nWith\smultiple\slines. K 0e9c37eab5c7123d530097be4b298ba507a443af U amb Z da0a4b7d872315fd7c46c42cfa1259aa In this case, the newline at the beginning of the file was also preserved in the J-card. When it gets rendered, however, there is no tag in front of the second chunk of comment (I'm not sure why). But if I add a newline this way: $ cat third.txt Third comment from file. With multiple lines. $ fossil ticket change 0e9c37eab +comment " > $(cat third.txt)" ticket set succeeded for 0e9c37eab5c7123d530097be4b298ba507a443af $ fossil artifact db16ba984f4d543d D 2018-01-02T06:07:43.120 J +comment \nThird\scomment\sfrom\sfile.\n\nWith\smultiple\slines. K 0e9c37eab5c7123d530097be4b298ba507a443af U amb Z c6de4dba1e840597206da2c761f94053 But this seems to work differently, even with similar input: $ cat fourth.txt Fourth from file. With multiple lines. $ fossil artifact 902a2ec529584f13 D 2018-01-02T06:09:02.317 J +comment \nFourth\sfrom\sfile.\n\nWith\smultiple\slines.\n K 0e9c37eab5c7123d530097be4b298ba507a443af U amb Z f6470d3a73f9ee9e94020219a70c0195 The output in the UI now looks like the following: First from file. With multiple lines. Second from file. With multiple lines. Third comment from file. With multiple lines. Fourth from file. With multiple lines. So, if the shell is stripping all the newlines, how does Fossil know that there are newlines as evidenced by the J-card entries that show multiple embedded newlines? And even the shell seems to work as I would expect: $ echo "$(cat first.txt)" > /tmp/output.txt $ cat /tmp/output.txt First from file. With multiple lines. So I'm not sure why this wouldn't also work for the OP with Fossil. Thanks, Andy -- TAI64 timestamp: 40005a4b241f ___ 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] fossil-users Digest, Vol 120, Issue 2
Stephan, You need to quote the argument to "echo", otherwise the whitespace is collapsed by the shell. For example: echo "$(echo -e "1\n2\n3")" On Tue, 2 Jan 2018, Stephan Beal wrote: (this time back to the list) On Tue, Jan 2, 2018 at 3:43 AM, Andy Bradfordwrote: Thus said Stephan Beal on Tue, 02 Jan 2018 03:07:20 +0100: > That will still strip any newlines from his input, though, because > that's how $(...) works. It actually only strips the trailing newline. Any newlines in the middle of the file are fine. That's not what i'm seeing: [stephan@host:~]$ echo -e "1\n2\n3" 1 2 3 [stephan@host:~]$ echo $(echo -e "1\n2\n3") 1 2 3 -- - stephan beal http://wanderinghorse.net/home/stephan/"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] fossil-users Digest, Vol 120, Issue 2
(this time back to the list) On Tue, Jan 2, 2018 at 3:43 AM, Andy Bradfordwrote: > Thus said Stephan Beal on Tue, 02 Jan 2018 03:07:20 +0100: > > > That will still strip any newlines from his input, though, because > > that's how $(...) works. > > It actually only strips the trailing newline. Any newlines in the middle > of the file are fine. That's not what i'm seeing: [stephan@host:~]$ echo -e "1\n2\n3" 1 2 3 [stephan@host:~]$ echo $(echo -e "1\n2\n3") 1 2 3 -- - stephan beal http://wanderinghorse.net/home/stephan/ "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] fossil-users Digest, Vol 120, Issue 2
Thus said Stephan Beal on Tue, 02 Jan 2018 03:07:20 +0100: > That will still strip any newlines from his input, though, because > that's how $(...) works. It actually only strips the trailing newline. Any newlines in the middle of the file are fine. So for example: $ cat third.txt Third from file. With multiple lines. $ fossil ticket change 64f086ad5be82495327100a66dcdee24432e2b79 +comment " $(cat third.txt)" ticket add succeeded for 64f086ad5be82495327100a66dcdee24432e2b79 Will work, as long as that embedded newline (maybe it's actually a carriage-return) is in there. > To get the comment text imported verbatim, i suspect that the ticket > command needs to support a -M FILENAME option to import a comment, > like checkin does. And this certainly would be a friendlier option. :-) Andy -- TAI64 timestamp: 40005a4af1ee ___ 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] How to cleanup two leafs on private branch?
Thus said Olivier Mascia on Mon, 01 Jan 2018 22:33:19 +0100: > WARNING: multiple open leaf check-ins on private: > (1) 2018-01-01 17:21:25 [cf17bd1315] (current) > (2) 2017-12-31 12:49:25 [6e96981da8] > There is really nothing wrong. I just would like to 'close' those > leafs or the whole private branch and re-use it later for other > purposes. Given that you know the commit IDs, you could just do: fossil amend cf17bd1315 --close fossil amend 6e96981da8 --close Also, Fossil doesn't impose any uniqueness restrictions with branch names. You can reuse the same private branch name multiple times if you want. Andy -- TAI64 timestamp: 40005a4aefc1 ___ 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] ticket length limitation
Thus said Sergey Bronnikov on Mon, 01 Jan 2018 12:44:42 +: > $ echo "fossil ticket add title "title" comment \"$(cat content)\"" | wc -c > 469207 > > Is there any workaround? There is one workaround that I'm aware of. If you chop your comment up into chunks you could do something like: fossil ticket add title "title" comment "$firstchunk" fossil ticket change +comment "$secondchunk" fossil ticket change +comment "$thirdchunk" However, if you want an actual paragraph break between the first and second chunks (and not just concatenation) then you would have to embed a newline in there like: fossil ticket change +comment " $fourthchunk" Andy -- TAI64 timestamp: 40005a4aee1b ___ 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] fossil-users Digest, Vol 120, Issue 2
On Tue, Jan 2, 2018 at 2:25 AM, Ron Wwrote: > Try splitting the long text file into 2 or more smaller files, then add > the ticket using the first file. Then you can append to the comment: > >$ fossil ticket change TICKETUUID +comment "$(cat content_next)" > That will still strip any newlines from his input, though, because that's how $(...) works. To get the comment text imported verbatim, i suspect that the ticket command needs to support a -M FILENAME option to import a comment, like checkin does. -- - stephan beal http://wanderinghorse.net/home/stephan/ "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] fossil-users Digest, Vol 120, Issue 2
On Mon, Jan 1, 2018 at 6:48 PM,wrote: > Date: Mon, 01 Jan 2018 12:44:42 + > From: Sergey Bronnikov > Subject: [fossil-users] ticket length limitation > > For most by bugs it works fine, but command is failed when ticket body > exceed limits. Command line length is limited by value in `getconf > ARG_MAX`, in my case it is 262144. So when file is too long it is > impossible to create ticket. > $ echo "fossil ticket add title "title" comment \"$(cat content)\"" | wc -c > 469207 > > Is there any workaround? > Try splitting the long text file into 2 or more smaller files, then add the ticket using the first file. Then you can append to the comment: $ fossil ticket change TICKETUUID +comment "$(cat content_next)" ___ 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] mimetype of a ticket with specified mimetype
On Mon, Jan 1, 2018 at 1:58 PM, Sergey Bronnikovwrote: > $ fossil ticket add title "title" comment "$(cat bugs-example1)" mimetype > "text/plain" > > When I open this ticket in a Web UI it shows as "formatted" and all lines > are stick together. Content view becomes fine with switch to 'plaintext' > mode above ticket. > The question is: why fossil shows me formatted text when I specified it as > "text/plain"? > Running a command through $(...) strips any newlines from the output, which is likely mangling your comment text. -- - stephan beal http://wanderinghorse.net/home/stephan/ "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] How to cleanup two leafs on private branch?
> Le 2 janv. 2018 à 00:11, Olivier Masciaa écrit : > >> Run "fossil ui". Find the leaf you want to close. Click on the >> "Edit" link. Select "Leaf Closure", followed by "Preview" and >> "Submit". > > I guess I played fool or broke something on this configuration. I have no > Edit link. Other Links only shows: manifest | tags. Login issue. Did not take note of the password automatically set on my default user upon cloning the repository. Learned the lesson :) -- Best Regards, Meilleures salutations, Met vriendelijke groeten, Olivier Mascia ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
[fossil-users] Building fossil on Windows using MinGW
Just sharing my findings, if it is useful to anyone. I was looking for an easy way to sort my path setting up some version of MinGW to build fossil trunk (for 32 bits) on Windows. I needed it to get a 32 bits build suitable for tests on Windows XP. The build environment is Server 2016, which for this purpose is Windows 10 alike. I could not use my Visual Studio 2017, because that requires installing an optionally toolset pack (which I can't for obscure internal policies reasons). That optional toolset specifically targets Windows XP compatibility (the default up-to-date toolset of Visual Studio 2017 produces executables that cannot run on Windows XP). There are MinGW and MinGW-w64 which are two distinct projects. Apparently the first one is older and limited to 32 bits (I may be wrong on this). The other one is much more up to date, targeting both 32 and 64 bits but I haven't found a way to complete my setup satisfactorily. So using http://www.mingw.org, I knew I would end up with an older setup but suited to the task. ## My steps to setup MinGW. Follow the Downloads link from the top bar, leading you to https://sourceforge.net/projects/mingw/files/ From the Installer folder, download and run mingw-get-setup.exe Following the steps of the installer (I only opted out from links on the desktop), you end up with a GUI to manage your packages. From the Basic Setup node I only selected 'mingw-developer-toolkit', 'mingw32-base' and 'msys-base'. Then hit Apply. A few minutes later, it is done. ## My steps to set myself ready to compile fossil. Start a windows command prompt. Run C:\MinGW\msys\1.0\msys.bat to open up another prompt with a sh prompt. Ended up in my home directory which happen to read '/home/Olivier' (pwd) and that actually is C:\MinGW\msys\1.0\home\Olivier. ## Building fossil Assuming some fossil.exe is already in your windows path (which is easy to fix downloading a pre-built binary), I did nothing more than what I expected: $ mkdir fossil $ cd fossil $ fossil clone http://www.fossil-scm.org/ fossil.fossil $ fossil open fossil.fossil $ make win/Makefile.mingw And voilà: $ fossil version -v This is fossil version 2.5 [21d5038fd0] 2018-01-01 18:56:19 UTC Compiled on Jan 2 2018 00:02:38 using mingw32-501L-gcc-6.3.0 (32-bit) -- Best Regards, Meilleures salutations, Met vriendelijke groeten, Olivier Mascia ___ 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] How to cleanup two leafs on private branch?
> Le 1 janv. 2018 à 23:55, Richard Hippa écrit : > > On 1/1/18, Olivier Mascia wrote: >> I just would like to 'close' those leafs > > Run "fossil ui". Find the leaf you want to close. Click on the > "Edit" link. Select "Leaf Closure", followed by "Preview" and > "Submit". I guess I played fool or broke something on this configuration. I have no Edit link. Other Links only shows: manifest | tags. I'll trash it all (that was only clone of http://www.fossil-scm.org/) and restart testing with more attention to details. Thanks! -- Best Regards, Meilleures salutations, Met vriendelijke groeten, Olivier Mascia ___ 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] How to cleanup two leafs on private branch?
On 1/1/18, Olivier Masciawrote: > I just would like to 'close' those leafs Run "fossil ui". Find the leaf you want to close. Click on the "Edit" link. Select "Leaf Closure", followed by "Preview" and "Submit". -- D. Richard Hipp d...@sqlite.org ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
[fossil-users] How to cleanup two leafs on private branch?
Dear, Still learning Fossil. Ended up after various experiments with two leafs on my private branch. Something like: WARNING: multiple open leaf check-ins on private: (1) 2018-01-01 17:21:25 [cf17bd1315] (current) (2) 2017-12-31 12:49:25 [6e96981da8] There is really nothing wrong. I just would like to 'close' those leafs or the whole private branch and re-use it later for other purposes. I'm learning so will probably find my way within 'some time'. Would you have a hint for me? -- Best Regards, Meilleures salutations, Met vriendelijke groeten, Olivier Mascia ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
[fossil-users] mimetype of a ticket with specified mimetype
Hello, I create a ticket with specified mimetype: $ fossil ticket add title "title" comment "$(cat bugs-example1)" mimetype "text/plain" When I open this ticket in a Web UI it shows as "formatted" and all lines are stick together. Content view becomes fine with switch to 'plaintext' mode above ticket. The question is: why fossil shows me formatted text when I specified it as "text/plain"? Sergey ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
[fossil-users] ticket length limitation
Hello, I do a batch importing of tickets to a Fossil SCM via command line: $ fossil ticket add title "title" comment "$(cat bugs-example1)" For most by bugs it works fine, but command is failed when ticket body exceed limits. Command line length is limited by value in `getconf ARG_MAX`, in my case it is 262144. So when file is too long it is impossible to create ticket. $ echo "fossil ticket add title "title" comment \"$(cat content)\"" | wc -c 469207 Is there any workaround? Sergey ___ 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] id of a ticket added via command line
It works perfect. Thanks! пн, 1 янв. 2018 г. в 3:59, Andy Bradford: > Thus said Sergey Bronnikov on Sun, 31 Dec 2017 11:40:48 +: > > > For import purpose I use 'fossil tickets' commands, like this: fossil > > ticket title "title" comment "comment" and it creates new ticket in > > Fossil SCM. After this I need to add other messages as comments. But > > how to automatically understand id of added ticket? > > It would appear that Fossil incorrectly identifies each new ticket as an > error condition and outputs nothing. I've committed a fix to trunk. > Please verify that it works better for you: > > http://www.fossil-scm.org/index.html/info/d4c6f3c439e369e0 > > Before this fix, Fossil would never output anything on a successful > ticket operation so you didn't ever get the Ticket ID. That would make > it pretty difficult to deterministically obtain the Ticket ID. > > Andy > -- > TAI64 timestamp: 40005a498829 > > > ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users