https://www.redmine.org/https://www.redmine.org/favicon.ico?16793021292010-04-20T14:40:37ZRedmineRedmine - Defect #5357: Git: SCM revisions ordered by date/time (should be reverse commit order)https://www.redmine.org/issues/5357?journal_id=160102010-04-20T14:40:37ZYuya Nishihara
<ul><li><strong>File</strong> <a href="/attachments/3582">sort-changesets-by-id.diff</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/3582/sort-changesets-by-id.diff">sort-changesets-by-id.diff</a> added</li></ul><p>Same issue as <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Defect: Sorting for changesets might go wrong on Mercurial repos (Closed)" href="https://www.redmine.org/issues/3567">#3567</a>.<br />"order by date/time" is only valid for centralized system like CVS or Subversion.</p>
<p>I have a patch, <a class="attachment" href="https://www.redmine.org/attachments/3582">sort-changesets-by-id.diff</a>, to fix this issue, but which is yet well tested.</p> Redmine - Defect #5357: Git: SCM revisions ordered by date/time (should be reverse commit order)https://www.redmine.org/issues/5357?journal_id=160362010-04-21T08:30:11ZPieter Smith
<ul><li><strong>File</strong> <a href="/attachments/3588">sort-changes-by-id-for-git.diff</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/3588/sort-changes-by-id-for-git.diff">sort-changes-by-id-for-git.diff</a> added</li></ul><p>Thanks, but your changeset does appear to solve the problem for a GIT repo. It did however provide me with enough info to solve it myself:<br /><a class="attachment" href="https://www.redmine.org/attachments/3588">sort-changes-by-id-for-git.diff</a></p>
<p>It appears that similar changes will have to be applied to ./test/unit/repository_git_test.rb as well, but I am not familiar enough with the unit test infrastructure to make these changes.</p> Redmine - Defect #5357: Git: SCM revisions ordered by date/time (should be reverse commit order)https://www.redmine.org/issues/5357?journal_id=160372010-04-21T08:32:54ZPieter Smith
<ul></ul><p>Oops, I made a typo: Your changeset does <ins>not</ins> appear to solve the problem for a GIT repo</p> Redmine - Defect #5357: Git: SCM revisions ordered by date/time (should be reverse commit order)https://www.redmine.org/issues/5357?journal_id=160412010-04-21T10:00:47ZPieter Smith
<ul></ul>Crap. <a class="attachment" href="https://www.redmine.org/attachments/3588">sort-changes-by-id-for-git.diff</a> doesn't work:
<ol>
<li>With the initial fetch, redmine adds the changesets in reverse commit order.</li>
<li>When additional changesets are imported, they are added to the back of the table, also in reverse commit order.</li>
<li>Sorting by changesets.id therefore results in a discontinuity</li>
</ol>
<p>I tried to reverse the order with which changesets are added to the database by using the :reverse option of scm.revisions(), but all the other mechanisms use the changesets.committed_on field to determine if something is new, so new changesets are not imported resulting in changeset fetch deadlocks.</p> Redmine - Defect #5357: Git: SCM revisions ordered by date/time (should be reverse commit order)https://www.redmine.org/issues/5357?journal_id=160462010-04-21T12:36:35ZYuya Nishihara
<ul></ul><p>Hi, I read <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Defect: git repository browser uses author time instead of commit time for ordering (Closed)" href="https://www.redmine.org/issues/2108">#2108</a> and feel the issue is much tangled than Mercurial's (<a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Defect: Sorting for changesets might go wrong on Mercurial repos (Closed)" href="https://www.redmine.org/issues/3567">#3567</a>.)</p>
<p>According to <code>git help log</code>, it sorts changes in chronological order, and Redmine also orders by <code>committed_on</code>. So how do them become different?</p>
<p>BTW, your information about git really helps me. Thanks! :)</p> Redmine - Defect #5357: Git: SCM revisions ordered by date/time (should be reverse commit order)https://www.redmine.org/issues/5357?journal_id=160482010-04-21T13:41:59ZPieter Smith
<ul></ul><p>Not true. The <em>git log --help</em> does not seem to be accurate (and does not make sense either). Here is a clear example of a log pulled from GIT (<em>git log --date-order</em> and <em>git log</em> produces the same results):</p>
<pre>
commit 1820eb8224442f04f055cce31f30e1813bbc61c8
Author: Pieter Smith <pieter.smith@eu.omron.com>
Date: Tue Apr 20 03:09:01 2010 -0400
Also ignore mongrel rails PID files in ./log
commit 0ff42bcb8069b08c8f558ee1763c96167872a41f
Author: Pieter Smith <pieter.smith@eu.omron.com>
Date: Wed Apr 21 18:02:58 2010 -0400
Applied mongrel --prefix use patch:
* http://www.ruby-forum.com/topic/183811
commit 12fb96220972e89f8748d81eb7082de1697b12d8
Author: Pieter Smith <pieter.smith@eu.omron.com>
Date: Mon Apr 19 02:46:56 2010 -0400
Added redmine checkout plugin
commit 10406e90f8797dc4299717f1d1260b9976b23c1e
Author: Pieter Smith <pieter.smith@eu.omron.com>
Date: Mon Apr 19 02:37:15 2010 -0400
Ignore files directory entirely:
* Allow use of symlinks to place attachments elsewhere
commit 29671188126e774529713847155a57e522f84b4b
Author: Pieter Smith <pieter.smith@eu.omron.com>
Date: Mon Apr 19 02:33:57 2010 -0400
Added --proj-id-match and --update-only options to reposman
commit fc6ccc1ea2593f29fcbbe3d021880b2212b93639
Author: Jean-Philippe Lang <jp_lang@yahoo.fr>
Date: Sun Feb 28 15:12:09 2010 +0000
tagged version 0.9.3
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/tags/0.9.3@3515 e93f8b46-1217-0410-a6f0-8f06a7374b81
</pre>
<p>And the same log in redmine:<br /><img src="https://www.redmine.org/attachments/download/3590/Redmine_Repository_View.JPG" alt="" /></p> Redmine - Defect #5357: Git: SCM revisions ordered by date/time (should be reverse commit order)https://www.redmine.org/issues/5357?journal_id=160492010-04-21T13:42:34ZPieter Smith
<ul><li><strong>File</strong> <a href="/attachments/3590">Redmine_Repository_View.JPG</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/3590/Redmine_Repository_View.JPG">Redmine_Repository_View.JPG</a> added</li></ul><p>And the missing file:</p> Redmine - Defect #5357: Git: SCM revisions ordered by date/time (should be reverse commit order)https://www.redmine.org/issues/5357?journal_id=160512010-04-21T15:20:56ZYuya Nishihara
<ul><li><strong>File</strong> <a href="/attachments/3591">git-changeset-order-workaround.diff</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/3591/git-changeset-order-workaround.diff">git-changeset-order-workaround.diff</a> added</li></ul><p>Hmm, I'll see it later how git considers, but <a class="attachment" href="https://www.redmine.org/attachments/3591">git-changeset-order-workaround.diff</a> may partially fix the problem. (though I'm not sure.)</p>
<p>It changes the insertion order to be "ORDER BY id" as possible. (so please run <code>clear_changesets</code> to regenerate changesets table, and apply also <a class="attachment" href="https://www.redmine.org/attachments/3582">sort-changesets-by-id.diff</a> patch)</p>
<p>Note: Git backend checks the last 7-day logs everytime calling fetch_changesets.<br />Then deletes disappeared changesets from database, and finally inserts missing ones.</p> Redmine - Defect #5357: Git: SCM revisions ordered by date/time (should be reverse commit order)https://www.redmine.org/issues/5357?journal_id=160742010-04-22T06:56:05ZPieter Smith
<ul></ul><p>Thank you!</p>
<p>Further testing is needed, but these two patches (<a class="attachment" href="https://www.redmine.org/attachments/3582">sort-changesets-by-id.diff</a> and <a class="attachment" href="https://www.redmine.org/attachments/3591">git-changeset-order-workaround.diff</a>) appear to fix the issue. Will this be incorporated in a near-future release, or will I have to patch future versions?</p>
<p>P.S. How should I run <code>clear_changesets</code>? This didn't work:<br /><pre>@ruby script/runner "Repository.clear_changesets" -e production</pre>I deleted the contents of the changesets table in the MySQL database to test this, but I would prefer not to circumvent the application by messing with the database.</p> Redmine - Defect #5357: Git: SCM revisions ordered by date/time (should be reverse commit order)https://www.redmine.org/issues/5357?journal_id=160912010-04-22T15:48:52ZYuya Nishihara
<ul></ul><p>Hi, thank you for testing it!</p>
<p>Pieter Smith wrote:</p>
<blockquote>
<p>Will this be incorporated in a near-future release,<br />or will I have to patch future versions?</p>
</blockquote>
<p>I'm not sure but since it requires to refetch all changesets, it might be harder to be merged into Redmine release.<br />Anyway, I need to understand more about Git. (I mostly use Mercurial and its Hg-Git extension.)</p>
<blockquote>
<p>P.S. How should I run <code>clear_changesets</code>?</p>
</blockquote>
<p>Oops! I completely misread the comment of repository/git.rb saying "The repository can still be fully reloaded by calling #clear_changesets." <br />There seems no way to run it from command-line.</p>
<p>You can regenerate changesets table by: 1. delete repository from settings tab; 2. recreate the same repository, though it's really indirect way. :)</p> Redmine - Defect #5357: Git: SCM revisions ordered by date/time (should be reverse commit order)https://www.redmine.org/issues/5357?journal_id=184942010-07-20T06:26:44ZToshi MARUYAMA
<ul></ul><p>FYI: git 1.7 supports "git commit --date DATE".<br /><a class="external" href="http://www.kernel.org/pub/software/scm/git/docs/RelNotes-1.7.0.txt">http://www.kernel.org/pub/software/scm/git/docs/RelNotes-1.7.0.txt</a></p> Redmine - Defect #5357: Git: SCM revisions ordered by date/time (should be reverse commit order)https://www.redmine.org/issues/5357?journal_id=184982010-07-20T08:09:36ZPieter Smith
<ul></ul><p>Interesting... The commit date can be overridden. Not quite sure how it could practically help with the display ordering though. :(</p> Redmine - Defect #5357: Git: SCM revisions ordered by date/time (should be reverse commit order)https://www.redmine.org/issues/5357?journal_id=185592010-07-21T12:49:48ZToshi MARUYAMA
<ul></ul><p>I think we can create test repository, unit test and functional test.</p>
<ul>
<li><a class="source" href="https://www.redmine.org/projects/redmine/repository/svn/entry/tags/1.0.0/test/fixtures/repositories/git_repository.tar.gz">source:tags/1.0.0/test/fixtures/repositories/git_repository.tar.gz</a></li>
<li><a class="source" href="https://www.redmine.org/projects/redmine/repository/svn/entry/tags/1.0.0/test/unit/repository_git_test.rb">source:tags/1.0.0/test/unit/repository_git_test.rb</a></li>
<li><a class="source" href="https://www.redmine.org/projects/redmine/repository/svn/entry/tags/1.0.0/test/functional/repositories_git_controller_test.rb">source:tags/1.0.0/test/functional/repositories_git_controller_test.rb</a></li>
</ul> Redmine - Defect #5357: Git: SCM revisions ordered by date/time (should be reverse commit order)https://www.redmine.org/issues/5357?journal_id=185612010-07-21T13:45:53ZPieter Smith
<ul></ul><p>If you need any assistance, I'd be glad to help.</p> Redmine - Defect #5357: Git: SCM revisions ordered by date/time (should be reverse commit order)https://www.redmine.org/issues/5357?journal_id=185642010-07-21T14:02:31ZToshi MARUYAMA
<ul></ul><p>Yuya is working now.<br />Please see <a class="external" href="http://www.redmine.org/issues/4455#note-123">http://www.redmine.org/issues/4455#note-123</a> and <a class="external" href="http://www.redmine.org/issues/4455#note-130">http://www.redmine.org/issues/4455#note-130</a>.</p> Redmine - Defect #5357: Git: SCM revisions ordered by date/time (should be reverse commit order)https://www.redmine.org/issues/5357?journal_id=185652010-07-21T14:56:47ZYuya Nishihara
<ul></ul><p>Toshi MARUYAMA wrote:</p>
<blockquote>
<p>Yuya is working now.<br />Please see <a class="external" href="http://www.redmine.org/issues/4455#note-123">http://www.redmine.org/issues/4455#note-123</a> and <a class="external" href="http://www.redmine.org/issues/4455#note-130">http://www.redmine.org/issues/4455#note-130</a>.</p>
</blockquote>
<p>Ah, but I've just tried minimizing the impact of <a class="issue tracker-2 status-5 priority-4 priority-default closed" title="Feature: Mercurial overhaul (Closed)" href="https://www.redmine.org/issues/4455">#4455</a> patch, to make a difference <em>only to mercurial backend</em>. ;)</p>
<p>As I said before, my workaround patch for git requires database regeneration. I'm not sure how the maintainers and redmine+git users think, though, it sounds awful to me.</p> Redmine - Defect #5357: Git: SCM revisions ordered by date/time (should be reverse commit order)https://www.redmine.org/issues/5357?journal_id=201262010-09-10T00:40:23ZToshi MARUYAMA
<ul></ul><p>There is a patch for time-zone of git adapter at <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Defect: Age column on repository view is skewed for git, probably CVS too (Closed)" href="https://www.redmine.org/issues/6346">#6346</a>.</p> Redmine - Defect #5357: Git: SCM revisions ordered by date/time (should be reverse commit order)https://www.redmine.org/issues/5357?journal_id=201452010-09-10T07:19:37ZFelix Schäfer
<ul></ul><p>Toshi MARUYAMA wrote:</p>
<blockquote>
<p>There is a patch for time-zone of git adapter at <a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Defect: Age column on repository view is skewed for git, probably CVS too (Closed)" href="https://www.redmine.org/issues/6346">#6346</a>.</p>
</blockquote>
<p>No, this is not related. The problem here is that redmine assumes "younger" revisions to be the "newest", which isn't the case with git. The commit date in git is just metadata, it's neither authoritative nor an indication of the ordering of the revisions. The revision order in git is provided only by the linked list nature of revisions, i.e. a revision holds a reference to its parent revision, which in turn holds a reference to its parent, and so on.</p>
<p>This discrepancy between "redmine assumes commit dates in consecutive commits always increases" and "the commit date in git is just metadata" is I think the problem, but that's one that will take more work than "just" fixing the git adapter.</p> Redmine - Defect #5357: Git: SCM revisions ordered by date/time (should be reverse commit order)https://www.redmine.org/issues/5357?journal_id=204502010-09-18T09:33:58ZToshi MARUYAMA
<ul></ul><p>Toshi MARUYAMA wrote:</p>
<blockquote>
<p>FYI: git 1.7 supports "git commit --date DATE".<br /><a class="external" href="http://www.kernel.org/pub/software/scm/git/docs/RelNotes-1.7.0.txt">http://www.kernel.org/pub/software/scm/git/docs/RelNotes-1.7.0.txt</a></p>
</blockquote>
<p>Git has a <code>AuthorDate</code> and <code>CommitDate</code>.</p>
<ul>
<li><a class="issue tracker-1 status-5 priority-4 priority-default closed" title="Defect: git repository browser uses author time instead of commit time for ordering (Closed)" href="https://www.redmine.org/issues/2108">#2108</a></li>
<li>Pro Git <a href="http://progit.org/book/ch5-3.html" class="external">Maintaining a Project</a></li>
</ul>
<p>"--date" option changes <code>AuthorDate</code>.<br /><code>AuthorDate</code> and <code>CommitDate</code> can be changed by <code>GIT_AUTHOR_DATE</code> and <code>GIT_COMMITTER_DATE</code> environment variables.</p>
<pre>
$ GIT_AUTHOR_DATE="1990-01-01 00:00:00 +0100" \
GIT_COMMITTER_DATE="2000-01-01 00:00:00 -0500" \
git commit -a -m "test."
</pre>
<pre>
$ git log --pretty=fuller -n1 | cat
commit da940a9ed13807bddc63b7bf5c295291d1a7f6ba
Author: Toshi MARUYAMA <XXXXXXXXXXXX>
AuthorDate: Mon Jan 1 00:00:00 1990 +0100
Commit: Toshi MARUYAMA <XXXXXXXXXXXX>
CommitDate: Sat Jan 1 00:00:00 2000 -0500
test.
</pre> Redmine - Defect #5357: Git: SCM revisions ordered by date/time (should be reverse commit order)https://www.redmine.org/issues/5357?journal_id=205962010-09-22T13:00:59ZToshi MARUYAMA
<ul><li><strong>File</strong> <a href="/attachments/4525">git-rebase.png</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/4525/git-rebase.png">git-rebase.png</a> added</li></ul><p>git rebase changes <code>CommitDate</code> and keeps <code>AuthorDate</code>.</p>
<pre>
$ git log --graph --all --pretty=fuller -n2
* commit 585b4abad53aa65fd6bf6109ef6e7ffdd06808a8
| Author: Toshi MARUYAMA <XXXXXXXXXX>
| AuthorDate: Wed Sep 22 21:26:24 2010 +0900
| Commit: Toshi MARUYAMA <XXXXXXXXXX>
| CommitDate: Wed Sep 22 21:26:24 2010 +0900
|
| test01.
|
| * commit d0331012c8ac9c3c588723547a98695d77ae013a
|/ Author: Toshi MARUYAMA <XXXXXXXXXX>
| AuthorDate: Wed Sep 22 21:24:08 2010 +0900
| Commit: Toshi MARUYAMA <XXXXXXXXXX>
| CommitDate: Wed Sep 22 21:24:08 2010 +0900
|
| test00.
</pre><br /><pre>
$ git checkout d0331012c8ac9c3c588723547a98695d77ae013a
$ git rebase 585b4abad53aa65fd6bf6109ef6e7ffdd06808a8
</pre><br /><pre>
$ git log --graph --all --pretty=fuller -n2
* commit 1809eacbcd8844fab5df80fcd95a7f7315a0c6c4
| Author: Toshi MARUYAMA <XXXXXXXXXX>
| AuthorDate: Wed Sep 22 21:24:08 2010 +0900
| Commit: Toshi MARUYAMA <XXXXXXXXXX>
| CommitDate: Wed Sep 22 21:35:52 2010 +0900
|
| test00.
|
* commit 585b4abad53aa65fd6bf6109ef6e7ffdd06808a8
| Author: Toshi MARUYAMA <XXXXXXXXXX>
| AuthorDate: Wed Sep 22 21:26:24 2010 +0900
| Commit: Toshi MARUYAMA <XXXXXXXXXX>
| CommitDate: Wed Sep 22 21:26:24 2010 +0900
|
| test01.
</pre><br /><pre>
$ git log --graph --all -n2
* commit 1809eacbcd8844fab5df80fcd95a7f7315a0c6c4
| Author: Toshi MARUYAMA <XXXXXXXXXX>
| Date: Wed Sep 22 21:24:08 2010 +0900
|
| test00.
|
* commit 585b4abad53aa65fd6bf6109ef6e7ffdd06808a8
| Author: Toshi MARUYAMA <XXXXXXXXXX>
| Date: Wed Sep 22 21:26:24 2010 +0900
|
| test01.
</pre> Redmine - Defect #5357: Git: SCM revisions ordered by date/time (should be reverse commit order)https://www.redmine.org/issues/5357?journal_id=206452010-09-23T14:57:52ZToshi MARUYAMA
<ul><li><strong>File</strong> <a href="/attachments/4545">git-order-new.diff</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/4545/git-order-new.diff">git-order-new.diff</a> added</li><li><strong>File</strong> <a href="/attachments/4546">git-order-before.png</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/4546/git-order-before.png">git-order-before.png</a> added</li><li><strong>File</strong> <a href="/attachments/4547">git-order-after.png</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/4547/git-order-after.png">git-order-after.png</a> added</li></ul><p>Yuya Nishihara wrote:</p>
<blockquote>
<p>Toshi MARUYAMA wrote:</p>
<blockquote>
<p>Yuya is working now.<br />Please see <a class="external" href="http://www.redmine.org/issues/4455#note-123">http://www.redmine.org/issues/4455#note-123</a> and <a class="external" href="http://www.redmine.org/issues/4455#note-130">http://www.redmine.org/issues/4455#note-130</a>.</p>
</blockquote>
<p>Ah, but I've just tried minimizing the impact of <a class="issue tracker-2 status-5 priority-4 priority-default closed" title="Feature: Mercurial overhaul (Closed)" href="https://www.redmine.org/issues/4455">#4455</a> patch, to make a difference <em>only to mercurial backend</em>. ;)</p>
</blockquote>
<blockquote>
<p>As I said before, my workaround patch for git requires database regeneration. I'm not sure how the maintainers and redmine+git users think, though, it sounds awful to me.</p>
</blockquote>
<p>I referred Yuya's <a href="http://bitbucket.org/yuja/redmine-mq-issue4455/src/a7f2ec8a9198/hg-changeset-order.patch#cl-22" class="external">mercurial implementation</a> ,<br />then I implement ordering only for git.</p>
<p>I pushed to my github and I attach a new patch.</p>
<ul>
<li><a class="external" href="http://github.com/marutosi/redmine/commits/git-order">http://github.com/marutosi/redmine/commits/git-order</a></li>
<li><a class="external" href="http://github.com/marutosi/redmine/commits/6806ea5af21e75fc1">http://github.com/marutosi/redmine/commits/6806ea5af21e75fc1</a></li>
</ul>
<p>And I post logs and images of following test repository.</p>
<ul>
<li><a class="external" href="http://github.com/marutosi/redmine_test_git_repository/commits/marutosi00">http://github.com/marutosi/redmine_test_git_repository/commits/marutosi00</a></li>
<li><a class="external" href="http://github.com/marutosi/redmine_test_git_repository/commits/ce4e78fcffa81e538">http://github.com/marutosi/redmine_test_git_repository/commits/ce4e78fcffa81e538</a></li>
</ul>
<pre>
$ git log --graph --pretty=fuller -n3 | cat
* commit ce4e78fcffa81e538ad3ef41065a285da462c94c
| Author: Toshi MARUYAMA <XXXXXXXX>
| AuthorDate: Wed Jul 11 00:00:00 1990 +0100
| Commit: Toshi MARUYAMA <XXXXXXXX>
| CommitDate: Sun Jul 11 00:00:00 2010 -0500
|
| date test 3.
|
* commit 8312fa08b40540b0b301241a6a6b032fac08d3f3
| Author: Toshi MARUYAMA <XXXXXXXX>
| AuthorDate: Tue Jul 10 00:00:00 1990 +0100
| Commit: Toshi MARUYAMA <XXXXXXXX>
| CommitDate: Sat Jul 10 00:00:00 2010 -0500
|
| date test 2.
|
* commit 3329c803bc79b6657660b7e045a8d08802ca32f7
| Author: Toshi MARUYAMA <XXXXXXXX>
| AuthorDate: Thu Jul 12 00:00:00 1990 +0100
| Commit: Toshi MARUYAMA <XXXXXXXX>
| CommitDate: Mon Jul 12 00:00:00 2010 -0500
|
| date test 1.
</pre><br /><pre>
$ git log --graph -n3 | cat
* commit ce4e78fcffa81e538ad3ef41065a285da462c94c
| Author: Toshi MARUYAMA <XXXXXXXX>
| Date: Wed Jul 11 00:00:00 1990 +0100
|
| date test 3.
|
* commit 8312fa08b40540b0b301241a6a6b032fac08d3f3
| Author: Toshi MARUYAMA <XXXXXXXX>
| Date: Tue Jul 10 00:00:00 1990 +0100
|
| date test 2.
|
* commit 3329c803bc79b6657660b7e045a8d08802ca32f7
| Author: Toshi MARUYAMA <XXXXXXXX>
| Date: Thu Jul 12 00:00:00 1990 +0100
|
| date test 1.
</pre> Redmine - Defect #5357: Git: SCM revisions ordered by date/time (should be reverse commit order)https://www.redmine.org/issues/5357?journal_id=206532010-09-23T17:18:26ZFelix Schäfer
<ul></ul><p>I hate to quote myself, but:</p>
<p>Felix Schäfer wrote:</p>
<blockquote>
<p>The revision order in git is provided only by the linked list nature of revisions, i.e. a revision holds a reference to its parent revision, which in turn holds a reference to its parent, and so on.</p>
</blockquote>
<p>So they are ordered by database insertion instead of commit date, still a workaround rather than a solution.</p>
<p>(and don't get me wrong: I appreciate the work you do here, but I think it goes in the wrong direction)</p> Redmine - Defect #5357: Git: SCM revisions ordered by date/time (should be reverse commit order)https://www.redmine.org/issues/5357?journal_id=206612010-09-23T23:23:38ZToshi MARUYAMA
<ul></ul><p>Felix Schäfer wrote:</p>
<blockquote>
<p>(and don't get me wrong: I appreciate the work you do here, but I think it goes in the wrong direction)</p>
</blockquote>
<p>I think better solution for DVCS is creating new tables for <a href="http://en.wikipedia.org/wiki/Directed_acyclic_graph" class="external">DAG</a> .</p>
<p>Please see <a class="external" href="http://www.redmine.org/issues/4773#note-18">http://www.redmine.org/issues/4773#note-18</a> .</p> Redmine - Defect #5357: Git: SCM revisions ordered by date/time (should be reverse commit order)https://www.redmine.org/issues/5357?journal_id=208052010-09-28T12:50:09ZToshi MARUYAMA
<ul><li><strong>File</strong> <a href="/attachments/4581">rebase-multi-revs-before.png</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/4581/rebase-multi-revs-before.png">rebase-multi-revs-before.png</a> added</li><li><strong>File</strong> <a href="/attachments/4582">rebase-multi-revs-after.png</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/4582/rebase-multi-revs-after.png">rebase-multi-revs-after.png</a> added</li></ul><p>Rebased multi revisions <code>CommitDate</code> changed same time.<br />So, ordering with <code>CommitDate</code> is strange.</p>
<p>I pushed these revisions to my github.</p>
<ul>
<li><a class="external" href="http://github.com/marutosi/redmine_test_git_repository/commits/rebase-test-00">http://github.com/marutosi/redmine_test_git_repository/commits/rebase-test-00</a></li>
<li><a class="external" href="http://github.com/marutosi/redmine_test_git_repository/commits/57a99e05c3ef7bfd43c87">http://github.com/marutosi/redmine_test_git_repository/commits/57a99e05c3ef7bfd43c87</a></li>
</ul>
<pre>
$ git log --graph --all --pretty=fuller -n 3 | cat
* commit c65291727d4d674f0ea4796a8a666cf6817494dc
| Author: Toshi MARUYAMA <marutosijp2@foo.bar>
| AuthorDate: Tue Sep 28 20:32:19 2010 +0900
| Commit: Toshi MARUYAMA <marutosijp2@foo.bar>
| CommitDate: Tue Sep 28 20:32:19 2010 +0900
|
| rebase test 10.
|
| * commit de31c2ab3b20188b2b09e168026805688d65ef65
| | Author: Toshi MARUYAMA <marutosijp2@foo.bar>
| | AuthorDate: Tue Sep 28 20:28:42 2010 +0900
| | Commit: Toshi MARUYAMA <marutosijp2@foo.bar>
| | CommitDate: Tue Sep 28 20:28:42 2010 +0900
| |
| | rebase test 01.
| |
| * commit 27a6e34d47c90d632bd2207fb812c8eb49107923
|/ Author: Toshi MARUYAMA <marutosijp2@foo.bar>
| AuthorDate: Tue Sep 28 20:28:19 2010 +0900
| Commit: Toshi MARUYAMA <marutosijp2@foo.bar>
| CommitDate: Tue Sep 28 20:28:19 2010 +0900
|
| rebase test 00.
</pre>
<pre>
$ git checkout de31c2ab3b20188b2b09e168026805688d65ef65
$ git rebase c65291727d4d674f0ea4796a8a666cf6817494dc
</pre>
<pre>
$ git log --graph --all --pretty=fuller -n3 | cat
* commit 57a99e05c3ef7bfd43c87146f728e51665234a28
| Author: Toshi MARUYAMA <marutosijp2@foo.bar>
| AuthorDate: Tue Sep 28 20:28:42 2010 +0900
| Commit: Toshi MARUYAMA <marutosijp2@foo.bar>
| CommitDate: Tue Sep 28 20:39:11 2010 +0900
|
| rebase test 01.
|
* commit dd6129a06b9a38d7d8a80e140cf804d5c76e0e3b
| Author: Toshi MARUYAMA <marutosijp2@foo.bar>
| AuthorDate: Tue Sep 28 20:28:19 2010 +0900
| Commit: Toshi MARUYAMA <marutosijp2@foo.bar>
| CommitDate: Tue Sep 28 20:39:11 2010 +0900
|
| rebase test 00.
|
* commit c65291727d4d674f0ea4796a8a666cf6817494dc
| Author: Toshi MARUYAMA <marutosijp2@foo.bar>
| AuthorDate: Tue Sep 28 20:32:19 2010 +0900
| Commit: Toshi MARUYAMA <marutosijp2@foo.bar>
| CommitDate: Tue Sep 28 20:32:19 2010 +0900
|
| rebase test 10.
</pre> Redmine - Defect #5357: Git: SCM revisions ordered by date/time (should be reverse commit order)https://www.redmine.org/issues/5357?journal_id=209122010-10-01T15:00:10ZBernhard Furtmueller
<ul></ul><p>I'm far away being a git expert but I think rebasing on a public "offical" repository is evil anyway. Please see git-rebase(1) NOTES and RECOVERING FROM UPSTREAM REBASE. I'm not sure if this could be fixed in redmine with reasonable efforts.</p> Redmine - Defect #5357: Git: SCM revisions ordered by date/time (should be reverse commit order)https://www.redmine.org/issues/5357?journal_id=209132010-10-01T22:40:00ZToshi MARUYAMA
<ul></ul><p>Bernhard Furtmueller wrote:</p>
<blockquote>
<p>I'm far away being a git expert but I think rebasing on a public "offical" repository is evil anyway.</p>
</blockquote>
<p>Yes. In Git and Mercurial, rebasing and history editing on <strong>public</strong> repository is rare case.<br />But, rebaseing and history editing on <strong>private</strong> repository and pushing these revisions to <strong>public</strong> repository is popular.<br />Please see <a class="external" href="http://www.redmine.org/issues/4455#note-146">http://www.redmine.org/issues/4455#note-146</a> .</p> Redmine - Defect #5357: Git: SCM revisions ordered by date/time (should be reverse commit order)https://www.redmine.org/issues/5357?journal_id=249282011-02-08T00:59:16ZToshi MARUYAMA
<ul><li><strong>Priority</strong> changed from <i>High</i> to <i>Normal</i></li></ul> Redmine - Defect #5357: Git: SCM revisions ordered by date/time (should be reverse commit order)https://www.redmine.org/issues/5357?journal_id=249292011-02-08T01:01:00ZToshi MARUYAMA
<ul><li><strong>Subject</strong> changed from <i>SCM revisions ordered by date/time (should be reverse commit order)</i> to <i>Git: SCM revisions ordered by date/time (should be reverse commit order)</i></li></ul> Redmine - Defect #5357: Git: SCM revisions ordered by date/time (should be reverse commit order)https://www.redmine.org/issues/5357?journal_id=249302011-02-08T01:14:00ZToshi MARUYAMA
<ul><li><strong>File</strong> <a href="/attachments/5318">git-rebase-20110208.png</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/5318/git-rebase-20110208.png">git-rebase-20110208.png</a> added</li></ul><p>These are <a class="external" href="https://github.com/edavis10/chiliproject/tree/ticket/master/30-upstream-code-review">https://github.com/edavis10/chiliproject/tree/ticket/master/30-upstream-code-review</a> image and log.</p>
<p>Eric seemed to rebase or cherry-pick. <br />Latest CommitDate changed "Sat Feb 5 21:08:10 2011 -0800".</p>
<p><img src="https://www.redmine.org/attachments/download/5318/git-rebase-20110208.png" alt="" /></p>
<pre>
$ git log --graph -b br-chili-eric --pretty=fuller -n3 | cat
* commit dc016d226d1afce84aa7ea478434c7064e5d13f1
| Author: Jean-Philippe Lang
| AuthorDate: Thu Dec 23 10:04:08 2010 +0000
| Commit: Eric Davis
| CommitDate: Sat Feb 5 21:08:10 2011 -0800
|
| Set VERSION to 1.0.5.
|
| git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4568 e93f8b46-1217-0410-a6f0-8f06a7374b81
|
* commit 3659b7164c6f15971bfd5a7384fa517f5248e8c0
| Author: Jean-Philippe Lang
| AuthorDate: Thu Dec 23 10:03:32 2010 +0000
| Commit: Eric Davis
| CommitDate: Sat Feb 5 21:07:14 2011 -0800
|
| Updated INSTALL for 1.0.5
|
| git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4567 e93f8b46-1217-0410-a6f0-8f06a7374b81
|
* commit 7d152dd51635e2e19edb0c55b0cb2cad98ad17da
| Author: Jean-Philippe Lang
| AuthorDate: Thu Dec 23 10:02:08 2010 +0000
| Commit: Eric Davis
| CommitDate: Sat Feb 5 21:07:07 2011 -0800
|
| Updated CHANGELOG for 1.0.5
|
| git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4566 e93f8b46-1217-0410-a6f0-8f06a7374b81
</pre> Redmine - Defect #5357: Git: SCM revisions ordered by date/time (should be reverse commit order)https://www.redmine.org/issues/5357?journal_id=258122011-03-02T05:06:47ZToshi MARUYAMA
<ul><li><strong>Assignee</strong> set to <i>Toshi MARUYAMA</i></li></ul> Redmine - Defect #5357: Git: SCM revisions ordered by date/time (should be reverse commit order)https://www.redmine.org/issues/5357?journal_id=261602011-03-10T03:31:40ZToshi MARUYAMA
<ul><li><strong>Affected version (unused)</strong> changed from <i>0.9.3</i> to <i>0.9.0</i></li><li><strong>Affected version</strong> changed from <i>0.9.3</i> to <i>0.9.0</i></li></ul> Redmine - Defect #5357: Git: SCM revisions ordered by date/time (should be reverse commit order)https://www.redmine.org/issues/5357?journal_id=261642011-03-10T04:39:02ZToshi MARUYAMA
<ul><li><strong>File</strong> <a href="/attachments/5541">sort-changes-by-id-for-git-r5074.diff</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/5541/sort-changes-by-id-for-git-r5074.diff">sort-changes-by-id-for-git-r5074.diff</a> added</li><li><strong>Assignee</strong> deleted (<del><i>Toshi MARUYAMA</i></del>)</li></ul><p>This is a patch for <a class="changeset" title="scm: git: add tests for previous and next versions in unit model test (#7821, #5357)." href="https://www.redmine.org/projects/redmine/repository/svn/revisions/5074">r5074</a> .</p> Redmine - Defect #5357: Git: SCM revisions ordered by date/time (should be reverse commit order)https://www.redmine.org/issues/5357?journal_id=292582011-05-27T11:36:27ZToshi MARUYAMA
<ul><li><strong>File</strong> <a href="/attachments/6057">chili-pdf-issue-61.png</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/6057/chili-pdf-issue-61.png">chili-pdf-issue-61.png</a> added</li></ul><p><a class="external" href="https://www.chiliproject.org/projects/chiliproject/repository/show?rev=69bad846048e6b854cda272e2701771f26172234">https://www.chiliproject.org/projects/chiliproject/repository/show?rev=69bad846048e6b854cda272e2701771f26172234</a></p>
<p><img src="https://www.redmine.org/attachments/download/6057/chili-pdf-issue-61.png" alt="" /></p> Redmine - Defect #5357: Git: SCM revisions ordered by date/time (should be reverse commit order)https://www.redmine.org/issues/5357?journal_id=295732011-06-05T07:26:34ZToshi MARUYAMA
<ul><li><strong>Assignee</strong> set to <i>Toshi MARUYAMA</i></li><li><strong>Target version</strong> set to <i>1.3.0</i></li></ul> Redmine - Defect #5357: Git: SCM revisions ordered by date/time (should be reverse commit order)https://www.redmine.org/issues/5357?journal_id=317902011-08-26T02:21:36ZToshi MARUYAMA
<ul><li><strong>Target version</strong> deleted (<del><i>1.3.0</i></del>)</li></ul> Redmine - Defect #5357: Git: SCM revisions ordered by date/time (should be reverse commit order)https://www.redmine.org/issues/5357?journal_id=317912011-08-26T02:23:28ZToshi MARUYAMA
<ul><li><strong>Target version</strong> set to <i>Unplanned backlogs</i></li></ul>