[PATCH] low level commit command
Matt Mackall
mpm at selenic.com
Sat May 21 20:09:17 UTC 2005
On Sat, May 21, 2005 at 11:31:09AM -0400, Christopher Li wrote:
> On Sat, May 21, 2005 at 10:57:02AM -0700, Matt Mackall wrote:
> > >
> > > It refuse to add a new version if it is the same as the tip(). Just
> > > return the tip instead.
> >
> > That will get us into trouble. It's better to just burn a file index
> > entry.
>
> OK, I will take that out for now. Wait until the other stuff is ready.
>
> >
> > If we're merging two branches and a file is not the same in the
> > branches, but it happens to be the same as tip (ie local changed it,
> > and the result of merge3 was to take all the local changes and dump
> > all the remote ones), then we need an entry in the file's index for
> > it, pointing back to the changeset. The file -did- change from the
> > perspective of the remote branch.
> >
>
> In my experiment merge code, prev is the first parent so this will not
> happen. I agree using that with current way of merge will be problematic.
It will happen. It's the second parent that causes the problem. I ran
into this earlier this week. We need an entry in the file log to
correspond to the entry in the changeset. And that entry -must- point
back to the changeset.
This is correct because from the perspective of parent2, the file
-has- changed.
Again, it's better to waste an entry in the index and have a very
consistent set of metadata than add special-case logic.
--
Mathematics is the supreme nostalgia of our time.
More information about the Mercurial
mailing list