Re: [Trac] Line numbers of unified diffs - like github

2010-10-12 Thread Justin Kelly
Thanks Olaf

Cheers

Justin

On Wed, Oct 13, 2010 at 10:03 AM, Olaf Meeuwissen  wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> On 2010年10月12日 14:03, Justin Kelly wrote:
> > Thanks Olaf
> >
> > what im after is line number of the first style diff in
> > http://i.imgur.com/RdPjt.jpg (which i assume is unified
> > style
> >  )
> > - similar to what github and google code
> does
> > for that style
> >
> > yep - i know the second style diff in http://i.imgur.com/RdPjt.jpg has
> line
> > numbers
> >
> > refer: http://i.imgur.com/LKrSk.png
> >
> > hope this makes sense
>
> OK, now I see.  I missed the fact that the +/- were not displayed.  On
> top of that I interpreted the "Tabular" and "Unified" tabs the wrong way
> around, thinking that the darker one was the one that could be switched to.
>
> Anyway, it seems that the display is completely controlled with the
> combination of:
>
>  - trac/htdocs/js/diff.js
>  - trac/htdocs/css/diff.css
>
> I had a quick look at diff.js and I think that is the file that's
> responsible for adding/removing the +/- from view as well as the @@
> markers and Index: header.  You could try poking around in there.
>
> >> On Tue, Oct 12, 2010 at 10:24 AM, Olaf Meeuwissen <
> olaf.meeuwis...@avasys.jp
> >> wrote:
> >>
> >>> On 2010?10?07? 09:33, Justin Kelly wrote:
> >>> Just wondering if its possible to display the line number on unified
> >>> diffs - like github does
> >>>
> >>> github example:
> >>>
> >>>
> http://github.com/chrisboulton/php-diff/commit/516c4be3abf98d3fa3740bdd709a229e60c74df0
> >>>
> >>> trac example:
> >>> http://i.imgur.com/RdPjt.jpg
> >>>
> >>> I've been searching but couldn't find the answer so far
> >>
> >> Unless I completely misunderstand, the answer is looking you right in
> >> the face on the second URL.  The second diff is a unified diff and has
> >> line numbers on it.  The diff your pointing to is a tabular diff.  Just
> >> click on the Unified "tab" in the diff's upper right corner should give
> >> you what you want, no?
>
> Hope this helps,
> - --
> Olaf Meeuwissen, LPIC-2   FLOSS Engineer -- AVASYS CORPORATION
> FSF Associate Member #1962   Help support software freedom
> http://www.fsf.org/jf?referrer=1962
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.10 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAky06UsACgkQt5qrxaZLMnJ1zwCgsD7A+rVE7NYQSVGgU9NwHaPh
> xUkAnjOfcfFtxznFA7N/BB5Qzo8pjXYG
> =e03f
> -END PGP SIGNATURE-
>

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To post to this group, send email to trac-us...@googlegroups.com.
To unsubscribe from this group, send email to 
trac-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/trac-users?hl=en.



Re: [Trac] Line numbers of unified diffs - like github

2010-10-12 Thread Olaf Meeuwissen
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 2010年10月12日 14:03, Justin Kelly wrote:
> Thanks Olaf
> 
> what im after is line number of the first style diff in
> http://i.imgur.com/RdPjt.jpg (which i assume is unified
> style
>  )
> - similar to what github and google code does
> for that style
> 
> yep - i know the second style diff in http://i.imgur.com/RdPjt.jpg has line
> numbers
> 
> refer: http://i.imgur.com/LKrSk.png
> 
> hope this makes sense

OK, now I see.  I missed the fact that the +/- were not displayed.  On
top of that I interpreted the "Tabular" and "Unified" tabs the wrong way
around, thinking that the darker one was the one that could be switched to.

Anyway, it seems that the display is completely controlled with the
combination of:

 - trac/htdocs/js/diff.js
 - trac/htdocs/css/diff.css

I had a quick look at diff.js and I think that is the file that's
responsible for adding/removing the +/- from view as well as the @@
markers and Index: header.  You could try poking around in there.

>> On Tue, Oct 12, 2010 at 10:24 AM, Olaf Meeuwissen > wrote:
>> 
>>> On 2010?10?07? 09:33, Justin Kelly wrote:
>>> Just wondering if its possible to display the line number on unified
>>> diffs - like github does
>>>
>>> github example:
>>>
>>> http://github.com/chrisboulton/php-diff/commit/516c4be3abf98d3fa3740bdd709a229e60c74df0
>>>
>>> trac example:
>>> http://i.imgur.com/RdPjt.jpg
>>>
>>> I've been searching but couldn't find the answer so far
>> 
>> Unless I completely misunderstand, the answer is looking you right in
>> the face on the second URL.  The second diff is a unified diff and has
>> line numbers on it.  The diff your pointing to is a tabular diff.  Just
>> click on the Unified "tab" in the diff's upper right corner should give
>> you what you want, no?

Hope this helps,
- -- 
Olaf Meeuwissen, LPIC-2   FLOSS Engineer -- AVASYS CORPORATION
FSF Associate Member #1962   Help support software freedom
 http://www.fsf.org/jf?referrer=1962
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAky06UsACgkQt5qrxaZLMnJ1zwCgsD7A+rVE7NYQSVGgU9NwHaPh
xUkAnjOfcfFtxznFA7N/BB5Qzo8pjXYG
=e03f
-END PGP SIGNATURE-

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To post to this group, send email to trac-us...@googlegroups.com.
To unsubscribe from this group, send email to 
trac-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/trac-users?hl=en.



Re: [Trac] Line numbers of unified diffs - like github

2010-10-12 Thread Ryan J Ollos



Justin Kelly wrote:
> 
> Thanks Olaf
> 
> what im after is line number of the first style diff in
> http://i.imgur.com/RdPjt.jpg (which i assume is unified
> style
>  )
> - similar to what github and google code
> does
> for that style
> 
> yep - i know the second style diff in http://i.imgur.com/RdPjt.jpg has
> line
> numbers
> 
> refer: http://i.imgur.com/LKrSk.png
> 
> hope this makes sense
> 
> Cheers
> 
> Justin
> 
> 

What specific features of the unified diff do you like to see that the
tabular form does not offer?  It appears that the tabular form is just a
nicer way to display the unified diff.

The nice feature of the unified diff is that you can copy the diff to your
clipboard.  If you try to do this with the tabular form, you get all the
line numbers as well (there is a ticket open with a request to correct this
behavior, but I don't know the number off-hand).

- Ryan

-- 
View this message in context: 
http://old.nabble.com/Re%3A-Line-numbers-of-unified-diffs---like-github-tp29938900p29945773.html
Sent from the Trac Users mailing list archive at Nabble.com.

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To post to this group, send email to trac-us...@googlegroups.com.
To unsubscribe from this group, send email to 
trac-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/trac-users?hl=en.



Re: [Trac] Line numbers of unified diffs - like github

2010-10-11 Thread Justin Kelly
Thanks Olaf

what im after is line number of the first style diff in
http://i.imgur.com/RdPjt.jpg (which i assume is unified
style
 )
- similar to what github and google code does
for that style

yep - i know the second style diff in http://i.imgur.com/RdPjt.jpg has line
numbers

refer: http://i.imgur.com/LKrSk.png

hope this makes sense

Cheers

Justin

On Tue, Oct 12, 2010 at 10:24 AM, Olaf Meeuwissen  wrote:

> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> On 2010?10?07? 09:33, Justin Kelly wrote:
> > Just wondering if its possible to display the line number on unified
> > diffs - like github does
> >
> > github example:
> >
> http://github.com/chrisboulton/php-diff/commit/516c4be3abf98d3fa3740bdd709a229e60c74df0
> >
> > trac example:
> > http://i.imgur.com/RdPjt.jpg
> >
> > I've been searching but couldn't find the answer so far
>
> Unless I completely misunderstand, the answer is looking you right in
> the face on the second URL.  The second diff is a unified diff and has
> line numbers on it.  The diff your pointing to is a tabular diff.  Just
> click on the Unified "tab" in the diff's upper right corner should give
> you what you want, no?
>
> Hope this helps,
> - --
> Olaf Meeuwissen, LPIC-2   FLOSS Engineer -- AVASYS CORPORATION
> FSF Associate Member #1962   Help support software freedom
> http://www.fsf.org/jf?referrer=1962
> -BEGIN PGP SIGNATURE-
> Version: GnuPG v1.4.10 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAkyznJUACgkQt5qrxaZLMnJcHACgoydLZT+HBhbvLVhsddz+5uD1
> lHwAoLJ4I8jdLGKb5tOMyD8v5dNHmr1e
> =KJ6b
> -END PGP SIGNATURE-
>

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To post to this group, send email to trac-us...@googlegroups.com.
To unsubscribe from this group, send email to 
trac-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/trac-users?hl=en.



Re: [Trac] Line numbers of unified diffs - like github

2010-10-11 Thread Olaf Meeuwissen
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On 2010?10?07? 09:33, Justin Kelly wrote:
> Just wondering if its possible to display the line number on unified
> diffs - like github does
> 
> github example:
> http://github.com/chrisboulton/php-diff/commit/516c4be3abf98d3fa3740bdd709a229e60c74df0
> 
> trac example:
> http://i.imgur.com/RdPjt.jpg
> 
> I've been searching but couldn't find the answer so far

Unless I completely misunderstand, the answer is looking you right in
the face on the second URL.  The second diff is a unified diff and has
line numbers on it.  The diff your pointing to is a tabular diff.  Just
click on the Unified "tab" in the diff's upper right corner should give
you what you want, no?

Hope this helps,
- -- 
Olaf Meeuwissen, LPIC-2   FLOSS Engineer -- AVASYS CORPORATION
FSF Associate Member #1962   Help support software freedom
 http://www.fsf.org/jf?referrer=1962
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkyznJUACgkQt5qrxaZLMnJcHACgoydLZT+HBhbvLVhsddz+5uD1
lHwAoLJ4I8jdLGKb5tOMyD8v5dNHmr1e
=KJ6b
-END PGP SIGNATURE-

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To post to this group, send email to trac-us...@googlegroups.com.
To unsubscribe from this group, send email to 
trac-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/trac-users?hl=en.



[Trac] Line numbers of unified diffs - like github

2010-10-07 Thread Justin Kelly
Hi Trac people

Just wondering if its possible to display the line number on unified
diffs - like github does

github example:
http://github.com/chrisboulton/php-diff/commit/516c4be3abf98d3fa3740bdd709a229e60c74df0

trac example:
http://i.imgur.com/RdPjt.jpg

I've been searching but couldn't find the answer so far

Any help would be greatly appreciated!!!

Cheers

Justin

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To post to this group, send email to trac-us...@googlegroups.com.
To unsubscribe from this group, send email to 
trac-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/trac-users?hl=en.