799 dadd = deleted.append |
799 dadd = deleted.append |
800 cadd = clean.append |
800 cadd = clean.append |
801 mexact = match.exact |
801 mexact = match.exact |
802 dirignore = self._dirignore |
802 dirignore = self._dirignore |
803 checkexec = self._checkexec |
803 checkexec = self._checkexec |
804 checklink = self._checklink |
|
805 copymap = self._copymap |
804 copymap = self._copymap |
806 lastnormaltime = self._lastnormaltime |
805 lastnormaltime = self._lastnormaltime |
807 |
|
808 lnkkind = stat.S_IFLNK |
|
809 |
806 |
810 # We need to do full walks when either |
807 # We need to do full walks when either |
811 # - we're listing all clean files, or |
808 # - we're listing all clean files, or |
812 # - match.traversedir does something, because match.traversedir should |
809 # - match.traversedir does something, because match.traversedir should |
813 # be called for every dir in the working dir |
810 # be called for every dir in the working dir |
825 state, mode, size, time = dmap[fn] |
822 state, mode, size, time = dmap[fn] |
826 |
823 |
827 if not st and state in "nma": |
824 if not st and state in "nma": |
828 dadd(fn) |
825 dadd(fn) |
829 elif state == 'n': |
826 elif state == 'n': |
830 # The "mode & lnkkind != lnkkind or self._checklink" |
|
831 # lines are an expansion of "islink => checklink" |
|
832 # where islink means "is this a link?" and checklink |
|
833 # means "can we check links?". |
|
834 mtime = int(st.st_mtime) |
827 mtime = int(st.st_mtime) |
835 if (size >= 0 and |
828 if (size >= 0 and |
836 ((size != st.st_size and size != st.st_size & _rangemask) |
829 ((size != st.st_size and size != st.st_size & _rangemask) |
837 or ((mode ^ st.st_mode) & 0100 and checkexec)) |
830 or ((mode ^ st.st_mode) & 0100 and checkexec)) |
838 and (mode & lnkkind != lnkkind or checklink) |
|
839 or size == -2 # other parent |
831 or size == -2 # other parent |
840 or fn in copymap): |
832 or fn in copymap): |
841 madd(fn) |
833 madd(fn) |
842 elif ((time != mtime and time != mtime & _rangemask) |
834 elif time != mtime and time != mtime & _rangemask: |
843 and (mode & lnkkind != lnkkind or checklink)): |
|
844 ladd(fn) |
835 ladd(fn) |
845 elif mtime == lastnormaltime: |
836 elif mtime == lastnormaltime: |
846 # fn may have been changed in the same timeslot without |
837 # fn may have been changed in the same timeslot without |
847 # changing its size. This can happen if we quickly do |
838 # changing its size. This can happen if we quickly do |
848 # multiple commits in a single transaction. |
839 # multiple commits in a single transaction. |