##// END OF EJS Templates
context: create a filectxt with filelog reuse
Benoit Boissinot -
r3966:b4eaa68d default
parent child Browse files
Show More
@@ -93,11 +93,12 b' class changectx(object):'
93
93
94 return node
94 return node
95
95
96 def filectx(self, path, fileid=None):
96 def filectx(self, path, fileid=None, filelog=None):
97 """get a file context from this changeset"""
97 """get a file context from this changeset"""
98 if fileid is None:
98 if fileid is None:
99 fileid = self.filenode(path)
99 fileid = self.filenode(path)
100 return filectx(self._repo, path, fileid=fileid, changectx=self)
100 return filectx(self._repo, path, fileid=fileid,
101 changectx=self, filelog=filelog)
101
102
102 def filectxs(self):
103 def filectxs(self):
103 """generate a file context for each file in this changeset's
104 """generate a file context for each file in this changeset's
@@ -422,9 +423,10 b' class workingctx(changectx):'
422 def children(self):
423 def children(self):
423 return []
424 return []
424
425
425 def filectx(self, path):
426 def filectx(self, path, filelog=None):
426 """get a file context from the working directory"""
427 """get a file context from the working directory"""
427 return workingfilectx(self._repo, path, workingctx=self)
428 return workingfilectx(self._repo, path, workingctx=self,
429 filelog=filelog)
428
430
429 def ancestor(self, c2):
431 def ancestor(self, c2):
430 """return the ancestor context of self and c2"""
432 """return the ancestor context of self and c2"""
General Comments 0
You need to be logged in to leave comments. Login now