if not config.extensions and config.no_parse: # Do nothing!!! return 0 if config.debug: import repositoryhandler repositoryhandler.backends.DEBUG = True path = uri_to_filename(uri) (uri, repo) = _get_uri_and_repo(path) if not config.no_parse: printdbg("Preparing logging") # Create reader reader = LogReader() reader.set_repo(repo, path or uri) reader.set_branch(config.branch) # Create parser if config.repo_logfile is not None: parser = create_parser_from_logfile(config.repo_logfile) reader.set_logfile(config.repo_logfile) else: parser = _get_parser_from_repository(repo) parser.set_repository(repo, uri) if parser is None: printerr("Failed to create parser") return 1
print "files: ", for action in commit.actions: print "%s %s " % (action.type, action.f1), if action.f2 is not None: print "(%s: %s) on branch %s" % (action.f2, action.rev, commit.branch or action.branch_f1) else: print "on branch %s" % (commit.branch or action.branch_f1) print "Message" print commit.message def new_line(line, user_data=None): user_data.feed(line) reader = LogReader() if os.path.isfile(sys.argv[1]): # Parser from logfile p = create_parser_from_logfile(sys.argv[1]) reader.set_logfile(sys.argv[1]) else: path = uri_to_filename(sys.argv[1]) if path is not None: repo = create_repository_from_path(path) else: repo = create_repository('svn', sys.argv[1]) path = sys.argv[1] p = create_parser_from_repository(repo) reader.set_repo(repo, path)
(path, str(e))) return 1 uri = repo.get_uri_for_path(path) else: uri = uri.strip('/') # Get an object of the backends class for managing the repository repo = create_repository('svn', uri) # Check uri actually points to a valid svn repo if repo.get_last_revision(uri) is None: printerr("URI %s doesn't seem to point to a valid svn repository", (uri, )) return 1 if not config.no_parse: # Create reader reader = LogReader() reader.set_repo(repo, path or uri, files=config.files, gitref=config.gitref) # Create parser if config.repo_logfile is not None: parser = create_parser_from_logfile(config.repo_logfile) reader.set_logfile(config.repo_logfile) else: parser = create_parser_from_repository(repo) parser.set_repository(repo, uri) if parser is None:
except Exception, e: printerr ("Unknown error creating repository for path %s (%s)", (path, str (e))) return 1 uri = repo.get_uri_for_path (path) else: uri = uri.strip ('/') # Get an object of the backends class for managing the repository repo = create_repository ('svn', uri) # Check uri actually points to a valid svn repo if repo.get_last_revision (uri) is None: printerr ("URI %s doesn't seem to point to a valid svn repository", (uri,)) return 1 if not config.no_parse: # Create reader reader = LogReader () reader.set_repo (repo, path or uri) # Create parser if config.repo_logfile is not None: parser = create_parser_from_logfile (config.repo_logfile) reader.set_logfile (config.repo_logfile) else: parser = create_parser_from_repository (repo) parser.set_repository (repo, uri) if parser is None: printerr ("Failed to create parser") return 1
except Exception, e: printerr("Unknown error creating repository for path %s (%s)", (path, str(e))) return 1 uri = repo.get_uri_for_path(path) else: uri = uri.strip('/') # Get an object of the backends class for managing the repository repo = create_repository('svn', uri) # Check uri actually points to a valid svn repo if repo.get_last_revision(uri) is None: printerr("URI %s doesn't seem to point to a valid svn repository", (uri,)) return 1 if not config.no_parse: # Create reader reader = LogReader() reader.set_repo(repo, path or uri, files=config.files, gitref=config.gitref) # Create parser if config.repo_logfile is not None: parser = create_parser_from_logfile(config.repo_logfile) reader.set_logfile(config.repo_logfile) else: parser = create_parser_from_repository(repo) parser.set_repository(repo, uri) if parser is None: printerr("Failed to create parser") return 1
printerr("Unknown error creating repository for path %s (%s)", (path, str(e))) return 1 uri = repo.get_uri_for_path(path) else: uri = uri.strip('/') repo = create_repository('svn', uri) # Check uri actually points to a valid svn repo if repo.get_last_revision(uri) is None: printerr("URI %s doesn't seem to point to a valid svn repository", (uri, )) return 1 if not config.no_parse: # Create reader reader = LogReader() reader.set_repo(repo, path or uri) # Create parser if config.repo_logfile is not None: parser = create_parser_from_logfile(config.repo_logfile) reader.set_logfile(config.repo_logfile) else: parser = create_parser_from_repository(repo) parser.set_repository(repo, uri) if parser is None: printerr("Failed to create parser") return 1
if commit.tags is not None: print "Tags: %s" % (str (commit.tags)) print "files: " for action in commit.actions: print "%s %s " % (action.type, action.f1) if action.f2 is not None: print "(%s: %s) on branch %s" % (action.f2, action.rev, commit.branch or action.branch_f1) else: print "on branch %s" % (commit.branch or action.branch_f1) print "Message" print commit.message def new_line (line, user_data = None): user_data.feed (line) reader = LogReader () if os.path.isfile (sys.argv[1]): # Parser from logfile p = create_parser_from_logfile (sys.argv[1]) reader.set_logfile (sys.argv[1]) else: path = uri_to_filename (sys.argv[1]) if path is not None: repo = create_repository_from_path (path) else: repo = create_repository ('svn', sys.argv[1]) path = sys.argv[1] p = create_parser_from_repository (repo) reader.set_repo (repo, path)