comparison tests/test-phabricator.t @ 44774:c1c922391314 stable

phabricator: ensure that `phabsend` is given a contiguous, linear commit range Supplying a non-linear range was another orphan factory. While in theory there could be a use case for skipping over garbage commits (like adding debugging) and getting the valuable commits extracted out at the same time as posting a review, it seems far more likely that specifying a non-linear range is a user error. This is another case of issue6045, but predates both 0680b8a1992a and 601ce5392cb0. Neither the `--no-amend` case nor resubmitting a previously submitted commit would cause orphans. But for the sake of simplicity and to keep the parents tracked on Phabricator in the proper state, ban missing commits unconditionally. Differential Revision: https://phab.mercurial-scm.org/D8454
author Matt Harbison <matt_harbison@yahoo.com>
date Thu, 16 Apr 2020 19:05:25 -0400
parents 601ce5392cb0
children cf3e07d7648a
comparison
equal deleted inserted replaced
44772:5e788dc7fb5d 44774:c1c922391314
587 repository tip rolled back to revision 1 (undo phabimport) 587 repository tip rolled back to revision 1 (undo phabimport)
588 $ hg phabimport --no-stack D7917 D7918 --test-vcr "$VCR/phabimport-multi-drev.json" 588 $ hg phabimport --no-stack D7917 D7918 --test-vcr "$VCR/phabimport-multi-drev.json"
589 applying patch from D7917 589 applying patch from D7917
590 applying patch from D7918 590 applying patch from D7918
591 591
592 Phabsend requires a linear range of commits
593
594 $ hg phabsend -r 0+2+3
595 abort: cannot phabsend multiple head revisions: c44b38f24a45
596 (the revisions must form a linear chain)
597 [255]
598
592 Validate arguments with --fold 599 Validate arguments with --fold
593 600
594 $ hg phabsend --fold -r 1 601 $ hg phabsend --fold -r 1
595 abort: cannot fold a single revision 602 abort: cannot fold a single revision
596 [255] 603 [255]
597 $ hg phabsend --fold --no-amend -r 1:: 604 $ hg phabsend --fold --no-amend -r 1::
598 abort: cannot fold with --no-amend 605 abort: cannot fold with --no-amend
599 [255]
600 $ hg phabsend --fold -r 0+3
601 abort: cannot fold non-linear revisions
602 [255] 606 [255]
603 $ hg phabsend --fold -r 1:: 607 $ hg phabsend --fold -r 1::
604 abort: cannot fold revisions with different DREV values 608 abort: cannot fold revisions with different DREV values
605 [255] 609 [255]
606 610