[PATCH 1 of 2] journal: add dirstate tracking

Martijn Pieters mj at zopatista.com
Mon Jul 4 09:17:39 EDT 2016

On 4 July 2016 at 14:09, Yuya Nishihara <yuya at tcha.org> wrote:
>> > I understand why this is necessary, but it seems wrong to try to take a lock
>> > in lock.releasefn(), which can't guarantee consistency. We could delay
>> > "lock.held = 0" after releasefn() as the lock wasn't released yet, but it
>> > would result in two releasefn() calls.
>> >
>> > Instead, I think it will be way simpler if the journal has a dedicated lock,
>> > and we can get rid of the cycle between journalstrage and localrepo.
>> I still need access to the repo object to support shared repositories,
>> I think. I'll look into a dedicated lock, that'd make this a lot
>> simpler probably.
> I guess shared path can be resolved when attaching the journalstorage to the
> repo, but I just looked over the code quickly, I might be wrong. Strictly
> speaking, it would be layering violation to pass an object holding repo to
> dirstate.

I'm already working on a new patch here; we can indeed avoid storing
the current repo at least by resolving sharing info when creating the
journalstorage instance.

Martijn Pieters

More information about the Mercurial-devel mailing list