[PATCH] status: add the --change option to display files changed in a revision
Matt Mackall
mpm at selenic.com
Wed Dec 2 15:26:36 CST 2009
On Wed, 2009-12-02 at 22:15 +0100, Gilles Moris wrote:
> On Wednesday 02 December 2009 09:59:54 pm Matt Mackall wrote:
> > > For a merge, the status is from the second parent, which is consistent
> > > with diff --change.
> >
> > Ugh. That's wrong. The status of a merge changeset should agree with the
> > status of the merged working directory before committing it. And that is
> > the change relative to -both- parents. The 'ugh' here is that I don't
> > think there's a simple way to generate such a status.
> >
> > Also, I think your interpretation of what diff --change is doing is
> > incorrect:
> >
> > elif change:
> > node2 = repo.lookup(change)
> > node1 = repo[node2].parents()[0].node()
> >
> > That seems to be comparing 'change' and its first parent. Which is
> > correct by the measure above: diff in a working directory always reports
> > changes relative to the first parent, even if there's a merge.
>
> Yeah, you're right of course.
> Those are the changes brought by the branch of the second parent, based on the
> first parent, right ?
>
> So is that better:
>
> """The --change option can also be used as a shortcut to list
> the changed files of a revision from its first parent."""
No, because I still don't think that's the right behavior for merges.
--
http://selenic.com : development and support for Mercurial and Linux
More information about the Mercurial-devel
mailing list