Skip to content

diff.groovy: allow exclude list to come from multi-line file #588

@rnveach

Description

@rnveach

Identified at #527 (review) ,

We should not be maintaining a 13k character singleline, especially when our own repo is trying to cut down lines to 100 characters or less. This is not easily maintainable. There is also the extra maintainability that we need a separate file with a similar list in another type of file format. We clearly need a better way.

Our projects*.properties files format needs to be changed to allow this possible. The current format is:
REPO_NAME|[local|git|hg]|URL|[COMMIT_ID]|[EXCLUDE FOLDERS]

We should update it to allow an exclude file, relative to the property file's current location.
Example: REPO_NAME|[local|git|hg]|URL|[COMMIT_ID]|[EXCLUDE FOLDERS]|[EXCLUDE FILE].
Exclude file should be completely optional. It doesn't need the final | and even if it is provided, it should allowed to be nothing meaning there is no excludes in a file to use.
As long as there is no added complexity, both excludes should be additional. Meaning if I exclude folders and provide an exclude file, then they should act like they are all combined into 1 big list.

We should update it to allow an exclude file or a list of folders.
EXCLUDE FOLDERS should identify as a file if it starts with file://$PWD. It will take this file as in the current working directory. Anything that is not identified as this file should fall back on the old behavior of list of folders.

The format of exclude file should be similar to exclude folders, with the only difference being that multiple lines is encouraged. Each new line should act like an OR or similar to , in the exclude folders.
Comments (in the form of #) should be allowed. Blank lines should be allowed too.

diff.groovy needs to be updated to process the new changes in the property file.

With the new functionality, the following 2 things also need to occur:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions