Re: [fossil-users] Strange merge conflicts.
I made some more tests. Located the check-ins that produced this strange merge and checked out the versions of the problematic file from both check-ins in order to compare them. So, the versions of this file are completely byte-to-byte equal. The only specificity of these files is that the last line ends without CR or LF or any other control character. The last byte in the file is the character "'" - that is the last character on the line. Best Regards. -- Original Message -- To: (fossil-users@lists.fossil-scm.org) From: Richard Hipp (d...@sqlite.org) Subject: Re: [fossil-users] Strange merge conflicts. Date: 4.3.2011 18:23:12 >On Fri, Mar 4, 2011 at 11:18 AM, John Found wrote: > >> Several times when making merge with fossil, I ended up with really >> strange conflicts like this: >> >> <<<<<<< BEGIN MERGE CONFLICT: original content first <<<<<<< >> include '%TargetOS%/mouse.asm'=== original content above; conflict >> below = >> include '%TargetOS%/mouse.asm'>>>>>>> END MERGE CONFLICT: conflict last >> >>>>>>>>>>>>>>>>>> >> > >Did it really come out looking like that, or did the line wrapping occur >when you pasted the output in to your email program? > >Differences might be whitespace. Extra whitespace at the end of the line, >or tabs instead of spaces someplace. > >Or, could it be that your files does not end with a \n and that fact is >confusing Fossil somehow? If so, I'll look into it. But a quick fix for >you is to make sure your source code files end with \n - something you >should probably be doing anyhow. > > > >> >> In one merge, there was 4..5 similar "conflicts" and none of "real" >> In my opinion, both lines are totally equal. >> Is it a bug or I am missing something? >> >> Regards >> http://fresh.flatassembler.net Assembly language visual programming. ___ 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] Strange merge conflicts.
I do not agree here. Of course, the solution is: a c b It follows the principle of least surprise. If you want to make very strange things with merges, do not use a tool with automatic merge. Do it manually. Also, the merge of two equal lines, one with unix line end and the other with Windows line end, should not give any difference. At the end, the merge algorithm is subjective and can do whatever his developer thinks is more convenient to serve their users. RR 2011/3/4 Will West : > I'd go further, and say that the same change happening separately in > two branches is a conflict. Given initial content > > a > b > > For feature foo Bob changes it to > > a > c > b > > for feature bar Tom changes it to > > a > c > b > > When you want a branch with both features foo and bar, there isn't a > reasonable way for any merge algorithm to detect whether you need > > a > c > b > > > OR > > a > c > c > b > > OR perhaps something more like > > a > cc > b > > These decisions are outside the scope of what I would expect from > automatic merge to understand. > > Regards, > > -- > Will Owen West > 512.589.0578 > ___ > fossil-users mailing list > fossil-users@lists.fossil-scm.org > http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users > ___ 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] Strange merge conflicts.
-- Original Message -- > >Opinions on this vary. Fossil used to ignore whitespace at the ends of >lines when merging. But I changed this just the other day in response to >a complaint: > >http://www.fossil-scm.org/fossil/ci/1d93222627 > > So, Fossil treats CR($0d) and LF($0a) as a "whitespace", right? http://fresh.flatassembler.net Assembly language visual programming. ___ 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] Strange merge conflicts.
I'd go further, and say that the same change happening separately in two branches is a conflict. Given initial content a b For feature foo Bob changes it to a c b for feature bar Tom changes it to a c b When you want a branch with both features foo and bar, there isn't a reasonable way for any merge algorithm to detect whether you need a c b OR a c c b OR perhaps something more like a cc b These decisions are outside the scope of what I would expect from automatic merge to understand. Regards, -- Will Owen West 512.589.0578 ___ 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] Strange merge conflicts.
>Did it really come out looking like that, or did the line wrapping occur >when you pasted the output in to your email program? > Not like in your response. But still strange. I posted 3 lines of text as a example. I will quote them again separateli, closed with "[]" in order to avoid mail client reformating: 1: [<<<<<<< BEGIN MERGE CONFLICT: original content first <<<<<<<] 2: [include '%TargetOS%/mouse.asm'=== original content above; conflict below =] 3: [include '%TargetOS%/mouse.asm'>>>>>>> END MERGE CONFLICT: conflict last >>>>>>>>>>>>>>>>>>] Possible one of the files could be in Linux format (line ending with $0a) and other in Windows ($0d,$0a) Also, possibly the last line of the file could not end with any of them. There is no whitespace at the end of the line, except for CR and LF. Best Regards. ------ Original Message -- To: (fossil-users@lists.fossil-scm.org) From: Richard Hipp (d...@sqlite.org) Subject: Re: [fossil-users] Strange merge conflicts. Date: 4.3.2011 18:23:12 >On Fri, Mar 4, 2011 at 11:18 AM, John Found wrote: > >> Several times when making merge with fossil, I ended up with really >> strange conflicts like this: >> >> <<<<<<< BEGIN MERGE CONFLICT: original content first <<<<<<< >> include '%TargetOS%/mouse.asm'=== original content above; conflict >> below = >> include '%TargetOS%/mouse.asm'>>>>>>> END MERGE CONFLICT: conflict last >> >>>>>>>>>>>>>>>>>> >> > >Did it really come out looking like that, or did the line wrapping occur >when you pasted the output in to your email program? > >Differences might be whitespace. Extra whitespace at the end of the line, >or tabs instead of spaces someplace. > >Or, could it be that your files does not end with a \n and that fact is >confusing Fossil somehow? If so, I'll look into it. But a quick fix for >you is to make sure your source code files end with \n - something you >should probably be doing anyhow. > > > >> >> In one merge, there was 4..5 similar "conflicts" and none of "real" >> In my opinion, both lines are totally equal. >> Is it a bug or I am missing something? >> >> Regards >> >> http://fresh.flatassembler.net >> Assembly language visual programming. >> >> ___ >> fossil-users mailing list >> fossil-users@lists.fossil-scm.org >> http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users >> > > > >-- >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 > http://fresh.flatassembler.net Assembly language visual programming. ___ 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] Strange merge conflicts.
On Fri, Mar 4, 2011 at 11:24 AM, John Found wrote: > >Can it be a difference on the end of lines? > Hm, I don't know actually. There is small possibility that one can be with > Linux LF and other with CRLF. > Is it important? - they are text files and Fossil merges text files, not > binaries. > Opinions on this vary. Fossil used to ignore whitespace at the ends of lines when merging. But I changed this just the other day in response to a complaint: http://www.fossil-scm.org/fossil/ci/1d93222627 > > -- Original Message -- > To: (fossil-users@lists.fossil-scm.org) > From: Lluís Batlle i Rossell (virik...@gmail.com) > Subject: Re: [fossil-users] Strange merge conflicts. > Date: 4.3.2011 18:19:25 > > >On Fri, Mar 04, 2011 at 06:18:11PM +0200, John Found wrote: > >> Several times when making merge with fossil, I ended up with really > >> strange conflicts like this: > >> > >> <<<<<<< BEGIN MERGE CONFLICT: original content first <<<<<<< > >> include '%TargetOS%/mouse.asm'=== original content above; conflict > >> below = > >> include '%TargetOS%/mouse.asm'>>>>>>> END MERGE CONFLICT: conflict last > >> >>>>>>>>>>>>>>>>>> > >> > >> In one merge, there was 4..5 similar "conflicts" and none of "real" > >> In my opinion, both lines are totally equal. > >> Is it a bug or I am missing something? > >Can it be a difference on the end of lines? > >___ > >fossil-users mailing list > >fossil-users@lists.fossil-scm.org > >http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users > > http://fresh.flatassembler.net > Assembly language visual programming. > > > ___ > fossil-users mailing list > fossil-users@lists.fossil-scm.org > http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users > -- 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
Re: [fossil-users] Strange merge conflicts.
>Can it be a difference on the end of lines? Hm, I don't know actually. There is small possibility that one can be with Linux LF and other with CRLF. Is it important? - they are text files and Fossil merges text files, not binaries. -- Original Message -- To: (fossil-users@lists.fossil-scm.org) From: Lluís Batlle i Rossell (virik...@gmail.com) Subject: Re: [fossil-users] Strange merge conflicts. Date: 4.3.2011 18:19:25 >On Fri, Mar 04, 2011 at 06:18:11PM +0200, John Found wrote: >> Several times when making merge with fossil, I ended up with really >> strange conflicts like this: >> >> <<<<<<< BEGIN MERGE CONFLICT: original content first <<<<<<< >> include '%TargetOS%/mouse.asm'=== original content above; conflict >> below = >> include '%TargetOS%/mouse.asm'>>>>>>> END MERGE CONFLICT: conflict last >> >>>>>>>>>>>>>>>>>> >> >> In one merge, there was 4..5 similar "conflicts" and none of "real" >> In my opinion, both lines are totally equal. >> Is it a bug or I am missing something? >Can it be a difference on the end of lines? >___ >fossil-users mailing list >fossil-users@lists.fossil-scm.org >http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users http://fresh.flatassembler.net Assembly language visual programming. ___ 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] Strange merge conflicts.
On Fri, Mar 4, 2011 at 11:18 AM, John Found wrote: > Several times when making merge with fossil, I ended up with really strange > conflicts like this: > > <<< BEGIN MERGE CONFLICT: original content first <<< > include '%TargetOS%/mouse.asm'=== original content above; conflict > below = > include '%TargetOS%/mouse.asm'>>> END MERGE CONFLICT: conflict last > >> > Did it really come out looking like that, or did the line wrapping occur when you pasted the output in to your email program? Differences might be whitespace. Extra whitespace at the end of the line, or tabs instead of spaces someplace. Or, could it be that your files does not end with a \n and that fact is confusing Fossil somehow? If so, I'll look into it. But a quick fix for you is to make sure your source code files end with \n - something you should probably be doing anyhow. > > In one merge, there was 4..5 similar "conflicts" and none of "real" > In my opinion, both lines are totally equal. > Is it a bug or I am missing something? > > Regards > > http://fresh.flatassembler.net > Assembly language visual programming. > > ___ > fossil-users mailing list > fossil-users@lists.fossil-scm.org > http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users > -- 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
Re: [fossil-users] Strange merge conflicts.
On Fri, Mar 04, 2011 at 06:18:11PM +0200, John Found wrote: > Several times when making merge with fossil, I ended up with really strange > conflicts like this: > > <<< BEGIN MERGE CONFLICT: original content first <<< > include '%TargetOS%/mouse.asm'=== original content above; conflict below > = > include '%TargetOS%/mouse.asm'>>> END MERGE CONFLICT: conflict last > >> > > In one merge, there was 4..5 similar "conflicts" and none of "real" > In my opinion, both lines are totally equal. > Is it a bug or I am missing something? Can it be a difference on the end of lines? ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
[fossil-users] Strange merge conflicts.
Several times when making merge with fossil, I ended up with really strange conflicts like this: <<< BEGIN MERGE CONFLICT: original content first <<< include '%TargetOS%/mouse.asm'=== original content above; conflict below = include '%TargetOS%/mouse.asm'>>> END MERGE CONFLICT: conflict last >> In one merge, there was 4..5 similar "conflicts" and none of "real" In my opinion, both lines are totally equal. Is it a bug or I am missing something? Regards http://fresh.flatassembler.net Assembly language visual programming. ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users