Project

General

Profile

Actions

Defect #3567

closed

Sorting for changesets might go wrong on Mercurial repos

Added by Ammler _ over 14 years ago. Updated about 13 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Toshi MARUYAMA
Category:
SCM
Target version:
Start date:
2009-06-30
Due date:
% Done:

100%

Estimated time:
Resolution:
Fixed
Affected version:

Description

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):

Files

redmine_hg_sorting.png (22 KB) redmine_hg_sorting.png Ammler _, 2009-07-01 13:18
redmine-sort-by-date.png (12.8 KB) redmine-sort-by-date.png Toshi MARUYAMA, 2010-03-07 12:58
redmine-sort-by-revno.png (14.3 KB) redmine-sort-by-revno.png Toshi MARUYAMA, 2010-03-07 12:58
hg-order-before.png (45.9 KB) hg-order-before.png Toshi MARUYAMA, 2010-10-08 12:27
hg-order-after.png (50.7 KB) hg-order-after.png Toshi MARUYAMA, 2010-10-08 12:27

Related issues

Related to Redmine - Defect #3449: Redmine Takes Too Long On Large Mercurial RepositoryClosedToshi MARUYAMA2009-06-05

Actions
Actions #1

Updated by Mischa The Evil over 14 years ago

Edited description to prevent unwanted output

Actions #2

Updated by Ammler _ over 14 years ago

attached a screen with the "wrong" sorting, as the example repository above might change...

Actions #3

Updated by Ammler _ over 14 years ago

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

Actions #4

Updated by Ammler _ over 14 years ago

He, usually, I have edit rights for tickets. ;-)

I totally forgot to mention the used revision: it is trunk r2778

Actions #5

Updated by Toshi MARUYAMA about 14 years ago

I fix this problem at #4455 follwing patch.
http://www.redmine.org/issues/4455#note-56

Actions #6

Updated by Yuya Nishihara almost 14 years ago

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

Actions #7

Updated by Yuya Nishihara almost 14 years ago

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.

Actions #8

Updated by Toshi MARUYAMA over 13 years ago

These are test repository images of hg-changeset-order.patch at http://www.redmine.org/issues/4455#note-144
This patch take effect only for Mercurial.

Before patch applied

After patch applied

Actions #9

Updated by Toshi MARUYAMA about 13 years ago

  • Assignee set to Toshi MARUYAMA
  • Target version set to 1.1.0
Actions #10

Updated by Toshi MARUYAMA about 13 years ago

  • Status changed from New to Closed
  • Resolution set to Fixed

Fixed in svn trunk by r4611 and 1.1 by r4612.

Actions

Also available in: Atom PDF