How to handle auto-props

Asked by niels

I'm trying to introduce bazaar at my company. I have the permission to try it out with the restriction, that all information must be put into svn. So bzr-svn seems a good solution. I converted our auto-props into a rules-file, so the conversion should be equal.
The idea is to make feature branches and put them into a trunk-branch and push from there to svn. Everything works fine, except we add new files, because they don't get the file-properties as they would get if we put them via svn to the repository.
I know that bzr-svn doesn't handle file-properties and thought this wouldn't be a problem, since I mentioned this.

Any ideas how to solve this?

Question information

Language:
English Edit question
Status:
Open
For:
Bazaar Subversion Plugin Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Jelmer Vernooij (jelmer) said :
#1

On Tue, Mar 27, 2012 at 10:41:05AM -0000, niels wrote:
> I'm trying to introduce bazaar at my company. I have the permission to try it out with the restriction, that all information must be put into svn. So bzr-svn seems a good solution. I converted our auto-props into a rules-file, so the conversion should be equal.
> The idea is to make feature branches and put them into a trunk-branch and push from there to svn. Everything works fine, except we add new files, because they don't get the file-properties as they would get if we put them via svn to the repository.
> I know that bzr-svn doesn't handle file-properties and thought this wouldn't be a problem, since I mentioned this.

I'm not sure I follow. Which file properties aren't set in Subversion,
can you give an example?

Cheers,

Jelmer

Revision history for this message
niels (opensource21) said :
#2

First you must set in your config C:\Users\<user>\AppData\Roaming\Subversion\config (see http://www.mediawiki.org/wiki/Subversion/auto-props)
enable-auto-props = yes
and for example

*.java = svn:eol-style=native;svn:mime-type=text/plain

If you then make

touch MySvnClass.java
svn add MySvnClass.java
svn commit
the file will get the properties
svn:eol-style=native
svn:mime-type=text/plain

if you do the same with a bzr branch of a svn-repository

touch MyBzrClass.java
bzr add MyBzrClass.java
bzr commit;
bzr push :parent

then you can check the properties of MyBzrClass.java with an svn-client and will see that it doesn't have any properties.

I hope this makes it more clear.

BTW: Does bzr-svn call the normal svn-executives or which library does it use?

Revision history for this message
niels (opensource21) said :
#3

I searched a little bit and find following http://pysvn.tigris.org/docs/pysvn_prog_ref.html#pysvn_client_set_auto_props. In http://pysvn.tigris.org/docs/pysvn_prog_ref.html#pysvn_client it's possible to define a config-dir. Perhaps this is wrong dir?

Revision history for this message
Jelmer Vernooij (jelmer) said :
#4

On Tue, Mar 27, 2012 at 12:30:54PM -0000, niels wrote:
> niels is still having a problem:
> First you must set in your config C:\Users\<user>\AppData\Roaming\Subversion\config (see http://www.mediawiki.org/wiki/Subversion/auto-props)
> enable-auto-props = yes
> and for example
>
> *.java = svn:eol-style=native;svn:mime-type=text/plain
>
> If you then make
>
> touch MySvnClass.java
> svn add MySvnClass.java
> svn commit
> the file will get the properties
> svn:eol-style=native
> svn:mime-type=text/plain
>
> if you do the same with a bzr branch of a svn-repository
>
> touch MyBzrClass.java
> bzr add MyBzrClass.java
> bzr commit;
> bzr push :parent
>
> then you can check the properties of MyBzrClass.java with an svn-client
> and will see that it doesn't have any properties.
>
> I hope this makes it more clear.
That's correct - bzr doesn't support file properties as indicated
by the feature list, you will have to set the file properties manually.

> BTW: Does bzr-svn call the normal svn-executives or which library does
> it use?
It uses libsvn (through subvertpy). What do you mean by
"svn-executives" though?

Cheers,

Jelmer

Revision history for this message
niels (opensource21) said :
#5

With svn-executives I mean svn.exe. However it seems that hg has the same problem and the same library https://bitbucket.org/durin42/hgsubversion/issue/186/honor-svn-auto-props. There was a link to patch how to enable it https://bitbucket.org/ronvoe/hgsubversion-auto-props. Unfortunately I can't program python:-(

However to make the point clearer. I think there are 2 sorts of supporting file properties:

1. reading,writing and interpret the properties.

2. Adding properties to a new file.

The first one is a big work and I think it's not really doable. The second one is a job normally the svn-client do. So I think this can't be to complicated. It's more a question of configuration. The great benefit would be that you can use bzr as svn-client without breaking companies rules.
Bzr user doesn't need this feature but all other which uses svn directly.

I hope this makes it more clear. Sorry about my bad English.

Revision history for this message
Jelmer Vernooij (jelmer) said :
#6

On Tue, Mar 27, 2012 at 01:50:45PM -0000, niels wrote:
> Question #191828 on Bazaar Subversion Plugin changed:
> https://answers.launchpad.net/bzr-svn/+question/191828
>
> Status: Answered => Open
>
> niels is still having a problem:
> With svn-executives I mean svn.exe. However it seems that hg has the
> same problem and the same library
> https://bitbucket.org/durin42/hgsubversion/issue/186/honor-svn-auto-
> props. There was a link to patch how to enable it
> https://bitbucket.org/ronvoe/hgsubversion-auto-props. Unfortunately I
> can't program python:-(
>
> However to make the point clearer. I think there are 2 sorts of
> supporting file properties:
>
> 1. reading,writing and interpret the properties.
>
> 2. Adding properties to a new file.
>
> The first one is a big work and I think it's not really doable. The second one is a job normally the svn-client do. So I think this can't be to complicated. It's more a question of configuration. The great benefit would be that you can use bzr as svn-client without breaking companies rules.
> Bzr user doesn't need this feature but all other which uses svn directly.
Ah, thanks. I've filed a bug about this (should be linked to this
question).

Cheers,

Jelmer

Revision history for this message
niels (opensource21) said :
#7

Great. Do you see any chance that it will be fixed in the next 2 weeks?

Can you help with this problem?

Provide an answer of your own, or ask niels for more information if necessary.

To post a message you must log in.