Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for timezones of git log messages #81

Closed
wants to merge 1 commit into from
Closed

Add support for timezones of git log messages #81

wants to merge 1 commit into from

Conversation

andygrunwald
Copy link
Contributor

This PR solves #63

The timezone is saved in seconds. Some examples:

CommitDate: Sun Apr 20 18:33:46 2014 +0200
=> 7200 (Germany)

CommitDate: Tue Feb 11 22:10:39 2014 -0800
=> -28800 (USA, California, Santa Cruz)

CommitDate: Sun Apr 20 16:07:36 2014 +0530
=> 19080 (India)

If you ran CVSAnaly on MySQL you can migrate your database with the queries:

ALTER TABLE scmlog 
  ADD COLUMN date_tz INT AFTER date,
  ADD COLUMN author_date_tz INT AFTER author_date;

@linzhp maybe this is useful for you as well?

@linzhp
Copy link
Contributor

linzhp commented Apr 22, 2014

Why do you want to convert the timezone into seconds? Isn't something like "+0200" more readable?

@andygrunwald
Copy link
Contributor Author

This was the idea from @jgbarah, because the same approach is used in MailingListStats.
See #63 for discussion.

Further more to save the seconds is
a) more efficient in database storage (int vs. char / varchar)
b) better usable in calculations in programing (calculation instead of string parsing)

@linzhp did you test it? Does it work for you?

@andygrunwald
Copy link
Contributor Author

Any updates here @jgbarah @sduenas @linzhp ?
Can i merge this?

@linzhp
Copy link
Contributor

linzhp commented Apr 28, 2014

I just tested it, it works. Just a side comment, the time zone information are not always reliable, as when a commit is imported from Subversion to Git, the time zone is always +0000. Not a bug in this PR, but something we need to pay attention to when we want to use time zone information.

@andygrunwald
Copy link
Contributor Author

Is there a way to derect migrations from Subversion to Mark those commits?

Am Montag, 28. April 2014 schrieb Zhongpeng Lin :

I just tested it, it works. Just a side comment, the time zone information
are not always reliable, as when a commit is imported from Subversion to
Git, the time zone is always +0000. Not a bug in this PR, but something we
need to pay attention to when we want to use time zone information.


Reply to this email directly or view it on GitHubhttps://github.com//pull/81#issuecomment-41593289
.

@linzhp
Copy link
Contributor

linzhp commented Apr 29, 2014

Yes, those commits often has a string "git-svn" in the commit message.

@andygrunwald
Copy link
Contributor Author

I think we should integrate a feature like this (as a Extension?), but this
should be separated from the timezone feature.
But good point Zhongpeng!

Am Dienstag, 29. April 2014 schrieb Zhongpeng Lin :

Yes, those commits often has a string "git-svn" in the commit message.


Reply to this email directly or view it on GitHubhttps://github.com//pull/81#issuecomment-41643638
.

@sduenas
Copy link
Member

sduenas commented Apr 30, 2014

Sorry for not responding sooner. I've been busy these days.
Thanks to @andygrunwald for this cool feature and to @linzhp for you contribution.
Merged in 404d43d

@andygrunwald
Copy link
Contributor Author

Thanks @sduenas!
Regarding the git-svn bridge, mentioned by @linzhp i created a new feature ticket: #83

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants