print('Deleting the following modules from "%s":' % repo['path']) info = list_modules.getModuleInfo(repo['path']) performedDelete = False for module in info: if module['name'] in moduleNames: moduleNames.remove(module['name']) if args.dry_run: print('\t"%s"' % module['name']) performedDelete = True else: try: svn.delete(module['systemPath']) performedDelete = True print('\t', module['name']) except svn.SvnError as e: log.error(e.message + '\n') print('Skipping SVN commit for %s' % repo['path']) break else: if performedDelete: if args.dry_run: print('\n"SVN commit"', repo['path']) else: try: svn.commit(repo['path'], 'Deleting modules with ' 'delete_modules.py script') except svn.SvnError as e:
continue # Delete patterns that reference the non-modular widget. Assuming that # the modular widget includes the relevant patterns. try: _deleteNonModularWidgetPatterns(repo['path'], widgetDir) except (IOError, ValueError) as e: log.error(e.strerror) log.error('Unable to update project pattern snippet file, skipping ' 'rest of migration of %s to %s\n', widgetDir, moduleDir) reposWithErrors[repo['path']] = True continue # Delete non-modular widget. try: svn.delete(widgetAbsolutePath) except svn.SvnError as e: log.error(e.message) log.error('Unable to delete non-modular widget, skipping rest of ' 'migration of %s to %s\n', widgetDir, moduleDir) reposWithErrors[repo['path']] = True continue # SVN update & commit if reposWithErrors.get(repo['path'], False): log.warning('A previous migration in this script run modifying ' 'the project "%s" had errors. Skipping SVN commit so that the ' 'bad migration can be fixed. Please address errors and re-run ' 'the script or commit manually.', repo['path']) elif args.skip_commit: logging.info('Skipping SVN Commit. You must commit manually to '