[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
RE: [subversive-dev] How to set some properties at the creationoffolders/files?
|
Title: How to set some properties at the creation of folders/files?
Hello
Alexei,
Thank
you very much for your prompt reply.
I did
look into SetPropertiesOperation and that seems to require a working copy on the
local file system. Is this related to the discussion of "Using subversive with
non-local filesystem resources" in the newsgroup:
eclipse.technology.subversive earlier this year? In our case, there is no
working copy and the client directly interact with the svn server like the
subversive plug-in. Sorry that I forgot to mention that.
Regards,
tongjia
-----Original
Message-----
From: subversive-dev-bounces@xxxxxxxxxxx
[mailto:subversive-dev-bounces@xxxxxxxxxxx]On Behalf Of Alexei
Goncharov
Sent: Friday, August 29, 2008 12:29 AM
To:
'Developers mailing list'
Subject: RE: [subversive-dev] How to set
some properties at the creationoffolders/files?
Hello, Tongjia.
To set SVN properties the resources it firstly must
be added to source control. To add resources to the source control AddToSVNOperation should be used. After success the properties can be
set.
To set properties SetPropertiesOperation should be used. Both
operations are from org.eclipse.team.svn.core.operation.local, not
org.eclipse.team.svn.core.operation.file....
So to solve the task you shoud (for
example):
SetPropertiesOperation mainOp =
new
SetPropertiesOperation(resources,
properties);
AddToSVNOperation addOp = new
AddToSVNOperation(resources);
CompositeOperation op = new
CompositeOperation(mainOp.getId());
op.add(addOp);
op.add(mainOp, new
IActionOperation [] {addOp});
ProgressMonitorUtility.doTaskScheduledDefault(op);
And that's all.
Best regards, Alexei Goncharov (Subversive
Team).