On Jun 28, 2006, at 23:00, Joe wrote:
> I'm trying to migrate some source code repositories that were
> created on Windows XP to FreeBSD. The svnadmin dump and load work
> well, but in the dump file, the source files end up with visible
> CRs at the end of each file and when I checkout the individual
> files from BSD, they also contain CRs. If possible, I'd like to
> remove the CRs in the migration and not have to do a massive
> revision at either end. I've read the discussion in the Subversion
> book about svn:eol-style and I was hoping that by setting svn:eol-
> style to LF on the Windows side I could do have the svnadmin dump
> eliminate the CRs. However, it seems that propset only works on
> client files, in other words I can't do
>
> svn propset svn:eol-style LF c:/path/to/repos
>
> Any suggestions? If it makes any difference, I have svn 1.2.3 on
> Windows and 1.3.2 on FreeBSD [no, it's not a typo].
The svn:eol-style property and svnadmin dump have nothing to do with
one another. It sounds like you've just been checking in files with
DOS linefeeds, and without any svn:eol-style property. Wouldn't
matter what OS the server is running on; it'll just accept and store
the bytes you send it. If you send it DOS linefeeds, it'll store those.
If you're now wanting the files you check out to have Unix linefeeds,
then you should set the svn:eol-style property on each file for which
you want this to happen. Doesn't matter if you do this before or
after the dump/load cycle, but you'll have to do it at some point if
you want that conversion to take place. There are scripts to help
with this. See below.
Note that svn propset svn:eol-style LF c:/path/to/repos doesn't work,
because the property is relevant for individual files, not for
directories.
You must decide what types of files you want to have this linefeed
conversion performed on. You're unlikely to want it on images or
other binary files, for example, because such conversion would ruin
such files. So only set svn:eol-style on text files where you
actually want this to happen. Perhaps you want all *.html files this
way, or all *.php or *.c files or whatever. You can set up automatic
properties (auto-props) so that all new files matching this glob
expression automatically get the indicated property(ies).
Although that would take care of future files, you'll need to
manually take care of all the files you currently have in the repo.
There are a few scripts you can use to apply auto-props definitions
after the fact to files already in the repo.
Auto-props are a client-side affair; while you may have your client
configured correctly, Joe Coworker down the hall may forget. To
prevent him from mucking up your newly polished and auto-propped
repo, you can install a pre-commit hook, preventing the commit of any
file which is missing any required property, as defined by you.
For more on all of this with URLs to relevant pages, see this mail I
wrote before:
http://svn.haxx.se/users/archive-2006-01/0485.shtml
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Jun 29 00:13:10 2006