hgext/win32text.py
changeset 50012 d68b71256c33
parent 49960 7a8bfc05b691
child 50013 05a2f65c9e86
--- a/hgext/win32text.py	Wed Feb 15 00:26:08 2023 +0100
+++ b/hgext/win32text.py	Wed Feb 15 00:29:39 2023 +0100
@@ -221,7 +221,14 @@
             entry = ds.get_entry(filename)
             if entry is not None:
                 if entry.p1_tracked:
-                    ds.update_file(
+                    # If we revert the file, it is possibly dirty. However,
+                    # this extension meddle with the file content and therefore
+                    # its size. As a result, we cannot simply call
+                    # `dirstate.set_possibly_dirty` as it will not affet the
+                    # expected size of the file.
+                    #
+                    # At least, now, the quirk is properly documented.
+                    ds.hacky_extension_update_file(
                         filename,
                         entry.tracked,
                         p1_tracked=True,