Ambiguous ancestor prevents landing

$ arc land --revision D4255 --onto master
 STRATEGY  Merging with "squash" strategy, the default strategy.
 SOURCE  Landing the current branch, "branchName".
 ONTO REMOTE  Landing onto remote "origin", the default remote under Git.
 ONTO TARGET  Refs were selected with the "--onto" flag: master.
 INTO REMOTE  Will merge into remote "origin" by default, because this is the remote the change is landing onto.
 INTO TARGET  Will merge into target "master" by default, because this is the "onto" target.
 FETCH  Fetching "master" from remote "origin"...

  $   git fetch --no-tags --quiet -- origin master


 INTO COMMIT  Preparing merge into "master" from remote "origin", at commit "97a1faf2removed".

 <!> AMBIGUOUS REVISION 
The revision associated with commit "25ed5bfc6removed" (an ancestor of:
branchName) is ambiguous. These 2 revision(s) are associated with the
commit:

  *   D4254 diff title 1
  *   D4252 diff title 2

 USAGE EXCEPTION  Revision for commit "25ed5bfcremoved" is ambiguous. Use "--revision" to force selection of a particular revision.

Both suggested revisions/diffs have been landed. D4255 has not – I see it in Phabricator. It is approved. I have tried rebasing this branch against master and then arc diff --update D4255 but this did not fix the above issue. How exactly should I clear it?

Is the change in 25ed5bfc6removed already landed upstream? It sounds like that commit is included in your branch but shouldn’t be.

Yes it was already landed. My boss told me I could diff off another diff if both shared code.

Is there any way to still land this? The only way I see is to redo it manually off master to avoid this shared commit issue.

Can you show the output of these commands:

arc which

HEADS='HEAD branchName master origin/master 25ed5bfc6removed 97a1faf2removed'
git log --oneline --graph --decorate=short $HEADS ^`git merge-base $HEADS`~

Sure, here is the output

// arc which
$ arc which
REPOSITORY
To identify the repository associated with this working copy, arc followed this process:

    Configuration value "repository.callsign" is empty.

    This repository has no VCS UUID (this is normal for git/hg).

    The remote URI for this working copy is
    "ssh://git@ipHere/diffusion/40/project.git".

    No repositories matched the query. Check that your configuration is
    correct, or use "repository.callsign" to select a repository explicitly.

This working copy is not associated with any repository.

COMMIT RANGE
If you run 'arc diff', changes between the commit:

    f6708564b32fd90d  Merge branch 'master' of
ssh://ipHere/diffusion/40/flipkik

...and the current working copy state will be sent to Differential, because
it is the first commit between '97a1faf2bf43cd09ceabcda0b125225ea3d7bf6b'
(the merge-base of 'origin/master' and HEAD) which is also contained by
another branch (editOrDeleteEvent, master).

You can see the exact changes that will be sent by running this command:

    $ git diff f6708564b32fd90d..HEAD

These commits will be included in the diff:

    095fecb7103345c8  Merge branch 'master' into editOrDeleteEvent
    25ed5bfc67d47986  clean up commented code
    0e9abafae533451c  Edit and cancel event - 186
    26ddb92b7e086f3e  Merge branch 'editOrDeleteEvent' of https://github.com/user/project into editOrDeleteEvent
    51f959a6721a3c69  Merge branch master of github.com:user/project into editOrDeleteEvent
    643396c555b1c592  remove console statements
    9416c3125c5afa77  update ignore
    53191c4c9130a3a9  Merge branch 'master' into editOrDeleteEvent
    c45571479f3a7e57  cancel event works, but there are 2 modals
    ecb13f6e612c72d3  setup cancels
    b8ed95fe258828a0  attach cancelbox to state
    5f694d9b8cd04897  update bundle filenames in gitignore
    52e7ede9a61854bc  gitignore repo.bundle
    edd9d0994eb442e5  fix absent menus
    21ad6482a130da92  X closes modal
    14c9f8e20c9ed9a4  remove cancel box from event row
    e993615aa3fcaa7c  wip changes, may be limiting event table
    a8a6bc89f99c9196  style cancel modal
    bc9a1ff46f443596  map event name to cancelbox
    97709af7439571d2  submit cancel request
    e562eb29454582dd  box closes on click
    597ce99a281005a0  enable canceling the modal
    ff9c4c1714638126  wip fix dispatch close issue
    fa1790f3b2cd3574  tied checkbox state to confirm button
    eb4fbad07de690c5  fix box positioning
    93544349fcc97c8e  add most html to CancelBox
    12e86c25655ebe75  narrow max size of Modal. Setup CancelBox component
    f79a4915b30fcc60  set edit to start on review page


MATCHING REVISIONS
These Differential revisions match the changes in this working copy:

    D4255 Edit and cancel event - 186
        Reason: Commit message for '0e9abafae533451c' has explicit 'Differential Revision'.

Since exactly one revision in Differential matches this working copy, it will
be updated if you run 'arc diff'.

// the second command, most obfuscations removed:
// HEADS='HEAD editOrDeleteEvent master origin/master 095fecb71033 97a1faf2bf43'
git log --oneline --graph --decorate=short $HEADS ^`git merge-base $HEADS`~

$ git log --oneline --graph --decorate=short $HEADS ^`git merge-base $HEADS`~
* 095fecb (HEAD -> editOrDeleteEvent) Merge branch 'master' into editOrDeleteEvent
* f670856 (master) Merge branch 'master' of ssh://ipaddressHere/diffusion/40/project
* 97a1faf (origin/master, origin/HEAD) Fix event sorting - 184

Is that really the output of the graph command? I was expecting to see all the commits mentioned in arc which to show up in the graph.

Are all the commits specified by arc which commits you expect to be part of D4255? Are some of them stuff that’s unrelated?

I suspect the underlaying issue is that your master is out-of-sync with origin/master - there’s some merge commits there that probably shouldn’t be there. The result is that arc land is seeing commits in master that aren’t in origin/master, and it’s trying to land them as well.

You may get away from this by simply rebasing your master off origin/master, and then rebasing your feature branch off master. I’m missing a lot of information in the git log --graph output to know for sure.

Yes that is the full output of the graph command. The commit history looks good to me; it all relates.

Thanks for the analysis. I will try rebasing local master off origin/master