comparison rust/hg-core/src/dirstate/entry.rs @ 48149:6ac2b417d5d7

dirstate-item: directly use `p2_info` in `v1_size` This is simpler. Differential Revision: https://phab.mercurial-scm.org/D11593
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Fri, 01 Oct 2021 03:24:57 +0200
parents 21542d4cb568
children d71feb05d5b6
comparison
equal deleted inserted replaced
48148:e2753a7acfa7 48149:6ac2b417d5d7
248 } 248 }
249 if self.removed() 249 if self.removed()
250 && self.flags.contains(Flags::P1_TRACKED | Flags::P2_INFO) 250 && self.flags.contains(Flags::P1_TRACKED | Flags::P2_INFO)
251 { 251 {
252 SIZE_NON_NORMAL 252 SIZE_NON_NORMAL
253 } else if self.removed() && self.flags.contains(Flags::P2_INFO) { 253 } else if self.flags.contains(Flags::P2_INFO) {
254 SIZE_FROM_OTHER_PARENT 254 SIZE_FROM_OTHER_PARENT
255 } else if self.removed() { 255 } else if self.removed() {
256 0 256 0
257 } else if self.merged() {
258 SIZE_FROM_OTHER_PARENT
259 } else if self.added() { 257 } else if self.added() {
260 SIZE_NON_NORMAL 258 SIZE_NON_NORMAL
261 } else if self.from_p2() {
262 SIZE_FROM_OTHER_PARENT
263 } else if let Some((_mode, size)) = self.mode_size { 259 } else if let Some((_mode, size)) = self.mode_size {
264 size 260 size
265 } else { 261 } else {
266 SIZE_NON_NORMAL 262 SIZE_NON_NORMAL
267 } 263 }