[PATCH 6 of 6 V2] dirstate: read from pending file under HG_PENDING mode if it exists
FUJIWARA Katsunori
foozy at lares.dti.ne.jp
Wed Oct 14 03:38:18 CDT 2015
At Tue, 13 Oct 2015 12:30:44 -0700,
Pierre-Yves David wrote:
>
> On 10/13/2015 10:54 AM, FUJIWARA Katsunori wrote:
> > # HG changeset patch
> > # User FUJIWARA Katsunori <foozy at lares.dti.ne.jp>
> > # Date 1444758557 -32400
> > # Wed Oct 14 02:49:17 2015 +0900
> > # Node ID 68fdb7150daad2ea8747b65145d00acab9be01de
> > # Parent f452ff0cefe2755caff781f95bd135038e3d4776
> > dirstate: read from pending file under HG_PENDING mode if it exists
>
> This series is pushed to the clowcopter. Does this conclude your
> dirstate run?
Even after this series, there are some situations that in-memory
changes (not only for dirstate, but also for changelog and so on)
aren't visible to external hook/commit log editor process.
I have some patches to make in-memory changes visible to all related
external process (even though they don't change dirstate itself).
> Do we have any mechanism to clean up a stalled .pending file? this
> should like something we should guard ourself against.
Oh, I overlooked the case that temporary files ('.pending' or so) are
accidentally left.
How about this ?
(1) check existence of 'journal.backupfiles' before starting
transaction (maybe in 'transaction.__init__' ?)
(2) unlink files registered in it, if it exists (= meaning failure
of cleanup at preceding transaction)
These functions can be easily factored out from 'rollback' and
'_playback' in transaction.py.
BTW, this method requires some additional preparations, because
current unlinking 'journal.backupfiles' logic in transaction.py
prevents this file from being used as "failure of cleanup at preceding
transaction" mark, AFAIK.
> --
> Pierre-Yves David
>
----------------------------------------------------------------------
[FUJIWARA Katsunori] foozy at lares.dti.ne.jp
More information about the Mercurial-devel
mailing list