Ticket #14024: trac_14024_branches.patch

File trac_14024_branches.patch, 1.9 KB (added by vbraun, 9 years ago)

Initial patch

  • sage/misc/interpreter.py

    # HG changeset patch
    # User Volker Braun <vbraun@stp.dias.ie>
    # Date 1359386030 0
    # Node ID 6b327da33b2cd17d7185002d185325fe5dc88e42
    # Parent  e52aaa1873d77cda3faf2f36bb69d70ff54a5a84
    Remove the branch printing when starting a new ipython subshell
    
    diff --git a/sage/misc/interpreter.py b/sage/misc/interpreter.py
    a b  
    600600        <sage.misc.interpreter.SageInteractiveShell object at 0x...>
    601601    """
    602602    app = SageTerminalApp.instance(config=DEFAULT_SAGE_CONFIG)
    603     app.test_shell = True
    604603    if app.shell is None:
    605604        app.initialize()
    606605    return app.shell
  • sage/misc/misc.py

    diff --git a/sage/misc/misc.py b/sage/misc/misc.py
    a b  
    20742074
    20752075def branch_current_hg_notice(branch):
    20762076    r"""
    2077     Return a string describing the current branch and that the library
    2078     is being loaded.  This function is called in the
    2079     ``SAGE_ROOT/local/bin/ipy_profile_sage.py`` script.
     2077    Return a string describing the current branch.
     2078
     2079    Also, indicate that the library is being loaded.
    20802080   
    20812081    INPUT:
    20822082   
  • sage/misc/sage_extension.py

    diff --git a/sage/misc/sage_extension.py b/sage/misc/sage_extension.py
    a b  
    397397        # about a bad memory access in the pari_close() function.
    398398        #self.set_quit_hook()
    399399
    400         self.print_branch()
    401 
    402400        # These are things I'm not sure that we need to do anymore
    403401        #self.deprecated()
    404402
     
    429427            sage.all.quit_sage()
    430428        self.shell.set_hook('shutdown_hook', quit)
    431429
    432     def print_branch(self):
    433         """
    434         Print the branch we are on currently
    435         """
    436         from sage.misc.misc import branch_current_hg_notice, branch_current_hg
    437         branch = branch_current_hg_notice(branch_current_hg())
    438         if branch and not self.shell.test_shell:
    439             print branch
    440430
    441431    def init_environment(self):
    442432        """