#11142: clean up sage/misc/hg.py
-----------------------------------+----------------------------------------
   Reporter:  jhpalmieri           |          Owner:  jason        
       Type:  enhancement          |         Status:  needs_work   
   Priority:  minor                |      Milestone:  sage-4.7.2   
  Component:  misc                 |       Keywords:  sd31         
Work_issues:                       |       Upstream:  N/A          
   Reviewer:  Karl-Dieter Crisman  |         Author:  John Palmieri
     Merged:                       |   Dependencies:  #10594       
-----------------------------------+----------------------------------------
Changes (by jdemeyer):

  * status:  positive_review => needs_work


Comment:

 I get several doctest failures of the form
 {{{
 sage -t  -force_lib devel/sage/sage/misc/hg.py
 **********************************************************************
 File "/mnt/usb1/scratch/jdemeyer/merger/sage-4.7.2.alpha2/devel/sage-
 main/sage/misc/hg.py", line 783:
     sage: hg_sage.rename('sage/misc/hg.py', 'sage/misc/hgnew.py', options
 ='--dry-run')
 Expected:
     Moving sage/misc/hg.py --> sage/misc/hgnew.py
     cd ... && hg mv --dry-run "sage/misc/hg.py" "sage/misc/hgnew.py"
 Got:
     Moving sage/misc/hg.py --> sage/misc/hgnew.py
     <BLANKLINE>
     WARNING:
     Make sure to create a ~/.hgrc file:
     ----------------------------------------------------------------------
     [ui]
     username = William Stein <[email protected]>
     ----------------------------------------------------------------------
     <BLANKLINE>
     <BLANKLINE>
     cd "/mnt/usb1/scratch/jdemeyer/merger/sage-4.7.2.alpha2/devel/sage" &&
 hg mv --dry-run "sage/misc/hg.py" "sage/misc/hgnew.py"
 **********************************************************************
 }}}

 I believe the doctests should be written in such a way that they do not
 require a `.hgrc` file.  Also, are the messages
 {{{
 Adding file module_list.pyc
 cd "/mnt/usb1/scratch/jdemeyer/merger/sage-4.7.2.alpha2/devel/sage" && hg
 mv --dry-run "sage/misc/hg.py" "sage/misc/hgnew.py"
 }}}
 and
 {{{
 WARNING:
 Make sure to create a ~/.hgrc file:
 ----------------------------------------------------------------------
 [ui]
 username = William Stein <[email protected]>
 ----------------------------------------------------------------------
 }}}
 written to `stdout` or `stderr`?  The second one certainly ''should'' be
 written to `stderr`.  If the first is written to `stdout`, the problem can
 be solved by capturing only `stdout`.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11142#comment:23>
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.

Reply via email to