Mercurial > hg
comparison hgext/fsmonitor/__init__.py @ 41365:876494fd967d
cleanup: delete lots of unused local variables
These were found by IntelliJ. There are many more, but these seemed
pretty safe.
Differential Revision: https://phab.mercurial-scm.org/D5629
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Thu, 17 Jan 2019 09:17:12 -0800 |
parents | 6b1a8c396b05 |
children | 18adb747a332 |
comparison
equal
deleted
inserted
replaced
41364:0132221c25cd | 41365:876494fd967d |
---|---|
237 return bail('no clock') | 237 return bail('no clock') |
238 # Initial NULL clock value, see | 238 # Initial NULL clock value, see |
239 # https://facebook.github.io/watchman/docs/clockspec.html | 239 # https://facebook.github.io/watchman/docs/clockspec.html |
240 clock = 'c:0:0' | 240 clock = 'c:0:0' |
241 notefiles = [] | 241 notefiles = [] |
242 | |
243 def fwarn(f, msg): | |
244 self._ui.warn('%s: %s\n' % (self.pathto(f), msg)) | |
245 return False | |
246 | |
247 def badtype(mode): | |
248 kind = _('unknown') | |
249 if stat.S_ISCHR(mode): | |
250 kind = _('character device') | |
251 elif stat.S_ISBLK(mode): | |
252 kind = _('block device') | |
253 elif stat.S_ISFIFO(mode): | |
254 kind = _('fifo') | |
255 elif stat.S_ISSOCK(mode): | |
256 kind = _('socket') | |
257 elif stat.S_ISDIR(mode): | |
258 kind = _('directory') | |
259 return _('unsupported file type (type is %s)') % kind | |
260 | 242 |
261 ignore = self._ignore | 243 ignore = self._ignore |
262 dirignore = self._dirignore | 244 dirignore = self._dirignore |
263 if unknown: | 245 if unknown: |
264 if _hashignore(ignore) != ignorehash and clock != 'c:0:0': | 246 if _hashignore(ignore) != ignorehash and clock != 'c:0:0': |