Defect #3567
Sorting for changesets might go wrong on Mercurial repos
Status: | Closed | Start date: | 2009-06-30 | |
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | % Done: | 100% | ||
Category: | SCM | |||
Target version: | 1.1.0 | |||
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):Related issues
Associated revisions
History
#1
Updated by Mischa The Evil over 13 years ago
Edited description to prevent unwanted output
#2
Updated by Ammler _ over 13 years ago
- File redmine_hg_sorting.png added
attached a screen with the "wrong" sorting, as the example repository above might change...
#3
Updated by Ammler _ over 13 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
#4
Updated by Ammler _ over 13 years ago
He, usually, I have edit rights for tickets. ;-)
I totally forgot to mention the used revision: it is trunk r2778
#5
Updated by Toshi MARUYAMA almost 13 years ago
- File redmine-sort-by-date.png added
- File redmine-sort-by-revno.png added
- % Done changed from 0 to 90
I fix this problem at #4455 follwing patch.
http://www.redmine.org/issues/4455#note-56
#6
Updated by Yuya Nishihara almost 13 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
#7
Updated by Yuya Nishihara almost 13 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.
#8
Updated by Toshi MARUYAMA over 12 years ago
- File hg-order-before.png added
- File hg-order-after.png added
- % Done changed from 90 to 100
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¶
#9
Updated by Toshi MARUYAMA about 12 years ago
- Assignee set to Toshi MARUYAMA
- Target version set to 1.1.0
#10
Updated by Toshi MARUYAMA about 12 years ago
- Status changed from New to Closed
- Resolution set to Fixed