[PATCH 1 of 8] largefiles: replace "_isXXXXing" attributes with "_lfautocommit"
FUJIWARA Katsunori
foozy at lares.dti.ne.jp
Wed Sep 24 08:11:36 CDT 2014
On Mon, 22 Sep 2014 11:14:56 +0200, Mads Kiilerich <mads at kiilerich.com> wrote:
> Hi
>
> I like that this patch series improve largefiles to handle more corner
> cases correctly. Nice work!
>
> I do not so much like increasing amount of hacks we have to use. It is
> not like I feel we finally got it right and now can start cleaning up
> and simplifying the code. Instead, in order to take the next steps, this
> series has to introduce more complexity and more callbacks in core
> Mercurial.
>
> I wonder if we should try a different approach. As you point out, it is
> almost impossible to do the right thing in the internal commit functions
> - they don't have enough context. One alternative could be to hook in at
> the very low level, updating the standin files whenever they are read
> and propagate their change whenever they are written. Another approach
> would be to do all synchronization before/after calling in to core
> Mercurial and let the core pretty much treat standin files like any
> other file. I have played around with that approach and posted a proof
> of concept.
>
> /Mads
Thank you for your comments, and sorry for late response.
Your approach posted as PoC looks simple and good !
But on the other hand, I'm also worry about below for it.
- performance impact on large scale repositories
Examination of updating for ALL standins after original command
logic may have serious performance impact on large scale
repositories, because it may imply file I/O on many standins.
In many cases, updated standins can be known exactly, and deep
hooking can avoid such performance impact (even though revert,
update and merge cases are not yet optimized :-P)
- import => scmutil.marktouched with filelist
- revert => cmdutil._performrevert with actions
- update/merge => merge.applyupdates with actions
- visibility of largefiles for hooks
Hooks below can't see appropriate largefiles in the working
directory, because only standins are updated while command
execution.
- precommit, pretxncommit and commit hooks for automated
committing
- update hooks for "hg update", "hg merge" and automated
committing implying the working directory update/merge.
Even though these hooks can't see appropriate largefiles now too :-),
deep hooking can fix this problem.
What do you think about these points ?
--
----------------------------------------------------------------------
[FUJIWARA Katsunori] foozy at lares.dti.ne.jp
More information about the Mercurial-devel
mailing list