This is an archive of the discontinued Mercurial Phabricator instance.

bisect: add a `--rev` flag
Needs RevisionPublic

Authored by SimonSapin on Nov 23 2020, 12:17 PM.

Details

Reviewers
Alphare
martinvonz
Group Reviewers
hg-reviewers
Summary

This is the same as the positional argument, and can be passed more than once.

Diff Detail

Repository
rHG Mercurial
Branch
default
Lint
No Linters Available
Unit
No Unit Test Coverage

Event Timeline

SimonSapin created this revision.Nov 23 2020, 12:17 PM
Alphare accepted this revision.Nov 24 2020, 6:17 AM
mharbison72 added inline comments.
tests/test-bisect.t
236

I'm curious what other reviewers think from an API design- the good/bad/skip is a bool, so it feels strange to get the first revspec free, but then need an option for subsequent ones. Can't multiple revspecs be passed in the way a list of files can be passed into file based commands?

Related: https://bz.mercurial-scm.org/show_bug.cgi?id=5530

marmoute added inline comments.
tests/test-bisect.t
236

The addition of --rev is more to mirror other command that take revset as unnamed argument (eg export). I am totally fine with also making multiple revs accepted by this command.

martinvonz requested changes to this revision.Dec 4 2020, 2:49 PM
martinvonz added a subscriber: martinvonz.
martinvonz added inline comments.
mercurial/commands.py
894

I fear that this will increase the likelihood that the user runs hg bisect -r abc123, so could you insert a patch before this one to make sure that that is an error?

913

nit: while you're touching this code, could you also rename this variable to revs to make it clear that it's a collection?

This revision now requires changes to proceed.Dec 4 2020, 2:49 PM