[PATCH] eol: support alternate location for .hgeol file (issue3975)

Jorge Acereda jacereda at brainstorm.es
Mon Jul 15 13:02:48 CDT 2013

On Jul 15, 2013, at 10:05 AM, Martin Geisler wrote:

> Jorge Acereda <jacereda at brainstorm.es> writes:
>> On Jul 11, 2013, at 4:01 PM, Martin Geisler wrote:
>>> Jorge Acereda <jacereda at brainstorm.es> writes:
>>>> # HG changeset patch
>>>> # User Jorge Acereda <jacereda at brainstorm.es>
>>>> # Date 1373469140 -7200
>>>> # Branch stable
>>>> # Node ID 3487e904f78164e70cf91552419e1ecf235d8daf
>>>> # Parent  fbdac607bff3dfc0056268ca77e524a5ddd4f665
>>>> eol: support alternate location for .hgeol file (issue3975)
>>> I'm still not completely convinced that this is a good idea, but here
>>> are some review comments on your patch.
>> Nor am I, if you have a good solution for this scenario I'd be glad to
>> hear it.
>> Basically I have 80 subrepos and I don't want to maintain 80 .hgeol
>> files.
> Here is a possible alternative: Writing a update-subrepo-hgeol.sh script
> in the outer repository should be simple. It would do
>  #!/bin/sh
>  hg debugsub | grep '^path' | cut -c 6- | while read -r sub; do
>      cp dot.hgeol "$sub/.hgeol"
>  done
> That is, it copies dot.hgeol from the outer repository into the
> subrepositories. Maybe you've already rejected this for some reason?

I considered something like that (based on 'onsub' extension, I didn't know about 'debugsub' and looking at the name perhaps I shouldn't depend too much on it...).

Well, I only told part of the story. Besides those 80 subrepos I have ~6 shell repos. 

The script would need to be applied in all of them, because all of those shell repos have one or several subrepos that are unique to them.

The script would introduce unnecessary artificial activity in the subrepos. Not a big deal, but...

The shared-config repository (the one that contains all the mercurial settings except ui.username and auth) is already in place and has proven quite useful. Given that we want to have all the same aliases/extensions in all of our dev machines, looks like that repo is a sane way to accomplish something like that. Also, we are a small company and ensuring everyone synchronizes it is as easy as yelling. So, this seems like the obvious place for hgeol configuration.

Laurens mentioned ui.ignore (which I happen to use and find it quite useful for the same reason as this proposal and encouraged me to try to write something like that for .hgeol). Your script could be used as well for maintaining .hgignore, but at some point looks like someone decided it was a good idea. Is there anything that makes .hgeol different from .hgignore?

Taking .hgeol/.hgignore out of the repositories seems like a good thing to me. I might be wrong and perhaps there're gotchas that I didn't consider... (Laurens refers to some 'ui.ignore mess'?)

More information about the Mercurial-devel mailing list