##// END OF EJS Templates
dirstate-item: directly use `p2_info` in `v1_size`...
marmoute -
r48961:6ac2b417 default
parent child Browse files
Show More
@@ -363,16 +363,12 b' class DirstateItem(object):'
363 raise RuntimeError('untracked item')
363 raise RuntimeError('untracked item')
364 elif self.removed and self._p1_tracked and self._p2_info:
364 elif self.removed and self._p1_tracked and self._p2_info:
365 return NONNORMAL
365 return NONNORMAL
366 elif self.removed and self._p2_info:
366 elif self._p2_info:
367 return FROM_P2
367 return FROM_P2
368 elif self.removed:
368 elif self.removed:
369 return 0
369 return 0
370 elif self.merged:
371 return FROM_P2
372 elif self.added:
370 elif self.added:
373 return NONNORMAL
371 return NONNORMAL
374 elif self.from_p2:
375 return FROM_P2
376 elif self._size is None:
372 elif self._size is None:
377 return NONNORMAL
373 return NONNORMAL
378 else:
374 else:
@@ -250,16 +250,12 b' impl DirstateEntry {'
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 {
General Comments 0
You need to be logged in to leave comments. Login now