Mercurial > hg
comparison mercurial/dirstatemap.py @ 48108:d4e715d2be0b
dirstate: remove a update_file's special case for tracked file with p2 data
This case was fishy and can be dealt with by passing more accurate data a higher
level.
This clarify the API and prepare for a larger rework of the data we feeds to
the dirstate.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Thu, 30 Sep 2021 18:00:39 +0200 |
parents | bf8837e3d7ce |
children | 2c2788ce0257 |
comparison
equal
deleted
inserted
replaced
48107:dcd97b082b3b | 48108:d4e715d2be0b |
---|---|
224 elif not (p1_tracked or p2_tracked) and wc_tracked: | 224 elif not (p1_tracked or p2_tracked) and wc_tracked: |
225 pass # file is added, nothing special to adjust | 225 pass # file is added, nothing special to adjust |
226 elif (p1_tracked or p2_tracked) and not wc_tracked: | 226 elif (p1_tracked or p2_tracked) and not wc_tracked: |
227 pass | 227 pass |
228 elif clean_p2 and wc_tracked: | 228 elif clean_p2 and wc_tracked: |
229 if p1_tracked or self.get(filename) is not None: | 229 pass |
230 # XXX the `self.get` call is catching some case in | |
231 # `test-merge-remove.t` where the file is tracked in p1, the | |
232 # p1_tracked argument is False. | |
233 # | |
234 # In addition, this seems to be a case where the file is marked | |
235 # as merged without actually being the result of a merge | |
236 # action. So thing are not ideal here. | |
237 merged = True | |
238 clean_p2 = False | |
239 elif not p1_tracked and p2_tracked and wc_tracked: | 230 elif not p1_tracked and p2_tracked and wc_tracked: |
240 clean_p2 = True | 231 clean_p2 = True |
241 elif possibly_dirty: | 232 elif possibly_dirty: |
242 pass | 233 pass |
243 elif wc_tracked: | 234 elif wc_tracked: |