#12058: Mercurial should not enable pager by default
------------------------+---------------------------------------------------
Reporter: jdemeyer | Owner: tbd
Type: defect | Status: needs_info
Priority: blocker | Milestone: sage-4.8
Component: packages | Keywords:
Work_issues: | Upstream: N/A
Reviewer: | Author:
Merged: | Dependencies:
------------------------+---------------------------------------------------
Comment(by jdemeyer):
Replying to [comment:4 kini]:
> Replying to [comment:3 jdemeyer]:
> > >Even if we did set a pager, it is set to only apply to the commands
annotate, cat, diff, log, glog, and qdiff. I question why one would need
to use these in a script in the first place, as they are by nature
interactive commands.
> > There are 6 occurences of `hg diff` in the `$SAGE_ROOT/local/bin/*`
scripts, so I disagree.
>
> Yes, and all six of them are mysterious and seem unnecessary to me.
Maybe you are right, but I do think that `hg diff` can be useful in
scripts sometimes, and `hg log` also.
> > True, but I think that is an orthogonal issue. Even if we do use
`HGPLAIN` in scripts, I think we still should not enable the pager
extension by default.
>
> Do you propose to also revert #11142, which explicitly uses the pager
extension?
No, I think using the pager within Sage is fine, analogously to how
"`is_prime?`" runs a pager. In Sage, there is no simple way to explicitly
run a pager (in the shell, it's easy to type "`hg diff |less`")
> Just to be clear, I think it was a bad idea, from an overall software
design perspective, to entangle Mercurial with Sage, create wrappers for
it in the Sage library, etc. in the first place. Maybe it was even a
mistake to bundle Mercurial at all.
I don't think it's a bad idea to bundle Mercurial. I actually like how
the Sage scripts like `sage-sdist` use Mercurial.
> But one of the main goals behind the way Sage is set up is to lower the
barrier of entry and make things easier for beginner developers, and I
think part of that goal involves making `sage -hg` as user-friendly as
possible.
Okay, agreed.
> But in that case most of #11121 doesn't make any sense anyway and most
of `$SAGE_LOCAL/etc/mercurial/hgrc` should be deleted (except the first
two lines). What do you think? I am fine with that, if that's what people
generally agree upon. In that case I would request that you start
rejecting patches that are not in git format, though, as that was the
original (and important) purpose of #11121. Luckily the patches on #11121
(i.e. not the commit in the spkg) mostly solve that problem.
Well, I think the "git" default is good to have, also the encoding being
utf-8 (through `HGENCODING` set in `sage-env`). I never argued about
that, only about the pager.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/12058#comment:5>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.