[PATCH] merge: avoid to break the dirstate copy status on moved files

Benoit Boissinot bboissin at gmail.com
Tue May 4 17:48:50 CDT 2010


On Tue, May 04, 2010 at 11:25:46PM +0200, Gilles Moris wrote:
> On Tuesday 04 May 2010 02:32:26 pm Benoit Boissinot wrote:
> > On Tue, May 4, 2010 at 9:57 AM, Gilles Moris <gilles.moris at free.fr> wrote:
> > > # HG changeset patch
> > > # User Gilles Moris <gilles.moris at free.fr>
> > > # Date 1272959836 -7200
> > > # Node ID b3046a5f0653552e42c6043d16055995c2978f41
> > > # Parent  35ae6a16b7666185bbb5533c5e85e88c2364f6ea
> > > merge: avoid to break the dirstate copy status on moved files
> > >
> > > In the case a file is locally tracked as copied in dirstate, and that a
> > > merge affects this file, this file should not be marked as modified in
> > > dirstate, as this will break the current copy state.
> > > Note: only affect working directory merge, not branch merge.
> >
> > Do you have an example, that would help reviewing it.
> >
> > thanks,
> >
> > Benoit
> 
> Here is the scenario:
> 
> hg init repo
> cd repo
> echo a > file
> hg ci -Am a
> echo b >> file
> hg ci -m b
> hg up 0
> hg mv file renamed
> hg st -C
>   A renamed
>     file
>   R file
> hg up 1
> hg st -C
>   M renamed
>   R file

By the way, the other way round is buggy as well (changeset 1 moves file
to renamed, update back to 0, modify file, update to 1, it should merge
file and renamed, but it doesn't).

regards,

Benoit

-- 
:wq


More information about the Mercurial-devel mailing list