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 |
|
|
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 |
|
|
|
232 |
|
|
|
233 |
|
|
|
234 |
|
|
|
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