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

28.1k views Asked by At

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?

4

There are 4 answers

2
CEPA On BEST ANSWER

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.

0
Hieu Vo On

If you encounter merge conflicts error after running

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

One way to resolve the conflicts is to delete your local branchX and pull the origin/branchX again, it helps in my case

0
internetross On

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
0
dangerismycat On

No idea if this will be helpful for you, but I had a similar situation where a branch was associated with two revisions (due to a cherry-pick from a branch with an associated revision). arc land wouldn't let me land, with the error message

Caught exception: There are multiple revisions on feature branch '{BRANCH_NAME}' which are not present on 'master':

...

Separate these revisions onto different branches, or use --revision <id> to use the commit message from <id> and land them all.

I squashed the commits on the branch to a single commit, which allowed me to land as normal.