Defect #7821

Git "previous" and "next" revisions are incorrect

Added by Toshi MARUYAMA over 6 years ago. Updated over 6 years ago.

Status:ClosedStart date:2011-03-10
Priority:NormalDue date:
Assignee:Toshi MARUYAMA% Done:

0%

Category:SCM
Target version:1.2.0
Resolution:Fixed Affected version:0.9.0

Description

For example, This is Redmine r1 git revision.
https://www.chiliproject.org/projects/chiliproject/repository/revisions/d19142e20

Previous revision should be nil, and next revision should be r3.
But, previous revision is r3.
https://www.chiliproject.org/projects/chiliproject/repository/revisions/73e0b8f8b3

The reason is described at note-6 of #5357.

$ git log master --reverse
commit d19142e20949d442c20275e467f3d39c33a21f03
Author: Jean-Philippe Lang
Date:   Wed Jun 28 17:26:26 2006 +0000

    Initial setup

    git-svn-id: http://redmine.rubyforge.org/svn/trunk@1 e93f8b46-1217-0410-a6f0-8f06a7374b81

commit 73e0b8f8b3c9350018a7d8fda143dd9b8aa6f091
Author: Jean-Philippe Lang
Date:   Wed Jun 28 18:09:47 2006 +0000

    Initial import.

    git-svn-id: http://redmine.rubyforge.org/svn/trunk@3 e93f8b46-1217-0410-a6f0-8f06a7374b81

commit 6b7650e2f03156ea1e3985b30c1995e44c317e3d
Author: Jean-Philippe Lang
Date:   Wed Jun 28 18:11:03 2006 +0000

    Initial commit

    git-svn-id: http://redmine.rubyforge.org/svn/trunk@4 e93f8b46-1217-0410-a6f0-8f06a7374b81

.
.
.
$ ( echo 'SELECT id, committed_on, revision FROM changesets ' \
    echo 'where repository_id = 59 order by id;' ) \
    | sqlite3 test.db 
274932|2006-12-07 05:16:43|41c2af55cf508ad3c4bb566f0696a4130697763a
274933|2006-07-10 01:30:01|f37089f54784da4b457ed19d588e137078977089
274934|2006-07-04 04:38:10|366ca57c36df8e85f903304e0ab0364d4a5ea006
274935|2006-06-29 04:54:35|b1ede59d02891c0e284e15680abd73301374d3bc
274936|2006-06-29 03:11:03|6b7650e2f03156ea1e3985b30c1995e44c317e3d
274937|2006-06-29 03:09:47|73e0b8f8b3c9350018a7d8fda143dd9b8aa6f091
274938|2006-06-29 02:26:26|d19142e20949d442c20275e467f3d39c33a21f03

redmine-r1.png (59.4 KB) Toshi MARUYAMA, 2011-03-10 04:44


Related issues

Related to Redmine - Defect #5357: Git: SCM revisions ordered by date/time (should be revers... New 2010-04-20
Duplicated by Redmine - Defect #8346: Git: Previous and Next links are confusing Closed 2011-05-12

Associated revisions

Revision 5073
Added by Toshi MARUYAMA over 6 years ago

scm: git: insert revisions to database with reverse commit order (#7821, #5357).

Revision 5074
Added by Toshi MARUYAMA over 6 years ago

scm: git: add tests for previous and next versions in unit model test (#7821, #5357).

Revision 5853
Added by Toshi MARUYAMA over 6 years ago

scm: git: set revisions ordering inconsistent in existing database (#5357).

Between version 0.9 r2840 (#1406) and version 1.2 r5073 (#7821, #5357),
git revisions are stored as C-B-A-F-E-D in database.

History

#1 Updated by Toshi MARUYAMA over 6 years ago

  • File deleted (redmine-r1.png)

#2 Updated by Toshi MARUYAMA over 6 years ago

#3 Updated by Toshi MARUYAMA over 6 years ago

  • Status changed from New to Closed
  • Target version set to 1.2.0
  • Resolution set to Fixed

Fixed in r5073 and r5074.

Also available in: Atom PDF