Show More
@@ -471,20 +471,33 b' class dirstate(object):' | |||
|
471 | 471 | lookup, modified, added, unknown, ignored = [], [], [], [], [] |
|
472 | 472 | removed, deleted, clean = [], [], [] |
|
473 | 473 | |
|
474 | _join = self._join | |
|
475 | lstat = os.lstat | |
|
476 | cmap = self._copymap | |
|
477 | dmap = self._map | |
|
478 | ladd = lookup.append | |
|
479 | madd = modified.append | |
|
480 | aadd = added.append | |
|
481 | uadd = unknown.append | |
|
482 | iadd = ignored.append | |
|
483 | radd = removed.append | |
|
484 | dadd = deleted.append | |
|
485 | cadd = clean.append | |
|
486 | ||
|
474 | 487 | for src, fn, st in self.statwalk(files, match, ignored=list_ignored): |
|
475 |
|
|
|
476 |
type_, mode, size, time = |
|
|
477 |
e |
|
|
488 | if fn in dmap: | |
|
489 | type_, mode, size, time = dmap[fn] | |
|
490 | else: | |
|
478 | 491 | if list_ignored and self._ignore(fn): |
|
479 |
i |
|
|
492 | iadd(fn) | |
|
480 | 493 | else: |
|
481 |
u |
|
|
494 | uadd(fn) | |
|
482 | 495 | continue |
|
483 | 496 | if src == 'm': |
|
484 | 497 | nonexistent = True |
|
485 | 498 | if not st: |
|
486 | 499 | try: |
|
487 |
st = |
|
|
500 | st = lstat(_join(fn)) | |
|
488 | 501 | except OSError, inst: |
|
489 | 502 | if inst.errno != errno.ENOENT: |
|
490 | 503 | raise |
@@ -495,26 +508,26 b' class dirstate(object):' | |||
|
495 | 508 | # XXX: what to do with file no longer present in the fs |
|
496 | 509 | # who are not removed in the dirstate ? |
|
497 | 510 | if nonexistent and type_ in "nm": |
|
498 |
d |
|
|
511 | dadd(fn) | |
|
499 | 512 | continue |
|
500 | 513 | # check the common case first |
|
501 | 514 | if type_ == 'n': |
|
502 | 515 | if not st: |
|
503 |
st = |
|
|
516 | st = lstat(_join(fn)) | |
|
504 | 517 | if (size >= 0 and (size != st.st_size |
|
505 | 518 | or (mode ^ st.st_mode) & 0100) |
|
506 | 519 | or fn in self._copymap): |
|
507 |
m |
|
|
520 | madd(fn) | |
|
508 | 521 | elif time != int(st.st_mtime): |
|
509 |
l |
|
|
522 | ladd(fn) | |
|
510 | 523 | elif list_clean: |
|
511 |
c |
|
|
524 | cadd(fn) | |
|
512 | 525 | elif type_ == 'm': |
|
513 |
m |
|
|
526 | madd(fn) | |
|
514 | 527 | elif type_ == 'a': |
|
515 |
a |
|
|
528 | aadd(fn) | |
|
516 | 529 | elif type_ == 'r': |
|
517 |
r |
|
|
530 | radd(fn) | |
|
518 | 531 | |
|
519 | 532 | return (lookup, modified, added, removed, deleted, unknown, ignored, |
|
520 | 533 | clean) |
General Comments 0
You need to be logged in to leave comments.
Login now