Renames and deletes during merge: unexpected behaviour

Matt Mackall mpm at selenic.com
Thu Jan 26 23:17:22 UTC 2012


On Thu, 2012-01-26 at 22:20 +0000, Haszlakiewicz, Eric wrote:
> > -----Original Message-----
> > From: mercurial-bounces at selenic.com [mailto:mercurial-
> > > After initial WTF we narrowed it down to the following steps:
> > > To sum up
> > > - I had a file.
> > > - I moved it into new directory on one branch
> > > - I deleted it on the second.
> > > - During merge this file returned.
> > > In our case this was result of adjusting repo layout on one branch
> > and
> > > refactoring on another (some stuff was obsolete).
> > > There were multiple revisions on both branches - repro is just
> > simplified.
> > >
> > > For me it is a bug although non fatal (I didn't lost any data - I got
> > > some back again :)
> > 
> > I don't consider this a bug. Consider:
> > 
> > Alice: hg mv buggy-driver.c new-driver.c; hg ci -m 'shiny new driver'
> > Bob: hg rm buggy-driver.c; hg ci -m 'this thing never worked'
> > Alice: merge with Bob
> 
> I would argue that that is a misuse of mv to create what is logically
> a new file.

Unfortunately, I designed the system for Alice, not you. Debate on
Mercurial's rename philosophy has been moot for half a decade.

-- 
Mathematics is the supreme nostalgia of our time.





More information about the Mercurial mailing list