##// END OF EJS Templates
context: preserve changeset in filectx if we have one...
Maxim Dounin -
r5810:124577de default
parent child Browse files
Show More
@@ -159,12 +159,11 b' class filectx(object):'
159 if filelog:
159 if filelog:
160 self._filelog = filelog
160 self._filelog = filelog
161
161
162 if fileid is None:
162 if changeid is not None:
163 if changectx is None:
163 self._changeid = changeid
164 self._changeid = changeid
164 if changectx is not None:
165 else:
165 self._changectx = changectx
166 self._changectx = changectx
166 if fileid is not None:
167 else:
168 self._fileid = fileid
167 self._fileid = fileid
169
168
170 def __getattr__(self, name):
169 def __getattr__(self, name):
@@ -175,7 +174,10 b' class filectx(object):'
175 self._filelog = self._repo.file(self._path)
174 self._filelog = self._repo.file(self._path)
176 return self._filelog
175 return self._filelog
177 elif name == '_changeid':
176 elif name == '_changeid':
178 self._changeid = self._filelog.linkrev(self._filenode)
177 if '_changectx' in self.__dict__:
178 self._changeid = self._changectx.rev()
179 else:
180 self._changeid = self._filelog.linkrev(self._filenode)
179 return self._changeid
181 return self._changeid
180 elif name == '_filenode':
182 elif name == '_filenode':
181 if '_fileid' in self.__dict__:
183 if '_fileid' in self.__dict__:
@@ -229,6 +231,8 b' class filectx(object):'
229 def rev(self):
231 def rev(self):
230 if '_changectx' in self.__dict__:
232 if '_changectx' in self.__dict__:
231 return self._changectx.rev()
233 return self._changectx.rev()
234 if '_changeid' in self.__dict__:
235 return self._changectx.rev()
232 return self._filelog.linkrev(self._filenode)
236 return self._filelog.linkrev(self._filenode)
233
237
234 def node(self): return self._changectx.node()
238 def node(self): return self._changectx.node()
@@ -45,7 +45,7 b' resolving manifests'
45 1: remote moved to 1a -> m
45 1: remote moved to 1a -> m
46 copying 1 to 1a
46 copying 1 to 1a
47 merging 1 and 1a
47 merging 1 and 1a
48 my 1@746e9549ea96+ other 1a@2f8037f47a5c ancestor 1@81f4b099af3d
48 my 1@746e9549ea96+ other 1a@ac7575e3c052 ancestor 1@81f4b099af3d
49 removing 1
49 removing 1
50 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
50 0 files updated, 1 files merged, 0 files removed, 0 files unresolved
51 (branch merge, don't forget to commit)
51 (branch merge, don't forget to commit)
General Comments 0
You need to be logged in to leave comments. Login now