Show More
@@ -83,7 +83,7 b' class changectx(object):' | |||||
83 | """get a file context from this changeset""" |
|
83 | """get a file context from this changeset""" | |
84 | if fileid is None: |
|
84 | if fileid is None: | |
85 | fileid = self.filenode(path) |
|
85 | fileid = self.filenode(path) | |
86 | return filectx(self._repo, path, fileid=fileid) |
|
86 | return filectx(self._repo, path, fileid=fileid, changectx=self) | |
87 |
|
87 | |||
88 | def filectxs(self): |
|
88 | def filectxs(self): | |
89 | """generate a file context for each file in this changeset's |
|
89 | """generate a file context for each file in this changeset's | |
@@ -104,7 +104,8 b' class changectx(object):' | |||||
104 | class filectx(object): |
|
104 | class filectx(object): | |
105 | """A filecontext object makes access to data related to a particular |
|
105 | """A filecontext object makes access to data related to a particular | |
106 | filerevision convenient.""" |
|
106 | filerevision convenient.""" | |
107 |
def __init__(self, repo, path, changeid=None, fileid=None, |
|
107 | def __init__(self, repo, path, changeid=None, fileid=None, | |
|
108 | filelog=None, changectx=None): | |||
108 | """changeid can be a changeset revision, node, or tag. |
|
109 | """changeid can be a changeset revision, node, or tag. | |
109 | fileid can be a file revision or node.""" |
|
110 | fileid can be a file revision or node.""" | |
110 | self._repo = repo |
|
111 | self._repo = repo | |
@@ -114,6 +115,9 b' class filectx(object):' | |||||
114 |
|
115 | |||
115 | if filelog: |
|
116 | if filelog: | |
116 | self._filelog = filelog |
|
117 | self._filelog = filelog | |
|
118 | if changectx: | |||
|
119 | self._changectx = changectx | |||
|
120 | self._changeid = changectx.node() | |||
117 |
|
121 | |||
118 | if fileid is None: |
|
122 | if fileid is None: | |
119 | self._changeid = changeid |
|
123 | self._changeid = changeid |
General Comments 0
You need to be logged in to leave comments.
Login now