プロジェクト

全般

プロフィール

Vote #65433

完了

Sorting for changesets might go wrong on Mercurial repos

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

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

100%

予定工数:
category_id:
3
version_id:
20
issue_org_id:
3567
author_id:
5532
assigned_to_id:
11192
comments:
10
status_id:
5
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[Closed]

説明

The DVCS Mercurial allows to commit changesets with configureable, i.e. with @"hg ci -d "2222-10-20..."@, then the next changeset could have a earlier date. Of course, ususally it shouldn't happen, but it can, maybe only seconds but it does. :-)

So the sorting depend on revision number for Mercurial, Git doesn't have numbers (in Redmine), so it can't be used as general setting.

I don't know, if it's a bug or a feature request, feel free to decide that self. ;-)

Examples from 2 repos (the "bad" version is r137):


journals

_Edited description to prevent unwanted output_
--------------------------------------------------------------------------------
attached a screen with the "wrong" sorting, as the example repository above might change...

--------------------------------------------------------------------------------
following patch "fixes" the sorting for mercurial, but of course, it doesn't work anymore for git and maybe other VCS,
http://dev.openttdcoop.org/hg_sorting.diff
--------------------------------------------------------------------------------
He, usually, I have edit rights for tickets. ;-)

I totally forgot to mention the used revision: it is trunk r2778
--------------------------------------------------------------------------------
I fix this problem at #4455 follwing patch.
http://www.redmine.org/issues/4455#note-56

--------------------------------------------------------------------------------
It seems we can simply use @ORDER BY id@. At least, both Subversion and Mercurial insert changesets from earliest.

http://bitbucket.org/yuja/redmine-mq/src/tip/sort-changesets-by-id.diff
--------------------------------------------------------------------------------
Yuya Nishihara wrote:
> It seems we can simply use @ORDER BY id@. At least, both Subversion and Mercurial insert changesets from earliest.

No! It breaks git backend (#5357.) The patch needs updated to take effect only for Mercurial.
--------------------------------------------------------------------------------
These are "test repository":http://bitbucket.org/marutosi/redmine-test-mercurial-repository/changesets images of "hg-changeset-order.patch":http://www.redmine.org/attachments/4218/hg-changeset-order.patch at http://www.redmine.org/issues/4455#note-144
This patch take effect only for Mercurial.

h3. Before patch applied

!hg-order-before.png!

h3. After patch applied

!hg-order-after.png!

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

--------------------------------------------------------------------------------
Fixed in svn trunk by r4611 and 1.1 by r4612.
--------------------------------------------------------------------------------


related_issues

relates,Closed,3449,Redmine Takes Too Long On Large Mercurial Repository

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

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

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

いいね!0
いいね!0