On Aug 31, 2015, at 10:46 AM, Stephan Beal <sgb...@googlemail.com> wrote:
> 
> The push fails because a remote hook disallows it. What then?

The same thing that happens when you try to push to a read-only repo, or push 
while the Internet connection is down, or push to a repo you accidentally 
cloned anonymously by forgetting user@ in the URL, or push to a server that’s 
just run out of disk space, or…

Fossil already has to cope with such problems.

> That becomes fossil's problem

No, it’s the hook-writer’s problem.

The hook-writer solves that in the normal way: log the problem so that a human 
can figure out how to solve it, then retry the commit.

This is part of what I was implying when I spoke of a CGI-like hook calling 
protocol.  If you try an HTTP POST to a site you aren’t logged into, it will 
likely give you a 400-series error along with some error text, which tells you 
what happened and gives you a clue how to fix it.  In the same way, an external 
Fossil hook program can return some error code and a string that makes its way 
from the remote host to the local Fossil client.

> Many commercial/enterprise environments don't allow this. We once, after 8 
> months of development using 'maven' as a build tool, had to port everything 
> to ant after discovering that the remote site does not allow external 
> internet access (in or out).

How do you imagine such a problem could bite a Fossil user?

Case 1: They add a hook to the remote server, it fails, so they remove it, and 
Fossil goes back to running.  No 8-month submarine time.

Case 2: They have a perfectly working Fossil setup with hooks, then 8 months 
later they move it to a new remote site, and it fails immediately because none 
of the hook scripts will run.  Now they get to choose whether to disable hooks 
or solve the site restriction.  If they choose the first option, Fossil goes 
back to working the same way it does everywhere else, which I think we can 
agree to summarize as, “Adequate,” at the least. :)

Hooks are optional.  They may add site-specific restrictions, but bypassing 
these restrictions does not harm the Fossil DB.

I imagine some people will try to use hooks to create inviolable constraints, 
but that’s predicated on those hooks actually running, and not being 
bypassable.  That’s purely a local administration problem, not something that 
the Fossil project has to solve.
_______________________________________________
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to