Working with git-svn or hgsubversion (was: Move part of macports infrastructure to GitHub)

Ryan Schmidt ryandesign at macports.org
Mon Mar 17 02:01:34 PDT 2014


On Mar 16, 2014, at 17:18, Rainer Müller wrote:

> a) No support for svn:ignore property
> 
>  Easy to accomplish, we would just keep the equivalent in .gitignore
>  and .hgignore files in the repository root. The svn:ignore property
>  would still be the authoritative value. As these are barely set at
>  all in the ports tree, that should not be a problem.

Agreed. To Clemens’ point that these could get out of sync, a pre-commit hook on the Subversion server could ensure that they are not out of sync (or else block the commit, with a message telling the user how to make them sync).


> b) No support for svn:keywords property
> 
>  Most notably we are using svn:keywords to replace the $Id$ string in
>  every Portfile. I think this string is of limited use and we could do
>  without it.
> 
>  See also this ticket for a detailed discussion of the problem:
>  http://trac.macports.org/ticket/38902
> 
>  (Following the comments in the ticket,  it's not even an issue with
>  newer versions of git-svn any more. What about hgsubversion?)

Agreed, we could get rid of the $Id$ line and stop using svn:keywords.


> c) No support for svn:eol-style property
> 
>  Do we need that at all, anyway? I don't think anybody is editing this
>  on Windows, so I doubt we would ever see a file with CRLF line
>  endings.

We want our text files to have only LF line endings—not CRLF line endings, and certainly not a mix of LF and CRLF line endings. I don’t know if anyone uses an editor that defaults to other than LF line ending styles, but I don’t want to find out about it after a lot of bad commits have already been made. svn:eol-style is enforced on the client side. To prevent problems caused by clients that don’t do this, we could write a pre-commit hook to enforce this in the repository. A hook to enforce that the required properties are set was already planned for a long time:

https://trac.macports.org/ticket/12594

The idea to write a hook to prevent non-respected properties is here:

https://trac.macports.org/ticket/38902





More information about the macports-dev mailing list