User Guide: CLI: SVN Commit History Processing Commands


DV8 Console Commands - SVN History Processing

SVN History Processing Commands

These commands allow users to process SVN commit history, including

Converting SVN commit logs to DV8 dependency files;

Generating CSV-formatted change lists from SVN commit history;

Generate a CSV-formatted target list file from a regular expression

 

Convert SVN Commit History to DV8 Dependency File

This command converts a Subversion log file (in XML format) to a DV8 dependency matrix file. The Subversion log can be exported using the SVN command:

svn log --xml -v repo

Usage

dv8-console scm:history:svn:convert-matrix [-h] [-matrix <MATRIX>] [-maxCochangeCount <MAXCOCHANGECOUNT>] [-outputFile <OUTPUTFILE>] [-paramsOutputFile <PARAMSOUTPUTFILE>] [-start <DATETIME>] [-stop <DATETIME>] INPUT_FILE

Input

A text file of the commit log exported from your SVN repository. The file should be encoded in UTF-8 format. You can export this file using the following command:

svn log --xml -v repo

Options

matrix: The path of a structure matrix that models file dependencies of a specific snapshot. If this option is provided, files in the revision history not present in the matrix will be excluded. Without this option, DV8 will extract a history DSM with all the files in the log, which may take a long time and use significant memory for large projects.

maxCochangeCount: Limits the maximum number of co-changed files per commit (default is 1000). You may reduce this number if performance issues arise due to hardware limitations.

outputFile: Specifies the output file for the dependency matrix (*.dv8-dsm). If not specified, the output will have the same name as the input log file in the current working directory.

paramsOutputFile: Specifies the output file (*.json) to store the parameters used for this command (e.g., date ranges). If no parameters are provided (e.g., start and stop dates), the command will use all history in the log file, and the dates will be saved in this file.

start: Defines the start of the date/time range to convert (in ISO-8601 format), e.g., 2017-07-08T00:00:00Z.

stop: Defines the end of the date/time range to convert (in ISO-8601 format), e.g., 2018-01-08T00:00:00Z.

Dextended.config: To handle file path inconsistencies between data sources, DV8 provides a preprocessor. You can configure the prefix strings to be excluded in an extended configuration file (dv8-console\samples\dv8-extended-config.xml). Multiple prefixes can be excluded using multiple <value> blocks.

Example

dv8-console scm:history:svn:convert-matrix -outputFile history.dv8-dsm "-Dextended.config=dv8-extended-config.xml" gitlog.txt

Generate CSV-formatted Change List from SVN Commit History

This command generates a CSV-formatted change list from a Subversion log file (in XML format). The Subversion log can be exported using the following command:

svn log --xml -v repo

Usage

dv8-console scm:history:svn:generate-changelist [-h] [-outputFolder <OUTPUTFOLDER>] [-start <DATETIME>] [-stop <DATETIME>] INPUT_FILE

Input

A text file of the commit log exported from your SVN repository. The file should be encoded in UTF-8 format.

Options

outputFolder: The output folder for the generated change list, including change frequency and churn.

start: Defines the start of the date/time range to convert (in ISO-8601 format), e.g., 2017-07-08T00:00:00Z.

stop: Defines the end of the date/time range to convert (in ISO-8601 format), e.g., 2018-01-08T00:00:00Z.

Dextended.config: Same as described above for handling file path inconsistencies between data sources using the extended configuration file.

Example

dv8-console scm:history:svn:generate-changelist -outputFolder list "-Dextended.config=dv8-extended-config.xml" gitlog.txt

Generate CSV-formatted Target List from Regular Expression

This command generates a CSV-formatted target list from a regular expression and a Subversion log (in XML format). The Subversion log can be exported using the following command:

svn log --xml -v repo

Usage

dv8-console scm:history:svn:generate-targetlist [-h] [-outputFolder <OUTPUTFOLDER>] [-regex <REGEX>] [-start <DATETIME>] [-stop <DATETIME>] INPUT_FILE

Input

A text file of the commit log exported from your SVN repository. The file should be encoded in UTF-8 format.

Options

outputFolder: The output folder for the generated target list, including target frequency and churn.

regex: A regular expression to extract issue IDs from commit messages in the revision history (e.g., PDFBOX-[0-9]+).

start: Defines the start of the date/time range to convert (in ISO-8601 format), e.g., 2017-07-08T00:00:00Z.

stop: Defines the end of the date/time range to convert (in ISO-8601 format), e.g., 2018-01-08T00:00:00Z.

targetissuecsv: Path to the target issue CSV file, where the first column contains the issue IDs.

Dextended.config: Same as described above for handling file path inconsistencies using the extended configuration file.

Example

dv8-console scm:history:svn:generate-targetlist -regex PDFBOX-[0-9]+ -outputFolder list "-Dextended.config=dv8-extended-config.xml" gitlog.txt