EOL problems in cvs2svn converted repository

2018-01-11 Thread Bo Berglund
I have converted our CVS repositories to SVN using cvs2svn.py v 2.5.0.
It looked like it was successful but now when I am working in the
checked out code I noticed that the line endings are UNIX style even
when checking out on Windows (our main working platform).
With CVS we always got a conversion from UNIX LF (in the repository)
to Windows CRLF in the working copy.
Not so now...

I have read the SVNBook 1.7 about EOL sequences but I do not
understand what I can do to fix this.
It will not be possible to go through every text file in the
repository and change its "properties" because we store such an
immense number of files in our repositories.
Is there any way to tell the svn client to set line endings to Windows
style when checking out on Windows (similar to the timestamp option I
asked about recently)? And return to repository style on commit...

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.


-- 
Bo Berglund
Developer in Sweden



Re: Question regarding reverse merge of added file

2018-01-11 Thread Johan Corveleyn
On Thu, Jan 11, 2018 at 3:48 PM, Max Bernhardt  wrote:
> Hi Johan,
>
> thanks for the reply. Sorry for the personal mail, but since I'm not
> subscribed, this is the only way I know of to respond.
>
> No our client was still version 1.7.8, so this might have caused the
> problem.
>
> The revert was the first thing I tried, but after that the file was still
> available in my working copy, so I had to remove it
> manually by running svn rm.
>
> Since 1.10 will have more & better capabilities of resolving tree conflicts,
> I can live with the manual workaround until then.
>
> Again, thanks for the reply
> Max

Hi Max,

Okay, thanks for letting me know. Using a 1.7.x client could indeed
have been the underlying cause of the problem to start with. Best to
upgrade your client to the most recent version (i.e. 1.9.7 at this
time).

You could have put the users@ list in cc of your mail to me, but no
problem. I've put users@ in cc again, for completeness of the
archives.

Cheers,
-- 
Johan


Re: EOL problems in cvs2svn converted repository

2018-01-11 Thread Ryan Schmidt

On Jan 11, 2018, at 05:43, Bo Berglund wrote:

> I have converted our CVS repositories to SVN using cvs2svn.py v 2.5.0.
> It looked like it was successful but now when I am working in the
> checked out code I noticed that the line endings are UNIX style even
> when checking out on Windows (our main working platform).
> With CVS we always got a conversion from UNIX LF (in the repository)
> to Windows CRLF in the working copy.
> Not so now...
> 
> I have read the SVNBook 1.7 about EOL sequences but I do not
> understand what I can do to fix this.
> It will not be possible to go through every text file in the
> repository and change its "properties" because we store such an
> immense number of files in our repositories.
> Is there any way to tell the svn client to set line endings to Windows
> style when checking out on Windows (similar to the timestamp option I
> asked about recently)? And return to repository style on commit...
> 
> 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.

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.

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.

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.






Re: Svn access auditing?

2018-01-11 Thread Ryan Schmidt

On Jan 9, 2018, at 01:18, Daniel Shahaf wrote:

> Bo Berglund wrote on Tue, 09 Jan 2018 07:49 +0100:
>> Is there some way to audit non-commit activity in Svn, specifically
>> checkouts?
> 
> Yes, it's called "operational logging".  See 
> http://svnbook.red-bean.com/nightly/en/svn.serverconfig.httpd.html#svn.serverconfig.httpd.extra.logging

Using this operational log, I wrote a script that effectively gives you 
post-checkout and post-update hook scripts that you can write to do whatever 
you want:

http://ryandesign.com/svnhookdispatcher/

I wrote this a long time ago and don't know if it still works.