mercurial/dirstate.py
branchstable
changeset 11769 ca6cebd8734e
parent 10968 7a0d096e221e
child 12164 1849b6147831
child 12344 b6173aee4a47
equal deleted inserted replaced
11765:aff419e260f9 11769:ca6cebd8734e
   623         iadd = ignored.append
   623         iadd = ignored.append
   624         radd = removed.append
   624         radd = removed.append
   625         dadd = deleted.append
   625         dadd = deleted.append
   626         cadd = clean.append
   626         cadd = clean.append
   627 
   627 
       
   628         lnkkind = stat.S_IFLNK
       
   629 
   628         for fn, st in self.walk(match, subrepos, listunknown,
   630         for fn, st in self.walk(match, subrepos, listunknown,
   629                                 listignored).iteritems():
   631                                 listignored).iteritems():
   630             if fn not in dmap:
   632             if fn not in dmap:
   631                 if (listignored or match.exact(fn)) and self._dirignore(fn):
   633                 if (listignored or match.exact(fn)) and self._dirignore(fn):
   632                     if listignored:
   634                     if listignored:
   638             state, mode, size, time = dmap[fn]
   640             state, mode, size, time = dmap[fn]
   639 
   641 
   640             if not st and state in "nma":
   642             if not st and state in "nma":
   641                 dadd(fn)
   643                 dadd(fn)
   642             elif state == 'n':
   644             elif state == 'n':
       
   645                 # The "mode & lnkkind != lnkkind or self._checklink"
       
   646                 # lines are an expansion of "islink => checklink"
       
   647                 # where islink means "is this a link?" and checklink
       
   648                 # means "can we check links?".
   643                 if (size >= 0 and
   649                 if (size >= 0 and
   644                     (size != st.st_size
   650                     (size != st.st_size
   645                      or ((mode ^ st.st_mode) & 0100 and self._checkexec))
   651                      or ((mode ^ st.st_mode) & 0100 and self._checkexec))
       
   652                     and (mode & lnkkind != lnkkind or self._checklink)
   646                     or size == -2 # other parent
   653                     or size == -2 # other parent
   647                     or fn in self._copymap):
   654                     or fn in self._copymap):
   648                     madd(fn)
   655                     madd(fn)
   649                 elif time != int(st.st_mtime):
   656                 elif (time != int(st.st_mtime)
       
   657                       and (mode & lnkkind != lnkkind or self._checklink)):
   650                     ladd(fn)
   658                     ladd(fn)
   651                 elif listclean:
   659                 elif listclean:
   652                     cadd(fn)
   660                     cadd(fn)
   653             elif state == 'm':
   661             elif state == 'm':
   654                 madd(fn)
   662                 madd(fn)