Re: [fossil-users] Possibility of nicer diffs?
On Wed, 22 Jun 2011 18:19:17 +0300, Ron Aaron wrote: Hi, Rene - I tried the instructions here: http://fossil-scm.org/index.html/wiki?name=Cookbook#HighlightDiff But have not got it to work; perhaps the instructions aren't quite correct, I haven't looked into it yet. On 06/22/2011 05:30 PM, Rene wrote: in the fossil wiki does not work for me, not sure why. Which one(s) doesn't work for you? maybe I can be of help. ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users I tested the solution and it works ON Ff 5.0, Chrome latest and IE 6.0 You might have forgotten the CSS. I added the following style type=text/css pre.diff { color: #000; } pre .diff-position { display:-moz-inline-stack; display:inline-block; zoom:1; *display:block; width: 100%; font-style: italic; padding: 0.5em 0; margin: 0.5em 0; border-top: 1px dotted #A2B5CD; border-bottom: 1px dotted #A2B5CD; color: #A2B5CD; } pre .diff-added { background-color: #CEFBC3 !important; } pre .diff-removed { background-color: #F5C2C1 !important; } /style to the header Just after the last link ../ and you have to add the javascript in the footer Before the /body After the div in the (standard) footer: /div script /* Simple diff highlighting */ var DiffHighlighter = { isDiff : function(s){ return (s.match(/^@@.*@@/m) s.match(/^[+-]/m)); }, highlightElement : function(el){ var s = el.innerHTML; if (!this.isDiff(s)){ return; } s = s.replace(, lt;); s = s.replace(/^\+.*$/mg, 'span class=diff-added$/span'); s = s.replace(/^\-.*$/mg, 'span class=diff-removed$/span'); s = s.replace(/^@@.*$/mg, 'span class=diff-position$/span'); s = pre class='diff' + s + /pre; // workaround for IE el.innerHTML = s; }, highlightElementsWithTagName : function(tagName){ var els = document.getElementsByTagName(tagName); for (var i=0; i els.length; i++){ this.highlightElement(els[i]); } } }; DiffHighlighter.highlightElementsWithTagName('pre'); /script /body -- Rene ___ 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] Possibility of nicer diffs?
I'm going crazy trying to overcome the command-line-phobia of my coworkers; please, anything you can do to help me would be appreciated! I learned how to co-exist with that. I don't think there is a way to defeat it. -- www.lulli.net ___ 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] Possibility of nicer diffs?
On 06/22/2011 10:59 AM, paolo lulli wrote: I'm going crazy trying to overcome the command-line-phobia of my coworkers; please, anything you can do to help me would be appreciated! I learned how to co-exist with that. I don't think there is a way to defeat it. With the coworkers? I'm the one who has to do the SVN administration; I'm desperate to get away from SVN (or from the administration, but that won't happen). The way to live with it is by drinking heavily... and I can't do that. ___ 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] Possibility of nicer diffs?
On Wed, Jun 22, 2011 at 3:52 AM, Ron Aaron r...@ronware.org wrote: I'm trying to get fossil adopted in my company; and one of the problems is the spartan nature of the diffs (in the GUI). It would be excellent if there were another option similar to 'gdiff' which could be enable to make the diff link open an external diff program with the correct data. My guess is this would only be useful on a local fossil, e.g. 'fossil ui' fossil setting --global diff-command EXTERNAL-DIFF-PROGRAM Alternatively, using CSS to style the diff so that a skin could show diffs in a more attractive manner would be useful. The solution posted in the fossil wiki does not work for me, not sure why. I'm going crazy trying to overcome the command-line-phobia of my coworkers; please, anything you can do to help me would be appreciated! ___ 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] Possibility of nicer diffs?
On 06/22/2011 02:18 PM, Richard Hipp wrote: fossil setting --global diff-command EXTERNAL-DIFF-PROGRAM That works when doing a 'diff' from the command-line, but not when using fossil ui and clicking a diff link. Is there a way to hook the diff link? ___ 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] Possibility of nicer diffs?
Here Synchrotron has a JavaScript 3-way diff. Here's an intro: http://homepages.kcbbs.gen.nz/tonyg/projects/synchrotron.html Here's the code: https://github.com/tonyg/synchrotron Looks like it uses the MIT license. Bill On Wed, Jun 22, 2011 at 2:52 AM, Ron Aaron r...@ronware.org wrote: I'm trying to get fossil adopted in my company; and one of the problems is the spartan nature of the diffs (in the GUI). It would be excellent if there were another option similar to 'gdiff' which could be enable to make the diff link open an external diff program with the correct data. My guess is this would only be useful on a local fossil, e.g. 'fossil ui' Alternatively, using CSS to style the diff so that a skin could show diffs in a more attractive manner would be useful. The solution posted in the fossil wiki does not work for me, not sure why. I'm going crazy trying to overcome the command-line-phobia of my coworkers; please, anything you can do to help me would be appreciated! ___ 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] Possibility of nicer diffs?
Also, here's jsdiff, which is pretty simple to use: http://ejohn.org/projects/javascript-diff-algorithm/ Bill On Wed, Jun 22, 2011 at 1:45 PM, Bill Burdick bill.burd...@gmail.comwrote: Here Synchrotron has a JavaScript 3-way diff. Here's an intro: http://homepages.kcbbs.gen.nz/tonyg/projects/synchrotron.html Here's the code: https://github.com/tonyg/synchrotron Looks like it uses the MIT license. Bill On Wed, Jun 22, 2011 at 2:52 AM, Ron Aaron r...@ronware.org wrote: I'm trying to get fossil adopted in my company; and one of the problems is the spartan nature of the diffs (in the GUI). It would be excellent if there were another option similar to 'gdiff' which could be enable to make the diff link open an external diff program with the correct data. My guess is this would only be useful on a local fossil, e.g. 'fossil ui' Alternatively, using CSS to style the diff so that a skin could show diffs in a more attractive manner would be useful. The solution posted in the fossil wiki does not work for me, not sure why. I'm going crazy trying to overcome the command-line-phobia of my coworkers; please, anything you can do to help me would be appreciated! ___ 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