Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [egit-dev] Getting a better understanding of ReflogConfigTest.testlogAllRefUpdates()

Shawn, Chris,

Thanks for these answers.

>On Linux I'm getting what we would expect
I'll try to run once again this test this evening to double check the timeZone formatting.

>Anyhow: to understand what this test should you don't need to care about these values.
You're right :-) However, as I'm far from being a git internals expert, I'm also trying to find out if having different timestamps in the Commit.When/TZ and the log was making sense.

>this test was constructed only to care about whether or
>not records were written, not what they contained.
In a perfect world, what kind of timestamp the RefLog should contain : the Commit timestamp or the timestamp representing the date/time the entry has been generated into the log ?


Em.


On Thu, Nov 5, 2009 at 8:49 AM, Halstrick, Christian <christian.halstrick@xxxxxxx> wrote:
Hi,

ReflogConfigTest is the first test I ever wrote for Jgit an I can approve what Shawn wrote: I just
wanted with this test to test whether at all the writing of reflogs can be turned off by config-parameters.
The content of the reflog is completely ignored in this test. Since I need to pick a date and timezone to
successfully create a PersonIndent I just copied how this problem is solved in T0003_Basic ... by just
picking these two constant values.
Anyhow: to understand what this test should you don't need to care about these values.

Ciao
 Chris

>-----Original Message-----
>From: egit-dev-bounces@xxxxxxxxxxx [mailto:egit-dev-bounces@xxxxxxxxxxx] On Behalf Of Shawn O. Pearce
>Sent: Thursday, November 05, 2009 3:57 AM
>To: EGit developer discussion
>Subject: Re: [egit-dev] Getting a better understanding of ReflogConfigTest.testlogAllRefUpdates()
>
>Emeric Fermas <emeric.fermas@xxxxxxxxx> wrote:
>> I'm a GitSharp project committer and porting this test to .net raised
>> some questions that I'd like to share with you.
>>
>> 1. commitTime and tz are fixed and used to fill PersonIdent instances.
>> However, RefLogWriter ends up with relying on a mocked SystemReader to
>> retrieve a fake current dateTime.
>
>True.  These two local variables are used for the commit object's
>author/committer headers, not for the reflog records.  Its confusing,
>I know, this test was constructed only to care about whether or
>not records were written, not what they contained.
>
>> 2. When being run on Windows through Eclipse this test generates a log
>> file (cf. attachment) where TimeZones are weirdly formatted.
>>
>> 803aec4aba175e8ab1d666873c984c0308179099 6a2d9b1f7f4bba043ec7f4c52f04f8ab57829e3d GIT_COMMITTER_NAME
><GIT_COMMITTER_EMAIL> 1250379778 -21000000     commit : A Commit
>> 6a2d9b1f7f4bba043ec7f4c52f04f8ab57829e3d bd701ad4d0c259e5a5f728b0f601d6d5b02ffb5d GIT_COMMITTER_NAME
><GIT_COMMITTER_EMAIL> 1250379778 -21000000     commit : A Commit
>
>These timezones of -21000000 are bogus.  WTF?
>
>On Linux I'm getting what we would expect given MockSystemReader's
>getTimezone is GMT-03:30, the timezone is -330:
>
>803aec4aba175e8ab1d666873c984c0308179099 6a2d9b1f7f4bba043ec7f4c52f04f8ab57829e3d GIT_COMMITTER_NAME
><GIT_COMMITTER_EMAIL> 1250379778 -0330 commit : A Commit
>6a2d9b1f7f4bba043ec7f4c52f04f8ab57829e3d bd701ad4d0c259e5a5f728b0f601d6d5b02ffb5d GIT_COMMITTER_NAME
><GIT_COMMITTER_EMAIL> 1250379778 -0330 commit : A Commit
>
>--
>Shawn.
>_______________________________________________
>egit-dev mailing list
>egit-dev@xxxxxxxxxxx
>https://dev.eclipse.org/mailman/listinfo/egit-dev
_______________________________________________
egit-dev mailing list
egit-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/egit-dev


Back to the top