githubphabricatorarcanist

Failed to decompose multicopy changeset in order to generate diff


I am getting the following error while trying to land diff on the master.

Failed to decompose multicopy changeset in order to generate diff.

Below is Exception details

[2020-03-26 12:06:37] EXCEPTION: (Exception) Failed to decompose multicopy changeset in order to generate diff. at [<arcanist>/src/parser/ArcanistBundle.php:375]
arcanist(head=master, ref.master=605119b9319b), phutil(head=master, ref.master=9f2c1e1412e2)
  #0 ArcanistBundle::toGitPatch() called at [<arcanist>/src/workflow/ArcanistLandWorkflow.php:1057]
  #1 ArcanistLandWorkflow::normalizeDiff(string) called at [<arcanist>/src/workflow/ArcanistLandWorkflow.php:985]
  #2 ArcanistLandWorkflow::findRevision() called at [<arcanist>/src/workflow/ArcanistLandWorkflow.php:1889]
  #3 ArcanistLandWorkflow::buildEngineMessage(ArcanistGitLandEngine) called at [<arcanist>/src/land/ArcanistGitLandEngine.php:92]
  #4 ArcanistGitLandEngine::identifyRevision() called at [<arcanist>/src/land/ArcanistGitLandEngine.php:28]
  #5 ArcanistGitLandEngine::execute() called at [<arcanist>/src/workflow/ArcanistLandWorkflow.php:370]
  #6 ArcanistLandWorkflow::run() called at [<arcanist>/scripts/arcanist.php:394]

Can somebody please help?


Solution

  • enter image description here

    In the image we can see that the file src/components/organization/generated/CreateOrganization.js was split into multiple files. Basically, its contents were copied to two different files and then it was deleted. This could be triggering the multi-copy decompose.

    Check https://gitlab.collabora.com/phabricator/arcanist/-/blob/d2b38cdf94441146daf5f5ae68169689dc0c24d7/src/parser/ArcanistBundle.php#L356

    Based on the code, the arc is trying to decompose multicopy as one MOVE and multiple COPY. And it is failing to decompose in the above case. Maybe because the source file is deleted. Putting back the CreateOrganization.js file and then update the diff worked.