We have assets that are checked back into our perforce repository as a result of some builds. All the commits are by the same "automated" user account and it would be ideal to be able to filter out commits made by this user so they don't trigger needless CI when the build machine next checks for changes. Right now I can only easily check for changes to excluse based on file path (which could get overly complex for this scenario).
For the occasions where you might want slight variations on the default options provided, it would also be really nice to have some way to see what the equivelant script for the default options would be so that it could be copied and modified into a custom script by the user.
Description
We have assets that are checked back into our perforce repository as a result of some builds. All the commits are by the same "automated" user account and it would be ideal to be able to filter out commits made by this user so they don't trigger needless CI when the build machine next checks for changes. Right now I can only easily check for changes to excluse based on file path (which could get overly complex for this scenario).
For the occasions where you might want slight variations on the default options provided, it would also be really nice to have some way to see what the equivelant script for the default options would be so that it could be copied and modified into a custom script by the user.
I agree to provide default script in some form to help writing custom scripts. I will create another improvement request and close this ticket. For this specific case, below script should work:
for (repository: configuration.getReferencedRepositories()) {
boolean developerCommitsFound = false;
for (change: repository.getChanges()) {
if (!change.getUser().equals("automated"))
developerCommitsFound = true;
}
if (developerCommitsFound)
return true;
}
return false;
Robin Shen[28/Sep/10 12:24 PM]
I agree to provide default script in some form to help writing custom scripts. I will create another improvement request and close this ticket. For this specific case, below script should work:
for (repository: configuration.getReferencedRepositories()) {
boolean developerCommitsFound = false;
for (change: repository.getChanges()) {
if (!change.getUser().equals("automated"))
developerCommitsFound = true;
}
if (developerCommitsFound)
return true;
}
return false;
Ok... missed the priority... not exactly "major"... I can probably fumble around and work out the script to do this, but it might take a while to get right and gets the bugs out.
Roger Perkins[28/Sep/10 09:58 AM]
Ok... missed the priority... not exactly "major"... I can probably fumble around and work out the script to do this, but it might take a while to get right and gets the bugs out.
for (repository: configuration.getReferencedRepositories()) {
boolean developerCommitsFound = false;
for (change: repository.getChanges()) {
if (!change.getUser().equals("automated"))
developerCommitsFound = true;
}
if (developerCommitsFound)
return true;
}
return false;