-# Copyright (C) 2009-2012 W. Trevor King <wking@drexel.edu>
+# Copyright (C) 2012 W. Trevor King
#
# This file is part of update-copyright.
#
if vcs == 'Git':
self._vcs = _GitBackend()
elif vcs == 'Bazaar':
+ if _BazaarBackend is None:
+ raise _bazaar_import_error
self._vcs = _BazaarBackend()
elif vcs == 'Mercurial':
+ if _MercurialBackend is None:
+ raise _mercurial_import_error
self._vcs = _MercurialBackend()
else:
raise NotImplementedError('vcs: {}'.format(vcs))
except _configparser.NoOptionError:
pass
try:
- self._ignored_paths = p.get('files', 'ignored')
+ ignored = p.get('files', 'ignored')
except _configparser.NoOptionError:
pass
+ else:
+ self._ignored_paths = [pth.strip() for pth in ignored.split(',')]
try:
self._pyfile = p.get('files', 'pyfile')
except _configparser.NoOptionError:
if self._ignored_paths is not None:
for path in self._ignored_paths:
if _fnmatch.fnmatch(filename, path):
+ _LOG.debug('ignoring {} (matched {})'.format(
+ filename, path))
return True
if self._vcs and not self._vcs.is_versioned(filename):
+ _LOG.debug('ignoring {} (not versioned))'.format(filename))
return True
return False