Getting the repository workspace from a file
Hi to all,
given the local path of a file (or folder) under Jazz Source Control, how can I find the name of the repository workspace where it is versioned?
I suppose that if I obtain the IShareable instance I can retrieve all the information from the ISharingDescriptor field of the IShare element. But I'm not able to obtain the IShareable from the local path....
Thanks a lot
Daniele
given the local path of a file (or folder) under Jazz Source Control, how can I find the name of the repository workspace where it is versioned?
I suppose that if I obtain the IShareable instance I can retrieve all the information from the ISharingDescriptor field of the IShare element. But I'm not able to obtain the IShareable from the local path....
Thanks a lot
Daniele
2 answers
FileSystemCore.getSharingManager().findShareable(IPath, ResourceType) can
get you an IShareable from a path.
Andrew
On Mon, 22 Feb 2010 10:23:03 -0500, kostja79
<daniele> wrote:
--
get you an IShareable from a path.
Andrew
On Mon, 22 Feb 2010 10:23:03 -0500, kostja79
<daniele> wrote:
Hi to all,
given the local path of a file (or folder) under Jazz Source Control,
how can I find the name of the repository workspace where it is
versioned?
I suppose that if I obtain the IShareable instance I can retrieve all
the information from the ISharingDescriptor field of the IShare
element. But I'm not able to obtain the IShareable from the local
path....
Thanks a lot
Daniele
--
Dear Adhoo,
thank you for your help. However I obtain a null reference instead of an IShareable.
I report my code:
Moreover, if I apply sm.allShares(monitor), I obtain an empty array.
Probably I am using the FileSystemCore in an uncorrect way... where is the problem?
Thanks
--
thank you for your help. However I obtain a null reference instead of an IShareable.
I report my code:
String filename = ...
IPath path = new Path(filename);
TeamPlatform.startup();
FileSystemCore.startUp();
ISharingManager sm = FileSystemCore.getSharingManager();
IShareable shareable = sm.findShareable(path, true);
Moreover, if I apply sm.allShares(monitor), I obtain an empty array.
Probably I am using the FileSystemCore in an uncorrect way... where is the problem?
Thanks
FileSystemCore.getSharingManager().findShareable(IPath, ResourceType) can
get you an IShareable from a path.
Andrew
On Mon, 22 Feb 2010 10:23:03 -0500, kostja79
<daniele> wrote:
Hi to all,
given the local path of a file (or folder) under Jazz Source Control,
how can I find the name of the repository workspace where it is
versioned?
I suppose that if I obtain the IShareable instance I can retrieve all
the information from the ISharingDescriptor field of the IShare
element. But I'm not able to obtain the IShareable from the local
path....
Thanks a lot
Daniele
--