[PATCH] status: add the --change option to display files changed in a revision
Matt Mackall
mpm at selenic.com
Wed Dec 2 20:59:54 UTC 2009
On Wed, 2009-12-02 at 21:31 +0100, Gilles Moris wrote:
> On Wednesday 02 December 2009 03:46:53 am Greg Ward wrote:
> > > If one revision is given, it is used as the base revision.
> > > If two revisions are given, the differences between them are
> > > - shown.
> > > + shown. The --change option can also be used as a shortcut.
> >
> > This could use a smidge more detail. Perhaps:
> >
> > The --change option can also be used as a shortcut to summarize
> > the changes between a revision and its first parent.
> >
> > > + ('', 'change', '', _('change made by revision')),
> >
> > Needs a verb. Maybe "summarize change made by revision"? "show
> > change made by revision?". I like "summarize". And the help for
> > "diff -c" should probably become "show change ...".
> >
> > Greg
>
> Trying, for the command help:
>
> """The --change option can also be used as a shortcut to list
> the changed files of a revision."""
>
> 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.
--
http://selenic.com : development and support for Mercurial and Linux
More information about the Mercurial-devel
mailing list