プロジェクト

全般

プロフィール

Vote #77437

未完了

fetching of Git changesets sometimes fails due to non existant revisions in prev_db_heads

Admin Redmine さんがほぼ2年前に追加. ほぼ2年前に更新.

ステータス:
New
優先度:
通常
担当者:
-
カテゴリ:
SCM_3
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
3
version_id:
33
issue_org_id:
22798
author_id:
40856
assigned_to_id:
0
comments:
3
status_id:
1
tracker_id:
3
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[New]

説明

Under certain circumstances it may happen that revisions disappear from a git repository (i.e. when the repository is compacted / garbage collected after doing force pushes).

Redmine stores a @prev_db_heads@ list in the repositories @extra_info@, which may contain hashes pointing to such no more existing objects. In this case, @Repository#fetch_changesets@ will fail silently and not fetch anything, since the underlying @git log@ command refuses to work when non existing revisions are given on the command line.

The attached patch was extracted from "Planio":https://plan.io/redmine-hosting and checks each entry in @prev_db_heads@, keeping only those that still exist.


journals

--------------------------------------------------------------------------------
Thanks for the patch. But a test fails in my environment.

<pre>
$ ruby test/unit/repository_git_test.rb
(snip)

# Running:

..............F...........

Finished in 12.697746s, 2.0476 runs/s, 13.6245 assertions/s.

1) Failure:
RepositoryGitTest#test_fetch_changesets_history_editing [test/unit/repository_git_test.rb:241]:
Expected: 23
Actual: 29

26 runs, 173 assertions, 1 failures, 0 errors, 0 skips
</pre>
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------

Admin Redmine さんがほぼ2年前に更新

  • カテゴリSCM_3 にセット
  • 対象バージョンCandidate for next minor release_33 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0