##// END OF EJS Templates
Add context helper functions to localrepo
Matt Mackall -
r2564:55e59204 default
parent child Browse files
Show More
@@ -9,7 +9,7 b' from node import *'
9 from i18n import gettext as _
9 from i18n import gettext as _
10 from demandload import *
10 from demandload import *
11 demandload(globals(), "appendfile changegroup")
11 demandload(globals(), "appendfile changegroup")
12 demandload(globals(), "changelog dirstate filelog manifest repo")
12 demandload(globals(), "changelog dirstate filelog manifest repo context")
13 demandload(globals(), "re lock transaction tempfile stat mdiff errno ui")
13 demandload(globals(), "re lock transaction tempfile stat mdiff errno ui")
14 demandload(globals(), "os revlog util")
14 demandload(globals(), "os revlog util")
15
15
@@ -257,6 +257,14 b' class localrepository(object):'
257 f = f[1:]
257 f = f[1:]
258 return filelog.filelog(self.opener, f, self.revlogversion)
258 return filelog.filelog(self.opener, f, self.revlogversion)
259
259
260 def changectx(self, changeid):
261 return context.changectx(self, changeid)
262
263 def filectx(self, path, changeid=None, fileid=None):
264 """changeid can be a changeset revision, node, or tag.
265 fileid can be a file revision or node."""
266 return context.filectx(self, path, changeid, fileid)
267
260 def getcwd(self):
268 def getcwd(self):
261 return self.dirstate.getcwd()
269 return self.dirstate.getcwd()
262
270
General Comments 0
You need to be logged in to leave comments. Login now