[Urgent]Fetch the the path of a file at changeset without using the workspace
I need to know the full path of the file at changeset without the need to create instance of WorkSpaceConnection.
I have finished fetching the files I need at changeset,now I need to know the full path of this FileItem.
IFileItem fileItem = (IFileItem) vm.fetchCompleteState(after, null);
I have searched & posted at the forum and most of things I found is that I can use:
configuration.determineAncestorsInHistory
However in order to get the IConfiguration,I need for workspaceConnection which is not valid at my case.
Can you give me a clue how could if that is applicable and how?
Thanks.
I have finished fetching the files I need at changeset,now I need to know the full path of this FileItem.
IFileItem fileItem = (IFileItem) vm.fetchCompleteState(after, null);
I have searched & posted at the forum and most of things I found is that I can use:
configuration.determineAncestorsInHistory
However in order to get the IConfiguration,I need for workspaceConnection which is not valid at my case.
Can you give me a clue how could if that is applicable and how?
Thanks.
One answer
Conceptually, I don't think you can resolve the full path without a connection to a specific workspace or stream.
Consider: a file (foo.txt) might exist in your repository workspace at /myproject1/myfolder/foo.txt. However, I might have committed a change to *my* repository workspace that moves myfolder (and foo.txt underneath it) to a different project, myproject2, making its full path /myproject2/myfolder/foo.txt. The exact same file could have different full paths, depending on the context, and neither one is more "correct" than the other.
In the Eclipse client, have you ever opened a change set in the Change Explorer view, only to be presented with some folders marked as <unresolved> and a message like "Some paths could not be resolved. Click here to fix this." (and 'clicking here' brings up a dialog where you can specify a repository workspace or stream to use to resolve the paths)? If I'm not mistaken, it's the same thing you're running into. You might want to take a step back and re-examine what you're trying to do, if you finding yourself needing to get a full path without a connection to a repository workspace or stream.
Consider: a file (foo.txt) might exist in your repository workspace at /myproject1/myfolder/foo.txt. However, I might have committed a change to *my* repository workspace that moves myfolder (and foo.txt underneath it) to a different project, myproject2, making its full path /myproject2/myfolder/foo.txt. The exact same file could have different full paths, depending on the context, and neither one is more "correct" than the other.
In the Eclipse client, have you ever opened a change set in the Change Explorer view, only to be presented with some folders marked as <unresolved> and a message like "Some paths could not be resolved. Click here to fix this." (and 'clicking here' brings up a dialog where you can specify a repository workspace or stream to use to resolve the paths)? If I'm not mistaken, it's the same thing you're running into. You might want to take a step back and re-examine what you're trying to do, if you finding yourself needing to get a full path without a connection to a repository workspace or stream.
Comments
1 vote
1 vote
showing 5 of 7
show 2 more comments