mercurial/ui.py
changeset 27275 f2cd240f2f7c
parent 27274 82910fdc216f
child 27408 2916ebaef312
equal deleted inserted replaced
27274:82910fdc216f 27275:f2cd240f2f7c
  1058             curframe = inspect.currentframe()
  1058             curframe = inspect.currentframe()
  1059             calframe = inspect.getouterframes(curframe, 2)
  1059             calframe = inspect.getouterframes(curframe, 2)
  1060             self.write_err('%s at: %s:%s (%s)\n'
  1060             self.write_err('%s at: %s:%s (%s)\n'
  1061                            % ((msg,) + calframe[stacklevel][1:4]))
  1061                            % ((msg,) + calframe[stacklevel][1:4]))
  1062 
  1062 
       
  1063     def deprecwarn(self, msg, version):
       
  1064         """issue a deprecation warning
       
  1065 
       
  1066         - msg: message explaining what is deprecated and how to upgrade,
       
  1067         - version: last version where the API will be supported,
       
  1068         """
       
  1069         msg += ("\n(compatibility will be dropped after Mercurial-%s,"
       
  1070                 " update your code.)") % version
       
  1071         self.develwarn(msg, stacklevel=2)
       
  1072 
  1063 class paths(dict):
  1073 class paths(dict):
  1064     """Represents a collection of paths and their configs.
  1074     """Represents a collection of paths and their configs.
  1065 
  1075 
  1066     Data is initially derived from ui instances and the config files they have
  1076     Data is initially derived from ui instances and the config files they have
  1067     loaded.
  1077     loaded.