Mercurial > public > mercurial-scm > hg
comparison mercurial/localrepo.py @ 27277:07ae7e8c8ac9
localrepo: reinstate localrepo.parents with a deprecation warning
The function was dropped in 3fe8cb40c9c5. This API drop brokes three of my
extensions including some critical to my workflow like tortoisehg. Lets mark
this API for death and give people time to fix their code.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Sat, 05 Dec 2015 23:14:49 -0800 |
parents | dfb836a31b61 |
children | 42aa0e570eaa |
comparison
equal
deleted
inserted
replaced
27276:38024b75241a | 27277:07ae7e8c8ac9 |
---|---|
849 def file(self, f): | 849 def file(self, f): |
850 if f[0] == '/': | 850 if f[0] == '/': |
851 f = f[1:] | 851 f = f[1:] |
852 return filelog.filelog(self.svfs, f) | 852 return filelog.filelog(self.svfs, f) |
853 | 853 |
854 def parents(self, changeid=None): | |
855 '''get list of changectxs for parents of changeid''' | |
856 msg = 'repo.parents() is deprecated, use repo[%r].parents()' % changeid | |
857 self.ui.deprecwarn(msg, '3.7') | |
858 return self[changeid].parents() | |
859 | |
854 def changectx(self, changeid): | 860 def changectx(self, changeid): |
855 return self[changeid] | 861 return self[changeid] |
856 | 862 |
857 def setparents(self, p1, p2=nullid): | 863 def setparents(self, p1, p2=nullid): |
858 self.dirstate.beginparentchange() | 864 self.dirstate.beginparentchange() |