( )⚙ D6989 push: support config option to require revs be specified when running push

This is an archive of the discontinued Mercurial Phabricator instance.

push: support config option to require revs be specified when running push
ClosedPublic

Authored by spectral on Oct 5 2019, 4:52 PM.

Diff Detail

Repository
rHG Mercurial
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

spectral created this revision.Oct 5 2019, 4:52 PM

Question: should this checking be performed in exchange.push or at the command layer?

(I'm not sure of the answer.)

Question: should this checking be performed in exchange.push or at the command layer?
(I'm not sure of the answer.)

I think where it is makes sense - I'd be wary of pushing it down any further having a much larger area of effect (or, conversely, no effect - it's possible that further down we always have the revs specified). This is also where it is for commands.update.requiredest.

mercurial/commands.py
5616

Do we want to have this have the old behavior if plain? commands.update.requiredest doesn't respect plain. I don't think that it makes sense (or at least - it doesn't make sense to have a category for it: HGPLAINEXCEPT=make-me-specify-revs-to-push seems like it won't really be useful. :)

Question: should this checking be performed in exchange.push or at the command layer?
(I'm not sure of the answer.)

A problem with moving it to exchange is that subrepos implicitly (AFAICT) push all revisions with exchange.push, even when a subset of revisions in the parent is pushed.

pulkit accepted this revision.Oct 8 2019, 3:40 PM
pulkit added a subscriber: pulkit.

The current place for the check looks good. Can you follow-up by adding it to ui.tweakdefaults?

This revision is now accepted and ready to land.Oct 8 2019, 3:40 PM
pulkit added a comment.Oct 8 2019, 3:43 PM

Hm, looks like this needs to be rebased on tip of hg-committed because of recent blackening of codebase.

spectral updated this revision to Diff 17011.Oct 9 2019, 5:39 PM
pulkit accepted this revision.Oct 10 2019, 9:22 AM