Closed Bug 1340569 Opened 7 years ago Closed 6 years ago

Make `git mozreview push` error when in rebase session

Categories

(MozReview Graveyard :: Integration: Git, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: ato, Unassigned)

Details

I made a big mistake earlier today by running `git mozreview push` whilst in a rebase session.  This caused me to drop four commits that I had previously been given r+ on from mozreview.  Because mozreview does not let the author reset the r+’es, I had to request the reviewer to go over them again.

This is obviously a user error and I should have been more careful not to publish the review without examining the patch list in the changeset first, but it would probably be safer to have `git mozreview push` refuse to submit new changes if it detects that a rebase session is in progress.

Desired behaviour:

% git status
interactive rebase in progress; onto e23a077
Last commands done (3 commands done):
   pick 5eba48f Bug 1333014 - Introduce new exceptions to Python client; r?whimboo
   e b9f6e16 Bug 1333014 - Support intercepted clicks and align with spec; r?maja_zf,whimboo,automatedtester
  (see more in file .git/rebase-merge/done)
Next commands to do (4 remaining commands):
   pick 3ab2b28 Bug 1333014 - Pretty-print HTML elements; r?maja_zf
   pick 93f6081 Bug 1333014 - Remove unused element.isInteractable API; r?maja_zf
  (use "git rebase --edit-todo" to view and edit)
You are currently editing a commit while rebasing branch '1333014' on 'e23a077'.
  (use "git commit --amend" to amend the current commit)
  (use "git rebase --continue" once you are satisfied with your changes)

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

	modified:   testing/marionette/interaction.js

no changes added to commit (use "git add" and/or "git commit -a")
% git mozreview push
error: interactive rebase in progress
That would have the opposite effect for me: I use git mozreview push during interactive rebase all the time.

It seems to me reviewboard should be able to correlate the new push with the older ones according to the MozReview-Commit-ID...
MozReview is now obsolete. Please use Phabricator instead. Closing this bug.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.