[PATCH 2 of 5] localrepo: invoke dirstate.unsureifambig in wwrite for safety
pierre-yves.david at ens-lyon.org
Tue Jun 30 11:04:15 CDT 2015
On 06/30/2015 09:00 AM, Martin von Zweigbergk wrote:
> On Tue, Jun 30, 2015 at 8:50 AM FUJIWARA Katsunori
> <foozy at lares.dti.ne.jp <mailto:foozy at lares.dti.ne.jp>> wrote:
> At Mon, 29 Jun 2015 04:23:47 +0000,
> Martin von Zweigbergk wrote:
> > [1 <text/plain; UTF-8 (7bit)>]
> > On Sun, Jun 28, 2015 at 9:07 AM FUJIWARA Katsunori
> <foozy at lares.dti.ne.jp <mailto:foozy at lares.dti.ne.jp>>
> > wrote:
> > >
> > > OK, I'll try to fix problems by invoking `dirstate.write()` at
> (*1) !
> > Great! I wasn't sure if I was missing something and wasting
> > time. I'm glad it now seems it was worthwhile. And thanks for
> working on
> > this! I'm pretty sure I've been bitten at least twice by this while
> > rebasing (dirty file appeared clean).
> Thanks for your many suggestions, too !
> > Just a reminder that adding a check for dirty dirstate in
> > localrepo.wwrite() seems like a good way to find the places to
> fix (and
> > perhaps for printing a warning after we've fixed the known buggy
> You mean steps like below, or others ?
> I meant that something as simple as adding the following two lines to
> the top of localrepo.wwrite() seems helpful for finding bugs:
> if self.dirstate._dirty:
> util.dst("BUG: writing file to disk while dirstate is dirty")
And we can hide that behind a "devel-warning" flag. That wil get the
test suite to complains (and devel machin properly configured)
More information about the Mercurial-devel