comparison mercurial/localrepo.py @ 29075:3f0177d2b8fb

localrepo: jettison parents() method per deprecation policy (API)
author Augie Fackler <augie@google.com>
date Wed, 04 May 2016 21:02:03 -0400
parents 032c4c2f802a
children b207653ada10
comparison
equal deleted inserted replaced
29074:e7c679738503 29075:3f0177d2b8fb
879 def file(self, f): 879 def file(self, f):
880 if f[0] == '/': 880 if f[0] == '/':
881 f = f[1:] 881 f = f[1:]
882 return filelog.filelog(self.svfs, f) 882 return filelog.filelog(self.svfs, f)
883 883
884 def parents(self, changeid=None):
885 '''get list of changectxs for parents of changeid'''
886 msg = 'repo.parents() is deprecated, use repo[%r].parents()' % changeid
887 self.ui.deprecwarn(msg, '3.7')
888 return self[changeid].parents()
889
890 def changectx(self, changeid): 884 def changectx(self, changeid):
891 return self[changeid] 885 return self[changeid]
892 886
893 def setparents(self, p1, p2=nullid): 887 def setparents(self, p1, p2=nullid):
894 self.dirstate.beginparentchange() 888 self.dirstate.beginparentchange()