[PATCH] status: add the --change option to display files changed in a revision
Gilles Moris
gilles.moris at free.fr
Wed Dec 2 15:15:38 CST 2009
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."""
Regards.
Gilles.
More information about the Mercurial-devel
mailing list