subversion-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bo Berglund <bo.bergl...@gmail.com>
Subject Re: EOL problems in cvs2svn converted repository
Date Fri, 09 Feb 2018 10:44:51 GMT
On Thu, 11 Jan 2018 09:51:54 -0600, Ryan Schmidt
<subversion-2018@ryandesign.com> wrote:

>> I found a section in the conf file named [auto-props] but it seems
>> only to be applicable for commit and import, not for checkout AFAICT.
>> And all of that section is commented out by default.
>
>If you want Subversion to perform EOL translation on a file, you must set 
>the svn:eol-style property on that file to the desired value. 
>There is no other way.

Really? I imagine that a lot of people have been bit by this and
someone must have come up with a way to fix the problem without having
to manually go over all of the files in a repository matching the file
type (by extension) and set the property.
Is there no script or such available?

>
>If you want all files with a particular name or extension to get this 
>property when they are added to a working copy, set that up in the 
>auto-props section of your Subversion client's file. 
>This will apply to that client only and would need to be repeated for 
>all clients / all users.

I have put a Readme.txt file into the repo that describes the way to
set up the svn client side conf file.
But it will help only for new files...

>
>If using Subversion client 1.8 or later, use a repository-dictated 
>auto-props configuration:
>
>https://subversion.apache.org/docs/release-notes/1.8.html#repos-dictated-config
>
>Auto-props only cause the property to be added to the file when the file 
>is added to the working copy. A user can subvert auto-props, and a user 
>can also delete the property after it was added, before or after the file 
>was committed.
>
>If you want to enforce that this property is used on files that need it, 
>and/or prevent users from removing it, write a pre-commit hook that does that.

But this only affects files added to the repo, right?
I need something that can apply to *all* existing files of the
affected types.

>If you want all of the files you're importing from CVS that match the criteria 
>to have the property, adjust your cvs-to-svn conversion process to arrange for 
>that to be the case.
>

This will be a hurdle since the conversion is already done and the
repository is in use...
But *how* would one do this if a new conversion has to be done?
I am not fluent in Python, so any such coding is beyond me...

There is one repository holding a number of projects prepared for use
by an external contractor, which has so far not been used for
development. So in theory I can repeat the conversion cvs2svn for this
with some cvs2svn settings tweak that will set the svn:eol-style
conversion correctly.
But I need to know how this can be done in that case.

Is it possible to use dump/load?
--------------------------------
Is it possible to somehow edit an svn dump file (with a script) to
look for all the target files and add the eol-style property setting
for each file so it will be effected in the svn load?
When I look at a dumnp file load it looks like what it does is
automatically performing all the commit operations that was done in
the source repository....

Or maybe simpler:
-----------------
Create dump file of the repo.
Create a new repo and set its automatic property settings as discussed
above.
Then load the dump file.
Will this make the new repository contain the automatically set eol
properties? I.e. will the load be affected by the global repository
automatic property settings?

Note that our repos are each containing a number of "projects" in the
top level of the repo and all of these have the structure of a svn
repo with trunk, branches and tags subdirectories.

We use VisualSVN with svn version 1.9.7 on the server


-- 
Bo Berglund
Developer in Sweden


Mime
View raw message