def Setup(): """Set up git utils, by reading the alias files.""" settings.Setup('') # Check for a git alias file also alias_fname = GetAliasFile() if alias_fname: settings.ReadGitAliases(alias_fname)
help="Don't check for patch compliance") parser.add_option('--no-tags', action='store_false', dest='process_tags', default=True, help="Don't process subject tags as aliaes") parser.usage += """ Create patches from commits in a branch, check them and email them as specified by tags you place in the commits. Use -n to do a dry run first.""" # Parse options twice: first to get the project and second to handle # defaults properly (which depends on project). (options, args) = parser.parse_args() settings.Setup(parser, options.project, '') (options, args) = parser.parse_args() # Run our meagre tests if options.test: import doctest sys.argv = [sys.argv[0]] suite = unittest.TestLoader().loadTestsFromTestCase(test.TestPatch) result = unittest.TestResult() suite.run(result) for module in ['gitutil', 'settings']: suite = doctest.DocTestSuite(module) suite.run(result)