Mercurial > public > mercurial-scm > hg-stable
diff 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 |
line wrap: on
line diff
--- a/mercurial/localrepo.py Sat Dec 05 23:34:07 2015 -0800 +++ b/mercurial/localrepo.py Sat Dec 05 23:14:49 2015 -0800 @@ -851,6 +851,12 @@ f = f[1:] return filelog.filelog(self.svfs, f) + def parents(self, changeid=None): + '''get list of changectxs for parents of changeid''' + msg = 'repo.parents() is deprecated, use repo[%r].parents()' % changeid + self.ui.deprecwarn(msg, '3.7') + return self[changeid].parents() + def changectx(self, changeid): return self[changeid]