Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Phabricator arc land won't work because that there are multiple revisions on feature branch

I have two branches, started at different points. They are mostly the same, except for a few extra commits on one of them. When I try to land that one, I get:

Usage Exception: There are multiple revisions on feature branch 'newbranch' which are not present on 'devel': -D newbranch1 -D othernew branch

Separate these revisions onto different branchs, or use --revision ' to use the commit message from and land them all.

I can't find any guidance as to how to separate the revisions onto different branches, or what that even means. Is there any way around this?

like image 549
lpappone Avatar asked Jun 19 '15 20:06

lpappone


2 Answers

I recommend to my developers that they need to use --revision to land the specific change.

Syntax: arc land --revision <diffID> --onto <branch>

For example: arc land --revision D123 --onto develop

Note: Only accepted revision can land.

like image 93
CEPA Avatar answered Oct 22 '22 22:10

CEPA


While the above answer (https://stackoverflow.com/a/30947476/181344) is correct, if you happen to be in a situation where you interact with Phabricator through commands that abstract on top of arc land and are not able to pass the --revision argument directly, know that you also have the option of squashing the commits from different revisions and then attempting to land again.

There is more than one way to accomplish squashing your commits. A couple suggestions are:

$ git checkout my-feature-branch && git reset --soft master && git commmit -am 'my new commit message'

Or

$ git rebase -i master
like image 38
internetross Avatar answered Oct 22 '22 22:10

internetross