On Apr 21, 2010, at 09:27, Bettual Richter wrote:
> On Apr 21, 2010, at 07:19, Lorenz wrote:
>> Bettual Richter wrote:
>>> I'd like to set a property for every file in a certain 
>>> directory(recursivly) using an url.  Something like 
>>> 
>>> svn propedit -R PROPNAME PROPVAL URL
>>> 
>> 
>> I think you meant propset
>> 
>> but anyhow svn prop* for versioned properties only work in on a
>> working copy. 
>> 
> 
> Sry, but that's not right. 
> 
> svn propedit NAME VAL URL 
> 
> works without a working copy. I meant propedit and have 
> tested it extensively because it allows you to set 
> new properties(also versioned ones) see, 
>         http://subversion.tigris.org/issues/show_bug.cgi?id=2238 
>         comment from Noritada Kobayashi Thu Feb 1 03:55:02 -0700 2007   
>         It's the only hint I found to figure this out 

True, svn propedit can be used on URLs now.

But "svn propedit NAME VAL URL" is not right. propedit does not take a VAL 
argument on the command line; rather, it opens an editor and you type the value 
there.

Also, svn propedit is for editing a single property of a single file or 
directory. Since you want to edit properties of multiple files, svn propedit is 
not going to work.


> Anyway thx for your idea but it doesn't really work the way I need it. 
> 
> I tested it using the svnmucc --extra-arg FILE with following results : 
> 
> 1.   FILE containing one operation per line 
>         e.g.  'propset NAME VAL URL' 
>       gives  'propset NAME VAL URL' is not an action 
> 2.   FILE containing each arg in a seperate line 
>         e.g. 'propset \n NAME \n VAL \n URL' 
>       gives a correct reply and sets the right property 

Yes, according to "svnmucc --help", its --extra-args option requires one 
argument per line in the file.

> 3.  FILE containing serveral versions of 2. 
>         e.g. 'propset \n NAME \n VAL \n URL 
>                    \npropset \n NAME \n VAL \n URL' 
>      gives the same error as 1. 

Are you sure? I was able to get svnmucc to do two operations by just listing 
them one after another in the extra args file:

cp
1
file:///tmp/repo/foo
file:///tmp/repo/foo2
cp
1
file:///tmp/repo/foo
file:///tmp/repo/foo3

Though I am using the cp command here, and not propset; the propset command is 
not working for me for some reason; I'm getting the same error you reported 
earlier:

svnmucc: File already exists: filesystem '/tmp/repo/db', transaction '2-3', 
path '/foo'


> Assuming propedit works on URLs(it does) I'm trying to do something like 
> 
> svn propedit NAME1 VAL1 URL1 
> svn propedit NAME2 VAL2 URL2 
> svn propedit NAME3 VAL3 URL3 
> at once. 
> Most suitable with only one revision change. 

propedit does work on URLs, but only on one URL at a time. Doing multiple 
actions in a single revision change without having a working copy is only 
possible using the svnmucc tool; that's the purpose of the svnmucc tool in fact.

The other option already mentioned is to do your changes in a working copy. 
Those are the two options I'm aware of for accomplishing what you want.

Well, the third option would be to write a program to do this using the 
Subversion language bindings. But that's a lot of work, and probably 
unnecessary since the other two methods suggested above should work and are 
easier.


Reply via email to