Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [subversive-dev] Framework + CheckoutOperation

Hello Marcos,


>But the class "AbstractRepositoryOperation" do not define method
"getSelectedRepositoryResources".
"getSelectedRepositoryResources" method is related to class
AbstractRepositoryTeamAction.
The method usage sample you can find in
org.eclipse.team.svn.ui.action.remote.RenameAction implementation.

>Since I want to check out a single project I will have to use
"CheckoutAsOperation". Right?
If you wish to checkout only one project you can use CheckoutAsOperation.

>Its constructor parameters are as follow:
>(File to, IRepositoryResource resource, boolean recursive, boolean
ignoreExternals, boolean override)
We have two sets of operations: first supports Eclipse Platform IResource
hierarchy, second supports java.io.File. So, in order to work with
IResource(s) you should use classes from
org.eclipse.team.svn.core.operation.* packages except
org.eclipse.team.svn.core.operation.file.* package and its children.
In order to checkout Eclipse projects you can use
org.eclipse.team.svn.core.operation.remote.CheckoutAsOperation.
The same relates to CommitOperation etc.

>How do I choose the tag/branch I want to check out?
SVN does not support tracking of tags and branches. So, you can't ask SVN
about branches and tags of some project. But you can suppose branch or tag
location regarding to project layout on repository (you can learn more about
project layouts in SVN RedBook).

Best regards,
Alexander Gurov
Subversive Team


-----Original Message-----
From: subversive-dev-bounces@xxxxxxxxxxx
[mailto:subversive-dev-bounces@xxxxxxxxxxx] On Behalf Of Marcos Del Puerto
Sent: Friday, April 04, 2008 2:15 PM
To: Developers mailing list
Subject: Re: [subversive-dev] Framework + CheckoutOperation

Hi Alexander,

I have the following server and project:
"http://svn_server/svn/project_002";. The folder "project_002" contains the
folder "trunk/example_project". In the folder example project the source
code can be found as well as the ".cproject" ".project" files.

And I want to check it out to the workspace and having "Project
Explorer->example_project" after calling an action from a View
(extends ViewPart).

In the example code you posted:
>> IRepositoryResource []resources = 
>> this.getSelectedRepositoryResources();

But the class "AbstractRepositoryOperation" do not define method
"getSelectedRepositoryResources".

Since I want to check out a single project I will have to use
"CheckoutAsOperation". Right?

Its constructor parameters are as follow:

(File to, IRepositoryResource resource, boolean recursive, boolean
ignoreExternals, boolean override)

Is "File to" the destination workspace folder?

How do I get the "resource"? Do I have to create a class which implements
the IRepositoryResource interface and  init with the repository information
(setUrl, setBranchesLocation...)?

How do I choose the tag/branch I want to check out?

After making changes in the project, to commit the changes I have to use
CommitOperation.

The constructor parameters are:

(IFileProvider provider, String message, boolean recursive, boolean
keepLocks)

Where does provider come from? How Subversive knows when I commit, which
repository is it related? Is is contained in the project information?

Is there any better way to do those operations?

Best regards,
Marcos

PS: Thank you very much for your quick answer.
_______________________________________________
subversive-dev mailing list
subversive-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/subversive-dev






Back to the top