Crucible patches are not anchored

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

問題

In some cases Crucible may fail to anchor a patch file, the following message is presented to the end user in the user interface:

No repository found to anchor patch to

An alternative scenario is when the patch is anchored, but some of the files do not appear as anchored and the file context is not displayed.

診断

After clicking to upload the patch, this is how the anchoring process usually works:

  1. Try to find the correct repository for 3 seconds (UI only)
  2. Try to anchor against the specified repository for 30 seconds (timeout is UI only), when the following is done:
    1. Get root paths from repository:
      Perforce and Subversion: Finds all the directories with paths ending in the patch paths
      Git, Hg/Mercurial and CVS: Just finds the patch paths directly
    2. If there are multiple root paths (and there is time), picks the one with the most matching paths
      While finding roots, paths in the patch might also be stripped (i.e. had leading directories dropped to match the repository)
    3. Check if all revisions at the right versions exist in the repositories
      For Git and Hg/Mercurial this might require remapping content hashes into commit hashes.
      Allow only some to exist (partial anchoring - usually happens for new files).
    4. For all existing revisions: validate the content by getting the revision content from repository and seeing if the patch applies
  3. If we got here, than the anchor is valid, so it is persisted in the database
  4. If multiple root paths match, the user can chose which one he wants to anchor to.
  5. After that, depending on whether the patch is anchored or not, content for patch revisions is retrieved differently:
    1. For unanchored, we only render the uploaded patch
    2. For anchored, we get the anchored revision content from the repository, then apply the patch.

原因

There may be various causes for this problem.

Cause #1 - SVN repository with Start revision set

When this is the case only certain files are anchored, for the not anchored files the only content displayed is the one from the patch itself.


ソリューション

Cause #1 - SVN repository with Start revision set

In the repository details, select Import without tag information as option for the Initial Import setting (see Subversion configuration options for details).

最終更新日 2022 年 4 月 17 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.