[darcs-users] darcs patch: Resolve issue1093: warn about ugly?patch... (and 1 more)
Dan Pascu
dan at ag-projects.com
Wed Feb 4 21:25:13 UTC 2009
On Wednesday 04 February 2009, Trent W. Buck wrote:
> Dan Pascu <dan at ag-projects.com> writes:
> > On Tuesday 03 February 2009, Eric Kow wrote:
> >> On Tue, Feb 03, 2009 at 19:56:57 +0200, Dan Pascu wrote:
> >> > I agree. It's an absolute NO to impose someone's view on style on
> >> > everybody else.
> >>
> >> Okay, that's three comments, all pointing in the same direction.
> >> Thanks all!
> >
> > As I said, I do think there can be some merit to the idea if done
> > right. Say we have some functions to check specific predefined
> > rules, but by default they do not enforce anything. Then let's say I
> > have a way to indicate per repository that want to use certain rules
> > that I find useful. Say something like:
> >
> > darcs setpref patch_naming_rules
> > "length=10:70,capitalize,end_with_dot"
>
> I'm interested in such an approach, but I'm not interested in coding
> it.
>
> But if we are to take a configurable/generic approach, I would prefer
> this logic to be encoded in a "pre-hook" rather than in Darcs' own
> codebase. This would make it easier for users to add very complex
> validation rules without needing to patch Darcs.
One issue with a pre-hook is that is avertable. A second issue is that is
not enforceable per project as it only applies to the repository where it
is configured in prefs (or at most to a user if in defaults).
My idea, is that if someone chooses to impose some style rules in patch
naming in a project, one wants to enforce them amongst all developers
participating in that project. I see this as a project wide style policy
and I do not want a user to ignore it. Even more, I do not want the user
to be forced to go back and amend all his ill named patches because
otherwise he cannot push them to a repo with a pre-hook. I would want him
to see this as soon as possible, when he records. Imagine some third
party trying to contribute to your project. Gets the repo, records some
changes and then sends over email. I will have to write back just to say
they need to be renamed, because he never sees my pre-hooks and is
unaware of the style policy.
My idea with setpref is that it can propagate between sibling
repositories, much like a boring file setting, unlike any hook.
--
Dan
More information about the darcs-users
mailing list