On 4/3/13 10:45 PM, Kartikaya Gupta wrote:
> On 13-04-03 19:49 , Jesse Ruderman wrote:
>  > But can we do this with rebased changesets instead of "trivial" merge
> > changesets? While the core of hg can handle merges, pretty much none of
>  > the tools we rely on for understanding history (hg {log, grep, diff,
>  > bisect}) handle them well.
>
> Do you have specific examples of how hg log, grep, and diff break down
> with merges? I've had issues with bisect, but AFAIK the other commands
> should be able to deal with merges well enough.


Understanding a changeset:

* Try to understand what happened in a changeset. (For a normal changeset, you'd use "hg diff" or "hg log -p" or "hg export".) For a merge changeset, your first question might be whether the merge was trivial. If not, where not, and how was each conflict resolved?

* Try to understand the shape of history around a merge. Which parent was 'inbound' and which parent was 'central'? From central's perspective, what changes did this bring in from inbound? (These questions are possible to answer with pushlog, debugancestor, and log.)


hg log:

* [hg log modules/libpref/src/init/all.js] includes lots of bogus trivial merges.

* Was revision X quickly followed by a backout? With branchy history, there's no "the next 10 changesets".


hg bisect:

There are three reasons hg bisect might blame a merge. I've hit them all many times and they're all unpleasant. (I taught Gary's bisect wrapper to distinguish between the cases, which helps a little.)

A. From the perspective of mozilla-central, the bug was introduced by a merge from inbound. My 'start' revision came after the common ancestor. I have to start over or use --extend.

B. The problem was actually introduced by the merge; both parents are free of the bug. What patches on each side contributed to the problem? hg bisect can't answer this question.

C. I marked a changeset as 'bad' when it actually had a different bug than the one I was bisecting for. hg bisect blames a random merge changeset whose parents it hasn't even tested.


hg grep and hg blame:

* These seem ok, actually. Except that I lose my sense of the order in which changes were made.


These are just the problems I've hit with the occasional merges from long-lived branches, and between inbound and central. I'd expect things to be much worse if every changeset were accompanied by its own merge. The "merge, then fix" possibility for scenario D scares me too.
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to