プロジェクト

全般

プロフィール

Vote #74063

完了

Mercurial commit ids are short (12 digits) on database

Admin Redmine さんが約4年前に追加. 約4年前に更新.

ステータス:
Closed
優先度:
通常
担当者:
-
カテゴリ:
SCM_3
対象バージョン:
開始日:
2022/05/09
期日:
進捗率:

100%

予定工数:
category_id:
3
version_id:
75
issue_org_id:
14361
author_id:
77276
assigned_to_id:
11192
comments:
15
status_id:
5
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
71
ステータス-->[Closed]

説明

I'm using redmine 2.3.1 and configured a Mercurial repository.

Referring to a commit with the changeset id (a 40 digit hexadecimal number) redmine does not render this as a link.

Furthermore, loading projects/$p/repository/revisions/$changeset_id just gives a 404 "The entry or revision was not found in the repository." error.

Of course, the commit does exist in the repo.

@select scmid from changesets;@ only gives the short-form ID, well, unsurprisingly.

To quote http://mercurial.selenic.com/wiki/ChangeSetID

??Note: a short-form ID can start out valid, but become invalid because another changeset with the same prefix shows up later on. Do not use short-form IDs for long-lived representations. You can use the --debug option to display the full changeset ID.??


journals

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

--------------------------------------------------------------------------------
Try this patch.
--------------------------------------------------------------------------------
This patch fixes some bugs of previous patch.
--------------------------------------------------------------------------------
Toshi MARUYAMA wrote:
> This patch fixes some bugs of previous patch.

It works great. Thank you very much!

One last thing though, would it be possible to shorten the link text to 12 (or even less) chars when on display? Maybe display it like

"5cc4b7a919f5…":http://redmine/issue/5cc4b7a919f501a49479f501a494749209484ad3

As a human a 40 chars hex number is just not something one can grasp, usually.

For example git uses 7 digits by default (more when there's a conflict), and bitbucket also displays 7 digits in its web interface.

Should I add a new ticket about this?

Thanks, again.
--------------------------------------------------------------------------------
Correcting status; this is not yet committed.
--------------------------------------------------------------------------------
Toshi, should we commit this for 2.4.0?
--------------------------------------------------------------------------------
Jean-Philippe Lang wrote:
> Toshi, should we commit this for 2.4.0?

Sorry, I don't have a time.
--------------------------------------------------------------------------------
My patch breaks some tests and need to add more tests.
--------------------------------------------------------------------------------
OK no problem, thanks.
--------------------------------------------------------------------------------
Hi.

Just wanted to check in on you whether you made some progress on this one?

I tried the patch on the latest release and it still applies perfectly.

I'm attaching a patch which removes one minor nit and also fixes all the failing tests.

Hope you get to include this into the next release... :)

Cheers.
--------------------------------------------------------------------------------

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

--------------------------------------------------------------------------------
Toshi, can we close this one?
--------------------------------------------------------------------------------
In repository which created before 2.4, commit id length keeps 12 digits.
New repository which created after 2.5, commit id length is full (40 digits).
--------------------------------------------------------------------------------

Admin Redmine さんが約4年前に更新

  • カテゴリSCM_3 にセット
  • 対象バージョン2.5.0_75 にセット

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

いいね!0
いいね!0