[PATCH STABLE] icasefs: abort update, if added/removed files in working causes case folding collision

FUJIWARA Katsunori foozy at lares.dti.ne.jp
Thu Apr 5 03:54:09 CDT 2012


At Thu, 05 Apr 2012 17:31:13 +0900,
FUJIWARA Katsunori wrote:
> 
> 
> At Wed, 04 Apr 2012 11:47:00 -0500,
> Matt Mackall wrote:
> > 
> > On Wed, 2012-04-04 at 18:35 +0900, FUJIWARA Katsunori wrote:
> > > # HG changeset patch
> > > # User FUJIWARA Katsunori <foozy at lares.dti.ne.jp>
> > > # Date 1333530684 -32400
> > > # Branch stable
> > > # Node ID a2faca19606fece6bab91d0fa7f9b421b2d98cc9
> > > # Parent  4d875bb546dc03db33630f5388d7e04939c386a0
> > > icasefs: abort update, if added/removed files in working causes case folding collision
> > 
> > Doesn't this do the trick:
> > 
> > diff -r 1d8eab6dfe65 mercurial/merge.py
> > --- a/mercurial/merge.py	Tue Apr 03 22:02:04 2012 +0200
> > +++ b/mercurial/merge.py	Wed Apr 04 11:45:59 2012 -0500
> > @@ -568,7 +568,7 @@
> >          action = []
> >          folding = not util.checkcase(repo.path)
> >          if folding:
> > -            _checkcollision(p2, branchmerge and p1)
> > +            _checkcollision(p2, wc)
> >          if not force:
> >              _checkunknown(repo, wc, p2)
> >          action += _forgetremoved(wc, p2, branchmerge)
> 
> If 'wc' is used always, the linear updating case, which you pointed
> out for my past post for d550168f11ce, causes abort for case folding
> collision.
> 
>     If Alice moves 'a' to 'A' and then Bob pulls and updates while he
>     has edits to 'a', will he now have a modified 'A'?
> 
> # http://www.selenic.com/pipermail/mercurial-devel/2011-December/036302.html
> 
> In addition to it, 'removed in working context' case can not be
> detected in this way, because 'workingctx.__iter__()' ignores removed
> files.

Should I add comment into code to explain this ?

----------------------------------------------------------------------
[FUJIWARA Katsunori]                             foozy at lares.dti.ne.jp


More information about the Mercurial-devel mailing list