# HG changeset patch
# User J. H. Palmieri <palmieri@math.washington.edu>
# Date 1361118472 28800
# Node ID e4fefeefab9e0f8152380b258a55e2330310dadc
# Parent 5cae291c1c4401bca5b2a879db68c2c2f5851dfc
Print Mercurial branch of Sage library on startup (unless it's 'main')
diff git a/sage/misc/sage_extension.py b/sage/misc/sage_extension.py
a

b


390  390  self.init_inspector() 
391  391  self.init_line_transforms() 
392  392  self.register_interface_magics() 
 393  self.init_print_branch() 
393  394  
394  395  # right now, the shutdown hook calling quit_sage() doesn't 
395  396  # work when we run doctests that involve creating test shells. 
… 
… 

494  495  if sys.path[0]!='': 
495  496  sys.path.insert(0, '') 
496  497  
 498  def init_print_branch(self): 
 499  """ 
 500  Print the Mercurial branch, unless it's 'main'. 
 501  """ 
 502  branch = sage.misc.misc.branch_current_hg_notice(sage.misc.misc.branch_current_hg()) 
 503  if branch: 
 504  print branch 
 505  
497  506  # from http://stackoverflow.com/questions/4103773/efficientwayofhavingafunctiononlyexecuteonceinaloop 
498  507  from functools import wraps 
499  508  def run_once(f): 