Closed Bug 1097189 Opened 10 years ago Closed 10 years ago

|hg push -r tip^::tip review| leads to "submitting 2 changesets for review"

Categories

(MozReview Graveyard :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: MattN, Unassigned)

References

Details

Attachments

(1 file)

Attached file Console output
I used the new syntax from bug 1089685 to push one commit (tip^ as the base and tip as the revision) but it ended up trying to make reviews for both.
Note that I updated version-controls-tools just before doing this so I was running 3ba7235c8b66.
This seems expected.

The :: operator is inclusive. Verify this with `hg log -r tip^::tip`. That will print 2 changesets.

What did you expect would happen?

(You may want to re-read http://www.selenic.com/hg/help/revsets to boost your understanding of revsets.)
Flags: needinfo?(MattN+bmo)
I thought it would work like `hg diff -r tip^::tip` which isn't inclusive.
Flags: needinfo?(MattN+bmo)
This comes down to behavior of X::Y being inclusive versus exclusive.

Since we are overloading 'push -r' to specify commits for review, we are using Mercurial's built-in revset evaluation code paths, which will expand X::Y inclusively. I strongly object to changing the semantics of revsets on our already overloaded push command.

I grok that people sometimes do `hg diff -r X^::X` to see what will be done. However, this syntax is a bit clunky and IMO is not preferred. First, `hg diff -c X` is equivalent to `hg diff -r X^::X`. The former is simpler (albeit a one-off because Mercurial tends to favor '-r' being a universal argument. Second, I believe that `log -r` and `export` are superior to `diff` for answering the "what will be reviewed" question. The former gives you a summary of the commit metadata. The latter gives you the commit metadata *and* the the diffs. IMO these commands should be used instead of diff. (I tend to only use diff when I want the cumulative diff across multiple revisions, not the per-commit diff.)

If there is anything to do here, it would be to write better documentation. Per https://mozilla-version-control-tools.readthedocs.org/en/latest/contributing.html#bug-and-review-requirements, you don't need a review or a bug to update the docs. If you want to scratch this itch, go for it.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → INVALID
Product: Developer Services → MozReview
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: