Identify file paths of changes within IOperationParticipant
Hi,
I am writing an IOperationParticipant for the com.ibm.team.scm.service.changehistory.modification Operation (Deliver (phase 2)). As part of the functionality I need to be able to determine the affected resources path during the following changes:
I am having trouble identifying how I can get the following information however (running in the Server as an IOperationParticipant):
2. File addition - how to find out what the path will be
4. File reparenting - how to find out what the path was (both the afterState and beforeState seem to yield the new path)
Any help much appreciated,
Dan
I am writing an IOperationParticipant for the com.ibm.team.scm.service.changehistory.modification Operation (Deliver (phase 2)). As part of the functionality I need to be able to determine the affected resources path during the following changes:
- File modification
- File addition
- File deletion
- File reparenting
I am having trouble identifying how I can get the following information however (running in the Server as an IOperationParticipant):
2. File addition - how to find out what the path will be
4. File reparenting - how to find out what the path was (both the afterState and beforeState seem to yield the new path)
Any help much appreciated,
Dan
Accepted answer
Ensure you are looking up the path in the context that you care about.
- Try using the source (ie. repository workspace) to look up the path in the case of the file addition.
- Try using the target (ie. stream) to look up the path in the case of reparenting.
You'll want to check your service configuration provider that you give to the the #configurationLocateAncestors call. Ensure you're using the provider for the correct context (source or target).
- Try using the source (ie. repository workspace) to look up the path in the case of the file addition.
- Try using the target (ie. stream) to look up the path in the case of reparenting.
You'll want to check your service configuration provider that you give to the the #configurationLocateAncestors call. Ensure you're using the provider for the correct context (source or target).
Comments
1 vote