Re: [Python-Dev] Impaired Usability of the Mercurial Source Viewer

2011-04-01 Thread Dirkjan Ochtman
On Fri, Apr 1, 2011 at 02:30, Antoine Pitrou solip...@pitrou.net wrote:
 This is something you need to discuss with the Mercurial project.
 See http://mercurial.selenic.com/bts/ and
 http://mercurial.selenic.com/wiki/ContributingChanges

There's a lot you can change by just starting a new set of templates
(with Mercurial's templating language).

I even wrote an extension that'll let you use Jinja for the
templating, so it shouldn't be hard to make changes here -- changes
like Raymond proposes most certainly don't require code changes inside
Mercurial.

Cheers,

Dirkjan
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Impaired Usability of the Mercurial Source Viewer

2011-04-01 Thread Georg Brandl
Am 01.04.2011 03:44, schrieb Benjamin Peterson:
 2011/3/31 Raymond Hettinger raymond.hettin...@gmail.com:

 On Mar 31, 2011, at 6:28 PM, Victor Stinner wrote:

 Le 01/04/2011 01:15, Raymond Hettinger a écrit :

 The Hg source viewer needs to be tweaked to improve its usability.

 What we've got now is a step backwards from the previous svn viewer.

 Looking at http://hg.python.org/cpython/file/default/Lib/linecache.py for
 example,

 there are two issues.   1) the code cannot be cut-and-pasted because the

 line numbers are commingled with the source text.  2) the code is hard

 to read because of the alternating white and gray bars.

 You can use mirrors like:
 https://bitbucket.org/mirror/cpython/

 On Bitbucket, line numbers are displayed, but you can copy/paste code
 without the line number. And the background is just white. For example:
 https://bitbucket.org/mirror/cpython/src/3558eecd84f0/Modules/faulthandler.c


 That's *way* better:
   https://bitbucket.org/mirror/cpython/src/3558eecd84f0/Lib/linecache.py
 Why can't we have that for our primary source viewer.
 
 Because it's closed source.

There are of course other Mercurial-web frontends that are free.  hgweb is just
the first choice because it's included.  (Just like Tkinter.)

For example, I was recently pointed to RhodeCode
(http://pypi.python.org/pypi/RhodeCode/), but I haven't had a closer look yet.

Georg

___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Impaired Usability of the Mercurial Source Viewer

2011-04-01 Thread Nick Coghlan
On Fri, Apr 1, 2011 at 8:42 PM, Georg Brandl g.bra...@gmx.net wrote:
 There are of course other Mercurial-web frontends that are free.  hgweb is 
 just
 the first choice because it's included.  (Just like Tkinter.)

 For example, I was recently pointed to RhodeCode
 (http://pypi.python.org/pypi/RhodeCode/), but I haven't had a closer look yet.

If you find one that will stay on the symbolic tip of a branch while
browsing, instead of hard linking to the *current* tip the way hgweb
does, that would be really nice :)

Cheers,
Nick.

-- 
Nick Coghlan   |   ncogh...@gmail.com   |   Brisbane, Australia
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Impaired Usability of the Mercurial Source Viewer

2011-04-01 Thread Martin v. Löwis
 That's *way* better:
 
   https://bitbucket.org/mirror/cpython/src/3558eecd84f0/Lib/linecache.py
 
 Why can't we have that for our primary source viewer.

Would you like to install this, or something else, or change the
templates? If so, please let me know so I can give you access to
dinsdale.

Regards,
Martin
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Impaired Usability of the Mercurial Source Viewer

2011-04-01 Thread Raymond Hettinger

On Apr 1, 2011, at 12:40 PM, Martin v. Löwis wrote:

 That's *way* better:
 
  https://bitbucket.org/mirror/cpython/src/3558eecd84f0/Lib/linecache.py
 
 Why can't we have that for our primary source viewer.
 
 Would you like to install this, or something else, or change the
 templates? If so, please let me know so I can give you access to
 dinsdale.


Yes please.


Raymond

___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


[Python-Dev] Impaired Usability of the Mercurial Source Viewer

2011-03-31 Thread Raymond Hettinger
The Hg source viewer needs to be tweaked to improve its usability.
What we've got now is a step backwards from the previous svn viewer.

Looking at http://hg.python.org/cpython/file/default/Lib/linecache.py for 
example,
there are two issues.   1) the code cannot be cut-and-pasted because the
line numbers are commingled with the source text.  2) the code is hard
to read because of the alternating white and gray bars.

Contrast that to the more typical, beautiful presentations with a solid
background and the ability to cut-and-paste without grabbing line
numbers:

  http://dpaste.org/qyKv/

  
http://code.activestate.com/recipes/577629-namedtupleabc-abstract-base-class-mix-in-for-named/


Raymond


P.S.  The old svn viewer worked great (looked good and could be cut),
but that was changed just before the Mercurial switchover (the fonts
changed, the line numbering code changed, and the leading changed),
so it is not a good comparison anymore.___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Impaired Usability of the Mercurial Source Viewer

2011-03-31 Thread Terry Reedy

On 3/31/2011 7:15 PM, Raymond Hettinger wrote:

The Hg source viewer needs to be tweaked to improve its usability.
What we've got now is a step backwards from the previous svn viewer.

Looking at http://hg.python.org/cpython/file/default/Lib/linecache.py
for example,
there are two issues. 1) the code cannot be cut-and-pasted because the
line numbers are commingled with the source text. 2) the code is hard
to read because of the alternating white and gray bars.

Contrast that to the more typical, beautiful presentations with a solid
background and the ability to cut-and-paste without grabbing line
numbers:


I complete agree with this. The bars are for super long lines, 
especially of data, as with 132 char Fortran output on old ibm printers. 
Even then, the bars were 3 lines wide. 80- char text lines do not need them.



--
Terry Jan Reedy

___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Impaired Usability of the Mercurial Source Viewer

2011-03-31 Thread Antoine Pitrou
On Thu, 31 Mar 2011 16:15:48 -0700
Raymond Hettinger raymond.hettin...@gmail.com wrote:
 The Hg source viewer needs to be tweaked to improve its usability.
 What we've got now is a step backwards from the previous svn viewer.
 
 Looking at http://hg.python.org/cpython/file/default/Lib/linecache.py for 
 example,
 there are two issues.   1) the code cannot be cut-and-pasted because the
 line numbers are commingled with the source text.  2) the code is hard
 to read because of the alternating white and gray bars.
 
 Contrast that to the more typical, beautiful presentations with a solid
 background and the ability to cut-and-paste without grabbing line
 numbers:

This is something you need to discuss with the Mercurial project.
See http://mercurial.selenic.com/bts/ and
http://mercurial.selenic.com/wiki/ContributingChanges

The advantage of Mercurial over SVN is that it's written in Python ;)

Regards

Antoine.


___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Impaired Usability of the Mercurial Source Viewer

2011-03-31 Thread Raymond Hettinger

On Mar 31, 2011, at 5:30 PM, Antoine Pitrou wrote:

 On Thu, 31 Mar 2011 16:15:48 -0700
 Raymond Hettinger raymond.hettin...@gmail.com wrote:
 The Hg source viewer needs to be tweaked to improve its usability.
 What we've got now is a step backwards from the previous svn viewer.
 
 Looking at http://hg.python.org/cpython/file/default/Lib/linecache.py for 
 example,
 there are two issues.   1) the code cannot be cut-and-pasted because the
 line numbers are commingled with the source text.  2) the code is hard
 to read because of the alternating white and gray bars.
 
 Contrast that to the more typical, beautiful presentations with a solid
 background and the ability to cut-and-paste without grabbing line
 numbers:
 
 This is something you need to discuss with the Mercurial project.
 See http://mercurial.selenic.com/bts/ and
 http://mercurial.selenic.com/wiki/ContributingChanges

Are you saying that our official code viewer isn't configurable
without getting a change through the Hg project itself?

Does that mean that we have have to live with it in its crippled form?


Raymond

___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Impaired Usability of the Mercurial Source Viewer

2011-03-31 Thread Antoine Pitrou
Le jeudi 31 mars 2011 à 17:46 -0700, Raymond Hettinger a écrit :
 On Mar 31, 2011, at 5:30 PM, Antoine Pitrou wrote:
 
  On Thu, 31 Mar 2011 16:15:48 -0700
  Raymond Hettinger raymond.hettin...@gmail.com wrote:
  The Hg source viewer needs to be tweaked to improve its usability.
  What we've got now is a step backwards from the previous svn viewer.
  
  Looking at http://hg.python.org/cpython/file/default/Lib/linecache.py for 
  example,
  there are two issues.   1) the code cannot be cut-and-pasted because the
  line numbers are commingled with the source text.  2) the code is hard
  to read because of the alternating white and gray bars.
  
  Contrast that to the more typical, beautiful presentations with a solid
  background and the ability to cut-and-paste without grabbing line
  numbers:
  
  This is something you need to discuss with the Mercurial project.
  See http://mercurial.selenic.com/bts/ and
  http://mercurial.selenic.com/wiki/ContributingChanges
 
 Are you saying that our official code viewer isn't configurable
 without getting a change through the Hg project itself?

Well, it is something that is configurable through patching.
You might want to keep the patch private to hg.python.org, of course.
But perhaps you can also convince Mercurial devs that they should it
themselves, if you are persuasive enough ;)

 Does that mean that we have have to live with it in its crippled form?

Well, I'm sure we have lived with lots of things in crippled form
along the years, including SVN itself. I don't think the source code
viewer is impacting anybody's ability to contribute. At worse you can
click the raw link on the left and get a nice clean view of the source
in your editor of choice.

Regards

Antoine.


___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Impaired Usability of the Mercurial Source Viewer

2011-03-31 Thread Raymond Hettinger

On Mar 31, 2011, at 5:55 PM, Antoine Pitrou wrote:

 Le jeudi 31 mars 2011 à 17:46 -0700, Raymond Hettinger a écrit :
 On Mar 31, 2011, at 5:30 PM, Antoine Pitrou wrote:
 
 On Thu, 31 Mar 2011 16:15:48 -0700
 Raymond Hettinger raymond.hettin...@gmail.com wrote:
 The Hg source viewer needs to be tweaked to improve its usability.
 What we've got now is a step backwards from the previous svn viewer.
 
 Looking at http://hg.python.org/cpython/file/default/Lib/linecache.py for 
 example,
 there are two issues.   1) the code cannot be cut-and-pasted because the
 line numbers are commingled with the source text.  2) the code is hard
 to read because of the alternating white and gray bars.
 
 Contrast that to the more typical, beautiful presentations with a solid
 background and the ability to cut-and-paste without grabbing line
 numbers:
 
 This is something you need to discuss with the Mercurial project.
 See http://mercurial.selenic.com/bts/ and
 http://mercurial.selenic.com/wiki/ContributingChanges
 
 Are you saying that our official code viewer isn't configurable
 without getting a change through the Hg project itself?
 
 Well, it is something that is configurable through patching.
 You might want to keep the patch private to hg.python.org, of course.
 But perhaps you can also convince Mercurial devs that they should it
 themselves, if you are persuasive enough ;)

Surely, we at least have control over our own CSS.
At http://hg.python.org/cpython/static/style-paper.css 
there are two lines that control the alternating bars:

.parity0 { background-color: #f0f0f0; }
.parity1 { background-color: white; }

One of those could be changed to match the other so that we
at can at least get a solid background.


Raymond___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Impaired Usability of the Mercurial Source Viewer

2011-03-31 Thread Victor Stinner

Le 01/04/2011 01:15, Raymond Hettinger a écrit :

The Hg source viewer needs to be tweaked to improve its usability.
What we've got now is a step backwards from the previous svn viewer.

Looking at 
http://hg.python.org/cpython/file/default/Lib/linecache.py for example,

there are two issues.   1) the code cannot be cut-and-pasted because the
line numbers are commingled with the source text.  2) the code is hard
to read because of the alternating white and gray bars.

You can use mirrors like:
https://bitbucket.org/mirror/cpython/

On Bitbucket, line numbers are displayed, but you can copy/paste code 
without the line number. And the background is just white. For example:

https://bitbucket.org/mirror/cpython/src/3558eecd84f0/Modules/faulthandler.c

Victor
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Impaired Usability of the Mercurial Source Viewer

2011-03-31 Thread Raymond Hettinger

On Mar 31, 2011, at 6:28 PM, Victor Stinner wrote:

 Le 01/04/2011 01:15, Raymond Hettinger a écrit :
 The Hg source viewer needs to be tweaked to improve its usability.
 What we've got now is a step backwards from the previous svn viewer.
 
 Looking at http://hg.python.org/cpython/file/default/Lib/linecache.py for 
 example,
 there are two issues.   1) the code cannot be cut-and-pasted because the
 line numbers are commingled with the source text.  2) the code is hard
 to read because of the alternating white and gray bars.
 You can use mirrors like:
 https://bitbucket.org/mirror/cpython/
 
 On Bitbucket, line numbers are displayed, but you can copy/paste code without 
 the line number. And the background is just white. For example:
 https://bitbucket.org/mirror/cpython/src/3558eecd84f0/Modules/faulthandler.c
 

That's *way* better:

  https://bitbucket.org/mirror/cpython/src/3558eecd84f0/Lib/linecache.py

Why can't we have that for our primary source viewer.


Raymond

___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Impaired Usability of the Mercurial Source Viewer

2011-03-31 Thread Benjamin Peterson
2011/3/31 Raymond Hettinger raymond.hettin...@gmail.com:

 On Mar 31, 2011, at 6:28 PM, Victor Stinner wrote:

 Le 01/04/2011 01:15, Raymond Hettinger a écrit :

 The Hg source viewer needs to be tweaked to improve its usability.

 What we've got now is a step backwards from the previous svn viewer.

 Looking at http://hg.python.org/cpython/file/default/Lib/linecache.py for
 example,

 there are two issues.   1) the code cannot be cut-and-pasted because the

 line numbers are commingled with the source text.  2) the code is hard

 to read because of the alternating white and gray bars.

 You can use mirrors like:
 https://bitbucket.org/mirror/cpython/

 On Bitbucket, line numbers are displayed, but you can copy/paste code
 without the line number. And the background is just white. For example:
 https://bitbucket.org/mirror/cpython/src/3558eecd84f0/Modules/faulthandler.c


 That's *way* better:
   https://bitbucket.org/mirror/cpython/src/3558eecd84f0/Lib/linecache.py
 Why can't we have that for our primary source viewer.

Because it's closed source.



-- 
Regards,
Benjamin
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Impaired Usability of the Mercurial Source Viewer

2011-03-31 Thread Scott Dial
On 3/31/2011 8:30 PM, Antoine Pitrou wrote:
 On Thu, 31 Mar 2011 16:15:48 -0700
 Raymond Hettinger raymond.hettin...@gmail.com wrote:
 The Hg source viewer needs to be tweaked to improve its usability.
 What we've got now is a step backwards from the previous svn viewer.

 Looking at http://hg.python.org/cpython/file/default/Lib/linecache.py for 
 example,
 there are two issues.   1) the code cannot be cut-and-pasted because the
 line numbers are commingled with the source text.  2) the code is hard
 to read because of the alternating white and gray bars.

 Contrast that to the more typical, beautiful presentations with a solid
 background and the ability to cut-and-paste without grabbing line
 numbers:
 
 This is something you need to discuss with the Mercurial project.
 See http://mercurial.selenic.com/bts/ and
 http://mercurial.selenic.com/wiki/ContributingChanges

The hgweb interface is templated. You can already change it via style
in the hgweb.conf. There are several styles already available in the
templates folder of the install, and you could provide your own if you
like too.

-- 
Scott Dial
sc...@scottdial.com
scod...@cs.indiana.edu
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Impaired Usability of the Mercurial Source Viewer

2011-03-31 Thread Guido van Rossum
Can someone give Raymond write access to the website already so he can
fix it himself?

On Thu, Mar 31, 2011 at 6:44 PM, Benjamin Peterson benja...@python.org wrote:
 2011/3/31 Raymond Hettinger raymond.hettin...@gmail.com:

 On Mar 31, 2011, at 6:28 PM, Victor Stinner wrote:

 Le 01/04/2011 01:15, Raymond Hettinger a écrit :

 The Hg source viewer needs to be tweaked to improve its usability.

 What we've got now is a step backwards from the previous svn viewer.

 Looking at http://hg.python.org/cpython/file/default/Lib/linecache.py for
 example,

 there are two issues.   1) the code cannot be cut-and-pasted because the

 line numbers are commingled with the source text.  2) the code is hard

 to read because of the alternating white and gray bars.

 You can use mirrors like:
 https://bitbucket.org/mirror/cpython/

 On Bitbucket, line numbers are displayed, but you can copy/paste code
 without the line number. And the background is just white. For example:
 https://bitbucket.org/mirror/cpython/src/3558eecd84f0/Modules/faulthandler.c


 That's *way* better:
   https://bitbucket.org/mirror/cpython/src/3558eecd84f0/Lib/linecache.py
 Why can't we have that for our primary source viewer.

 Because it's closed source.



 --
 Regards,
 Benjamin
 ___
 Python-Dev mailing list
 Python-Dev@python.org
 http://mail.python.org/mailman/listinfo/python-dev
 Unsubscribe: 
 http://mail.python.org/mailman/options/python-dev/guido%40python.org




-- 
--Guido van Rossum (python.org/~guido)
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Impaired Usability of the Mercurial Source Viewer

2011-03-31 Thread Antoine Pitrou
On Thu, 31 Mar 2011 18:20:53 -0700
Raymond Hettinger raymond.hettin...@gmail.com wrote:
 
 Surely, we at least have control over our own CSS.
 At http://hg.python.org/cpython/static/style-paper.css 
 there are two lines that control the alternating bars:
 
 .parity0 { background-color: #f0f0f0; }
 .parity1 { background-color: white; }
 
 One of those could be changed to match the other so that we
 at can at least get a solid background.

It also applies to the changelog and therefore would make the changelog
uglier (you had already asked me to make that change and I reverted it
after I tried it). The changelog is, IMHO, a bit more important than the
source viewer.

Impacting only the source viewer looks like it would require a patch
to the generation logic, although I could be mistaken.

Regards

Antoine.
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Impaired Usability of the Mercurial Source Viewer

2011-03-31 Thread Brendan Cully

On 2011-03-31, at 8:44 PM, Antoine Pitrou wrote:

 On Thu, 31 Mar 2011 18:20:53 -0700
 Raymond Hettinger raymond.hettin...@gmail.com wrote:
 
 Surely, we at least have control over our own CSS.
 At http://hg.python.org/cpython/static/style-paper.css 
 there are two lines that control the alternating bars:
 
 .parity0 { background-color: #f0f0f0; }
 .parity1 { background-color: white; }
 
 One of those could be changed to match the other so that we
 at can at least get a solid background.
 
 It also applies to the changelog and therefore would make the changelog
 uglier (you had already asked me to make that change and I reverted it
 after I tried it). The changelog is, IMHO, a bit more important than the
 source viewer.
 
 Impacting only the source viewer looks like it would require a patch
 to the generation logic, although I could be mistaken.

It shouldn't. You just need to change the template. The easiest thing to do is 
probably to copy the 'paper' style into a new directory, adjust your hgweb 
style parameter to point to it, and edit the 'fileline' entry in the 'map' file 
for your new style.

smime.p7s
Description: S/MIME cryptographic signature
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] Impaired Usability of the Mercurial Source Viewer

2011-03-31 Thread Glenn Linderman

On 3/31/2011 8:44 PM, Antoine Pitrou wrote:

Impacting only the source viewer looks like it would require a patch
to the generation logic, although I could be mistaken.


Is there not something in the context surrounding the changelog and the 
source viewer that is different?  And therefore something like



.something-specific-to-sourceviewer .parity0 { background-color: white; }


might be possible, to affect only one of them, and not the other?  That 
is the whole point of CSS, of course.
___
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com