Opened 17 years ago

Closed 8 years ago

#12594 closed enhancement (wontfix)

svn props pre-commit hook

Reported by: jmpalacios (Juan Manuel Palacios) Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: server/hosting Version:
Keywords: Cc: macports-mgr@…, cooljeanius (Eric Gallager)
Port:

Description

We require some svn properties to be set on some of the files we commit to our repo, like Id's and eol style. Some of our committers remember to include them and some don't, so having a pre-commit hook that checks for these properties on a file name basis (for instance, Portfiles must have this and that property set), and rejects the commit with a proper error message otherwise, would be great.

I'll see about writing the hook myself and attaching it here to this ticket, so that the only necessary thing left to make it work is installing it on svn.macports.org

-jmpp

Change History (9)

comment:1 Changed 17 years ago by jmpalacios (Juan Manuel Palacios)

Keywords: svn props pre-commit hooks added

comment:2 Changed 17 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ryandesign@… added

I already wrote and mostly tested such a hook. I'll see if I can find where I put it.

comment:3 Changed 17 years ago by jmpalacios (Juan Manuel Palacios)

Please do attach it here to this ticket, I would love to have a look at it, if I may... ;-)

-jmpp

comment:4 Changed 17 years ago by ryandesign (Ryan Carsten Schmidt)

I have found the script and will attach it, after I test it again to make sure it works as intended. It does a combination of testing the file's Subversion properties and some minor lint-like checking. Since we now have "port lint" in trunk, which is much more comprehensive, I'll probably want to rip out the lint-like functionality and replace it with a call to port lint. Many (or most) portfiles do not conform to port lint at this time, since port lint is not yet in a released version of MacPorts. Also, port lint has not yet been updated for the recent decision (at least I think it's been decided) to put a vim/emacs line before the Id line, and to use no tab characters in portfiles anymore. Therefore, I would like the port lint output to be made available to the committer, but not prevent the commit. The pre-commit hook does not accommodate sending non-error output to the user, so I believe this should be implemented as an additional email sent to the committer in the event that the port does not pass port lint.

comment:5 Changed 17 years ago by wsiegrist@…

Owner: changed from kvv@… to ryandesign@…

If you have the hook, please attach. We're using the latest release of MP (1.5.2 right now), so like you said, need to watch out for the use of port lint. If you need some help writing it, attach and assign to me. If you want to wait till the next MP release, please hold the ticket until then.

comment:6 Changed 16 years ago by raimue (Rainer Müller)

Milestone: Website & Documentation

comment:7 Changed 16 years ago by (none)

Milestone: Website & Documentation

Milestone Website & Documentation deleted

comment:8 Changed 12 years ago by cooljeanius (Eric Gallager)

Cc: egall@… added

Cc Me!

comment:9 Changed 8 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ryandesign@… removed
Keywords: svn props pre-commit hooks removed
Resolution: wontfix
Status: newclosed
Version: 1.5.0

MacPorts is moving to GitHub, at which point we will no longer be using Subversion properties.

Note: See TracTickets for help on using tickets.