Mercurial > hg > easyhg
comparison src/fswatcher.cpp @ 563:0a094020c2d4
Switch off more debug output
author | Chris Cannam |
---|---|
date | Tue, 28 Feb 2012 14:38:42 +0000 |
parents | 65d77437b5e8 |
children | 09b9849b9800 |
comparison
equal
deleted
inserted
replaced
562:65d77437b5e8 | 563:0a094020c2d4 |
---|---|
215 // We don't check whether the file matches an ignore pattern, | 215 // We don't check whether the file matches an ignore pattern, |
216 // because we are only notified for file changes if we are | 216 // because we are only notified for file changes if we are |
217 // watching the file explicitly, i.e. the file is in the | 217 // watching the file explicitly, i.e. the file is in the |
218 // tracked file paths list. So we never want to ignore them | 218 // tracked file paths list. So we never want to ignore them |
219 | 219 |
220 #ifdef DEBUG_FSWATCHER | |
220 std::cerr << "FsWatcher: Tracked file " << path << " has changed" << std::endl; | 221 std::cerr << "FsWatcher: Tracked file " << path << " has changed" << std::endl; |
222 #endif | |
221 | 223 |
222 size_t counter = ++m_lastCounter; | 224 size_t counter = ++m_lastCounter; |
223 m_changes[path] = counter; | 225 m_changes[path] = counter; |
224 } | 226 } |
225 | 227 |
231 { | 233 { |
232 QFileInfo fi(path); | 234 QFileInfo fi(path); |
233 QString fn(fi.fileName()); | 235 QString fn(fi.fileName()); |
234 foreach (QString pfx, m_ignoredPrefixes) { | 236 foreach (QString pfx, m_ignoredPrefixes) { |
235 if (fn.startsWith(pfx)) { | 237 if (fn.startsWith(pfx)) { |
238 #ifdef DEBUG_FSWATCHER | |
236 std::cerr << "(ignoring: " << path << ")" << std::endl; | 239 std::cerr << "(ignoring: " << path << ")" << std::endl; |
240 #endif | |
237 return true; | 241 return true; |
238 } | 242 } |
239 } | 243 } |
240 foreach (QString sfx, m_ignoredSuffixes) { | 244 foreach (QString sfx, m_ignoredSuffixes) { |
241 if (fn.endsWith(sfx)) { | 245 if (fn.endsWith(sfx)) { |
246 #ifdef DEBUG_FSWATCHER | |
242 std::cerr << "(ignoring: " << path << ")" << std::endl; | 247 std::cerr << "(ignoring: " << path << ")" << std::endl; |
248 #endif | |
243 return true; | 249 return true; |
244 } | 250 } |
245 } | 251 } |
246 return false; | 252 return false; |
247 } | 253 } |