equal
deleted
inserted
replaced
66 if line.startswith('syntax:'): |
66 if line.startswith('syntax:'): |
67 s = line[7:].strip() |
67 s = line[7:].strip() |
68 try: |
68 try: |
69 syntax = syntaxes[s] |
69 syntax = syntaxes[s] |
70 except KeyError: |
70 except KeyError: |
71 self.ui.warn("ignoring invalid syntax '%s'\n" % s) |
71 self.ui.warn(_("ignoring invalid syntax '%s'\n") % s) |
72 continue |
72 continue |
73 pat = syntax + line |
73 pat = syntax + line |
74 for s in syntaxes.values(): |
74 for s in syntaxes.values(): |
75 if line.startswith(s): |
75 if line.startswith(s): |
76 pat = line |
76 pat = line |
188 self.markdirty() |
188 self.markdirty() |
189 for f in files: |
189 for f in files: |
190 try: |
190 try: |
191 del self.map[f] |
191 del self.map[f] |
192 except KeyError: |
192 except KeyError: |
193 self.ui.warn("not in dirstate: %s!\n" % f) |
193 self.ui.warn(_("not in dirstate: %s!\n") % f) |
194 pass |
194 pass |
195 |
195 |
196 def clear(self): |
196 def clear(self): |
197 self.map = {} |
197 self.map = {} |
198 self.markdirty() |
198 self.markdirty() |
274 def supported_type(f, st): |
274 def supported_type(f, st): |
275 if stat.S_ISREG(st.st_mode): |
275 if stat.S_ISREG(st.st_mode): |
276 return True |
276 return True |
277 else: |
277 else: |
278 kind = 'unknown' |
278 kind = 'unknown' |
279 if stat.S_ISCHR(st.st_mode): kind = 'character device' |
279 if stat.S_ISCHR(st.st_mode): kind = _('character device') |
280 elif stat.S_ISBLK(st.st_mode): kind = 'block device' |
280 elif stat.S_ISBLK(st.st_mode): kind = _('block device') |
281 elif stat.S_ISFIFO(st.st_mode): kind = 'fifo' |
281 elif stat.S_ISFIFO(st.st_mode): kind = _('fifo') |
282 elif stat.S_ISLNK(st.st_mode): kind = 'symbolic link' |
282 elif stat.S_ISLNK(st.st_mode): kind = _('symbolic link') |
283 elif stat.S_ISSOCK(st.st_mode): kind = 'socket' |
283 elif stat.S_ISSOCK(st.st_mode): kind = _('socket') |
284 elif stat.S_ISDIR(st.st_mode): kind = 'directory' |
284 elif stat.S_ISDIR(st.st_mode): kind = _('directory') |
285 self.ui.warn('%s: unsupported file type (type is %s)\n' % ( |
285 self.ui.warn(_('%s: unsupported file type (type is %s)\n') % ( |
286 util.pathto(self.getcwd(), f), |
286 util.pathto(self.getcwd(), f), |
287 kind)) |
287 kind)) |
288 return False |
288 return False |
289 |
289 |
290 # recursion free walker, faster than os.walk. |
290 # recursion free walker, faster than os.walk. |