Mercurial > hg
changeset 2564:55e592041076
Add context helper functions to localrepo
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Wed, 28 Jun 2006 17:08:10 -0500 |
parents | 482c524dd9ab |
children | 7f78ca2c7977 |
files | mercurial/localrepo.py |
diffstat | 1 files changed, 9 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/localrepo.py Wed Jun 28 17:07:46 2006 -0500 +++ b/mercurial/localrepo.py Wed Jun 28 17:08:10 2006 -0500 @@ -9,7 +9,7 @@ from i18n import gettext as _ from demandload import * demandload(globals(), "appendfile changegroup") -demandload(globals(), "changelog dirstate filelog manifest repo") +demandload(globals(), "changelog dirstate filelog manifest repo context") demandload(globals(), "re lock transaction tempfile stat mdiff errno ui") demandload(globals(), "os revlog util") @@ -257,6 +257,14 @@ f = f[1:] return filelog.filelog(self.opener, f, self.revlogversion) + def changectx(self, changeid): + return context.changectx(self, changeid) + + def filectx(self, path, changeid=None, fileid=None): + """changeid can be a changeset revision, node, or tag. + fileid can be a file revision or node.""" + return context.filectx(self, path, changeid, fileid) + def getcwd(self): return self.dirstate.getcwd()