##// END OF EJS Templates
win32text: drop the `changing_parents` context in revert upgrade...
marmoute -
r50908:05a2f65c default
parent child Browse files
Show More
@@ -216,24 +216,23 b' def reposetup(ui, repo):'
216 216 def wrap_revert(orig, repo, ctx, names, uipathfn, actions, *args, **kwargs):
217 217 # reset dirstate cache for file we touch
218 218 ds = repo.dirstate
219 with ds.changing_parents(repo):
220 for filename in actions[b'revert'][0]:
221 entry = ds.get_entry(filename)
222 if entry is not None:
223 if entry.p1_tracked:
224 # If we revert the file, it is possibly dirty. However,
225 # this extension meddle with the file content and therefore
226 # its size. As a result, we cannot simply call
227 # `dirstate.set_possibly_dirty` as it will not affet the
228 # expected size of the file.
229 #
230 # At least, now, the quirk is properly documented.
231 ds.hacky_extension_update_file(
232 filename,
233 entry.tracked,
234 p1_tracked=True,
235 p2_info=entry.p2_info,
236 )
219 for filename in actions[b'revert'][0]:
220 entry = ds.get_entry(filename)
221 if entry is not None:
222 if entry.p1_tracked:
223 # If we revert the file, it is possibly dirty. However,
224 # this extension meddle with the file content and therefore
225 # its size. As a result, we cannot simply call
226 # `dirstate.set_possibly_dirty` as it will not affet the
227 # expected size of the file.
228 #
229 # At least, now, the quirk is properly documented.
230 ds.hacky_extension_update_file(
231 filename,
232 entry.tracked,
233 p1_tracked=True,
234 p2_info=entry.p2_info,
235 )
237 236 return orig(repo, ctx, names, uipathfn, actions, *args, **kwargs)
238 237
239 238
General Comments 0
You need to be logged in to leave comments. Login now