[PATCH 3 of 4 V2] localrepo: make supported features manageable in each repositories individually
FUJIWARA Katsunori
foozy at lares.dti.ne.jp
Thu Oct 18 02:05:57 CDT 2012
At Sun, 30 Sep 2012 19:05:09 +0000 (UTC),
Matt Harbison wrote:
>
> FUJIWARA Katsunori <foozy <at> lares.dti.ne.jp> writes:
>
> >
> > # HG changeset patch
> > # User FUJIWARA Katsunori <foozy <at> lares.dti.ne.jp>
> > # Date 1348917084 -32400
> > # Node ID b460a0bb2715122cb23f6787f96dd73a70dc3b76
> > # Parent b9c970b1cf86bb02a3126ab25d132eb589d71e69
> > localrepo: make supported features manageable in each repositories individually
[snip]
> Will this series affect hooks installed by extensions? I ask because I have a
> repo at work with the eol extension enabled (which looks like it installs
> hooks) and nested subrepos. There's an inconsistency with the line endings
> used by 'update -C', and I figured it had something to do with the hooks being
> inherited from the parent, but I haven't been able to recreate a simple test
> case to exhibit the problem. If hooks are affected, does this series also fix
> 2904 [1]?
>
> --Matt
>
> [1] http://bz.selenic.com/show_bug.cgi?id=2904
If your eol trouble is as same as example code below, my patch series
is not enough to fix it.
The patch posted by Simon Heimberg at 05 Oct is also required, because
working directory of child subrepo is updated as a part of cloning (=
inter repository cooperation).
http://selenic.com/pipermail/mercurial-devel/2012-October/044865.html
========================================
Create source subrepo tree in LF EOL style:
$ cat >> $HGRCPATH <<EOF
> [extensions]
> # enable globally
> eol =
> [eol]
> native = LF
> EOF
$ cat > hgeol <<EOF
> [patterns]
> **.txt = native
> EOF
$ hg init parent
$ hg init parent/child
$ cp hgeol parent/child/.hgeol
$ printf "first\nsecond\nthird\n" > parent/child/child.txt
$ hg -R parent/child commit -Am '#0 at child'
$ cp hgeol parent/.hgeol
$ printf "first\nsecond\nthird\n" > parent/parent.txt
$ echo 'child = child' > parent/.hgsub
$ hg -R parent commit -Am '#0 at parent'
Clone just only parent repo to prevent from updating working directory
with eol extension.
$ hg clone -U parent cloned
Enable eol locally in "cloned" repo, and change native EOL style
$ cat >> cloned/.hg/hgrc <<EOF
> [extensions]
> # enable locally in "cloned" repo
> eol =
> EOF
$ cat >> $HGRCPATH <<EOF
> [extensions]
> # disable by default
> eol = !
> [eol]
> # change native EOL style: e.g. work on Windows
> native = CRLF
> EOF
Update working directory of "cloned" repo: this also clone/update
"child" subrepo
$ hg -R cloned update -C --config eol.abort=True --traceback
"cloned" and "cloned/child" should be cleaned: but current
implementation detects difference in "cloned/child", because working
directory of it was updated with eol extension enabled in "cloned" as
parent, even though it should not be enabled in "cloned/child" itself.
$ hg -R cloned status -S
$ hg -R cloned/child status
$ hg -R cloned/child diff
========================================
----------------------------------------------------------------------
[FUJIWARA Katsunori] foozy at lares.dti.ne.jp
More information about the Mercurial-devel
mailing list