get Revision from Git (short Hash)

classic Classic list List threaded Threaded
27 messages Options
12
Reply | Threaded
Open this post in threaded view
|

get Revision from Git (short Hash)

Peter Kovacs-3
Hi all,


I have adjusted the Function DetectRevisionId in
main/solenv/bin/modules/SvnRevision.pm to return the short hash when
executed in a git repository.

If it is not a git repository, it will fallback to the SVN logic. The
short hash includes a newline. I am not sure if that will make any trouble.


I have attached the patch. Please review. I could not test a complete
build I have some building issues. (I will send some separated mails.)

Also I have not checked in because of the lacking N2N test, and since I
do not know what this newline does.


All the Best

Peter



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

revisionNo.patch (2K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: get Revision from Git (short Hash)

Marcus (OOo)
Am 11.08.19 um 19:40 schrieb Peter Kovacs:

> I have adjusted the Function DetectRevisionId in
> main/solenv/bin/modules/SvnRevision.pm to return the short hash when
> executed in a git repository.
>
> If it is not a git repository, it will fallback to the SVN logic. The
> short hash includes a newline. I am not sure if that will make any trouble.
>
>
> I have attached the patch. Please review. I could not test a complete
> build I have some building issues. (I will send some separated mails.)
>
> Also I have not checked in because of the lacking N2N test, and since I
> do not know what this newline does.

thanks for the piece of code. Any sideeffects need to be tested of course.

One problem I could image is the About dialog. Showing the Git hash with
a newline would be not suitable.

Any other problem would be in the build system itself I thin.

So, avoiding the newline would be great.

Marcus


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: get Revision from Git (short Hash)

Peter Kovacs-3
Ok. I remove it.

On 11.08.19 19:56, Marcus wrote:

> Am 11.08.19 um 19:40 schrieb Peter Kovacs:
>> I have adjusted the Function DetectRevisionId in
>> main/solenv/bin/modules/SvnRevision.pm to return the short hash when
>> executed in a git repository.
>>
>> If it is not a git repository, it will fallback to the SVN logic. The
>> short hash includes a newline. I am not sure if that will make any
>> trouble.
>>
>>
>> I have attached the patch. Please review. I could not test a complete
>> build I have some building issues. (I will send some separated mails.)
>>
>> Also I have not checked in because of the lacking N2N test, and since I
>> do not know what this newline does.
>
> thanks for the piece of code. Any sideeffects need to be tested of
> course.
>
> One problem I could image is the About dialog. Showing the Git hash
> with a newline would be not suitable.
>
> Any other problem would be in the build system itself I thin.
>
> So, avoiding the newline would be great.
>
> Marcus
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: get Revision from Git (short Hash)

Peter Kovacs-3
Okay I am really out of practice with Perl.

I fixed an error in the script. I used the wrong command to escape to
the shell. -.-

please find an updated patch.

On 11.08.19 19:57, Peter Kovacs wrote:

> Ok. I remove it.
>
> On 11.08.19 19:56, Marcus wrote:
>> Am 11.08.19 um 19:40 schrieb Peter Kovacs:
>>> I have adjusted the Function DetectRevisionId in
>>> main/solenv/bin/modules/SvnRevision.pm to return the short hash when
>>> executed in a git repository.
>>>
>>> If it is not a git repository, it will fallback to the SVN logic. The
>>> short hash includes a newline. I am not sure if that will make any
>>> trouble.
>>>
>>>
>>> I have attached the patch. Please review. I could not test a complete
>>> build I have some building issues. (I will send some separated mails.)
>>>
>>> Also I have not checked in because of the lacking N2N test, and since I
>>> do not know what this newline does.
>> thanks for the piece of code. Any sideeffects need to be tested of
>> course.
>>
>> One problem I could image is the About dialog. Showing the Git hash
>> with a newline would be not suitable.
>>
>> Any other problem would be in the build system itself I thin.
>>
>> So, avoiding the newline would be great.
>>
>> Marcus
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden email]
>> For additional commands, e-mail: [hidden email]
>>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

revisionNo.patch (2K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: get Revision from Git (short Hash)

Matthias Seidel

Hi Peter,

Am 11.08.19 um 20:36 schrieb Peter Kovacs:
Okay I am really out of practice with Perl.

I fixed an error in the script. I used the wrong command to escape to
the shell. -.-

please find an updated patch.
Thanks! I am just building 4.2.0 for Windows with your patch applied.
On 11.08.19 19:57, Peter Kovacs wrote:
Ok. I remove it.

On 11.08.19 19:56, Marcus wrote:
Am 11.08.19 um 19:40 schrieb Peter Kovacs:
I have adjusted the Function DetectRevisionId in
main/solenv/bin/modules/SvnRevision.pm to return the short hash when
executed in a git repository.

If it is not a git repository, it will fallback to the SVN logic.

One addition:

If it is a Git repository it should first look for a git-svn-id. Only if it isn't present it should use the git hash.

This way it would be possible to build older revisions from Git with the SVN Revision (via git-svn-id).
Only newer revisions (after the switch to Git) would use the git hash.

 The
short hash includes a newline. I am not sure if that will make any
trouble.

Regarding the short git hash (vs. long git hash):

I can live with it. But if there is something fundamentally wrong with using it (in our About dialog and on our download page) the Git gurus should speak up *now*. ;-)

Regards,

   Matthias


I have attached the patch. Please review. I could not test a complete
build I have some building issues. (I will send some separated mails.)

Also I have not checked in because of the lacking N2N test, and since I
do not know what this newline does.
thanks for the piece of code. Any sideeffects need to be tested of
course.

One problem I could image is the About dialog. Showing the Git hash
with a newline would be not suitable.

Any other problem would be in the build system itself I thin.

So, avoiding the newline would be great.

Marcus


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

smime.p7s (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: get Revision from Git (short Hash)

Peter Kovacs-3
In reply to this post by Peter Kovacs-3
I try to add the feature. I currently do not know how to check/retireve
the git-svn-id. Need to search for it.

On 13.08.19 16:46, Matthias Seidel wrote:

>
> Hi Peter,
>
> Am 11.08.19 um 20:36 schrieb Peter Kovacs:
>> Okay I am really out of practice with Perl.
>>
>> I fixed an error in the script. I used the wrong command to escape to
>> the shell. -.-
>>
>> please find an updated patch.
> Thanks! I am just building 4.2.0 for Windows with your patch applied.
>> On 11.08.19 19:57, Peter Kovacs wrote:
>>> Ok. I remove it.
>>>
>>> On 11.08.19 19:56, Marcus wrote:
>>>> Am 11.08.19 um 19:40 schrieb Peter Kovacs:
>>>>> I have adjusted the Function DetectRevisionId in
>>>>> main/solenv/bin/modules/SvnRevision.pm to return the short hash when
>>>>> executed in a git repository.
>>>>>
>>>>> If it is not a git repository, it will fallback to the SVN logic.
>
> One addition:
>
> If it is a Git repository it should first look for a git-svn-id. Only
> if it isn't present it should use the git hash.
>
> This way it would be possible to build older revisions from Git with
> the SVN Revision (via git-svn-id).
> Only newer revisions (after the switch to Git) would use the git hash.
>
>>>>>  The
>>>>> short hash includes a newline. I am not sure if that will make any
>>>>> trouble.
>
> Regarding the short git hash (vs. long git hash):
>
> I can live with it. But if there is something fundamentally wrong with
> using it (in our About dialog and on our download page) the Git gurus
> should speak up *now*. ;-)
>
> Regards,
>
>    Matthias
>
>>>>> I have attached the patch. Please review. I could not test a complete
>>>>> build I have some building issues. (I will send some separated mails.)
>>>>>
>>>>> Also I have not checked in because of the lacking N2N test, and since I
>>>>> do not know what this newline does.
>>>> thanks for the piece of code. Any sideeffects need to be tested of
>>>> course.
>>>>
>>>> One problem I could image is the About dialog. Showing the Git hash
>>>> with a newline would be not suitable.
>>>>
>>>> Any other problem would be in the build system itself I thin.
>>>>
>>>> So, avoiding the newline would be great.
>>>>
>>>> Marcus
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: [hidden email]
>>>> For additional commands, e-mail: [hidden email]
>>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [hidden email]
>>> For additional commands, e-mail: [hidden email]
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [hidden email]
>>> For additional commands, e-mail: [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: get Revision from Git (short Hash)

Matthias Seidel
Hi Peter,

Am 13.08.19 um 19:14 schrieb Peter Kovacs:
> I try to add the feature. I currently do not know how to check/retireve
> the git-svn-id. Need to search for it.

That is the part you replaced... ;-)

Instead, just add your code without removing the old.

Regards,

   Matthias

>
> On 13.08.19 16:46, Matthias Seidel wrote:
>> Hi Peter,
>>
>> Am 11.08.19 um 20:36 schrieb Peter Kovacs:
>>> Okay I am really out of practice with Perl.
>>>
>>> I fixed an error in the script. I used the wrong command to escape to
>>> the shell. -.-
>>>
>>> please find an updated patch.
>> Thanks! I am just building 4.2.0 for Windows with your patch applied.
>>> On 11.08.19 19:57, Peter Kovacs wrote:
>>>> Ok. I remove it.
>>>>
>>>> On 11.08.19 19:56, Marcus wrote:
>>>>> Am 11.08.19 um 19:40 schrieb Peter Kovacs:
>>>>>> I have adjusted the Function DetectRevisionId in
>>>>>> main/solenv/bin/modules/SvnRevision.pm to return the short hash when
>>>>>> executed in a git repository.
>>>>>>
>>>>>> If it is not a git repository, it will fallback to the SVN logic.
>> One addition:
>>
>> If it is a Git repository it should first look for a git-svn-id. Only
>> if it isn't present it should use the git hash.
>>
>> This way it would be possible to build older revisions from Git with
>> the SVN Revision (via git-svn-id).
>> Only newer revisions (after the switch to Git) would use the git hash.
>>
>>>>>>  The
>>>>>> short hash includes a newline. I am not sure if that will make any
>>>>>> trouble.
>> Regarding the short git hash (vs. long git hash):
>>
>> I can live with it. But if there is something fundamentally wrong with
>> using it (in our About dialog and on our download page) the Git gurus
>> should speak up *now*. ;-)
>>
>> Regards,
>>
>>    Matthias
>>
>>>>>> I have attached the patch. Please review. I could not test a complete
>>>>>> build I have some building issues. (I will send some separated mails.)
>>>>>>
>>>>>> Also I have not checked in because of the lacking N2N test, and since I
>>>>>> do not know what this newline does.
>>>>> thanks for the piece of code. Any sideeffects need to be tested of
>>>>> course.
>>>>>
>>>>> One problem I could image is the About dialog. Showing the Git hash
>>>>> with a newline would be not suitable.
>>>>>
>>>>> Any other problem would be in the build system itself I thin.
>>>>>
>>>>> So, avoiding the newline would be great.
>>>>>
>>>>> Marcus
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: [hidden email]
>>>>> For additional commands, e-mail: [hidden email]
>>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: [hidden email]
>>>> For additional commands, e-mail: [hidden email]
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: [hidden email]
>>>> For additional commands, e-mail: [hidden email]


smime.p7s (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: get Revision from Git (short Hash)

Andrea Pescetti-2
In reply to this post by Matthias Seidel
On 13/08/2019 Matthias Seidel wrote:
> Regarding the short git hash (vs. long git hash):
> I can live with it. But if there is something fundamentally wrong with
> using it (in our About dialog and on our download page) the Git gurus
> should speak up *now*. ;-)

Short is fine. I would honestly prefer something that is increasing with
time, so something like "20190814-abcd123" as this is more informative
(note I mean the date of the specific commit, not the build date; the
two will be different in general).

I can take care of this when I have time for looking into it in case.

Regards,
   Andrea.

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: get Revision from Git (short Hash)

Dave Fisher-3


Sent from my iPhone

> On Aug 13, 2019, at 11:51 PM, Andrea Pescetti <[hidden email]> wrote:
>
>> On 13/08/2019 Matthias Seidel wrote:
>> Regarding the short git hash (vs. long git hash):
>> I can live with it. But if there is something fundamentally wrong with using it (in our About dialog and on our download page) the Git gurus should speak up *now*. ;-)
>
> Short is fine. I would honestly prefer something that is increasing with time, so something like "20190814-abcd123" as this is more informative (note I mean the date of the specific commit, not the build date; the two will be different in general).a
>
> I can take care of this when I have time for looking into it in case.

Are we discussing logic for the update process?

If so and switching to Git is one answer encoding a known progression and following that to check for updates?

Put another way does switching to Git require careful discussion of update scenarios?

Regards,
Dave
>
> Regards,
>  Andrea.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: get Revision from Git (short Hash)

Andrea Pescetti-2
Dave Fisher wrote:
> Put another way does switching to Git require careful discussion of update scenarios?

No. Updates use version numbers, that are defined (to some people, this
may be a bug rather than a feature!) explicitly in configuration files;
so they are not linked at all to the revision control system in use.

The revision number/hash is only significant for dev builds, where the
update mechanism does not apply.

Regards,
   Andrea.

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: get Revision from Git (short Hash)

Peter Kovacs-3
First we are already on git. The switch has already been completed. If you are unsatisfied from the plantings then that is fine for me.

I think you have only to modify the print git command from my patch to add the date. Also I have a variant ready that returns the git-svn-id if on is there.

Please see my patch earlier in the thread.

Am 14. August 2019 10:28:59 MESZ schrieb Andrea Pescetti <[hidden email]>:

>Dave Fisher wrote:
>> Put another way does switching to Git require careful discussion of
>update scenarios?
>
>No. Updates use version numbers, that are defined (to some people, this
>
>may be a bug rather than a feature!) explicitly in configuration files;
>
>so they are not linked at all to the revision control system in use.
>
>The revision number/hash is only significant for dev builds, where the
>update mechanism does not apply.
>
>Regards,
>   Andrea.
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [hidden email]
>For additional commands, e-mail: [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: get Revision from Git (short Hash)

Matthias Seidel
Hi Peter, all,

Am 14.08.19 um 12:16 schrieb Peter Kovacs:
> First we are already on git. The switch has already been completed. If you are unsatisfied from the plantings then that is fine for me.
>
> I think you have only to modify the print git command from my patch to add the date. Also I have a variant ready that returns the git-svn-id if on is there.

I don't think this is necessary: We already have the build id, the build
date and now the git hash (which is a unique link to the last commit it
was based on):

https://www.dropbox.com/s/tkal1y9b09vrhse/VirtualBox_Windows%2010%20AOO-Build_14_08_2019_16_14_33.png?dl=0

This is how we did it with SVN, why should we change it?


@Peter:
I made a logical mistake regarding the git-svn-id, so I think your first
patch is totally sufficient.

Regards,

   Matthias

>
> Please see my patch earlier in the thread.
>
> Am 14. August 2019 10:28:59 MESZ schrieb Andrea Pescetti <[hidden email]>:
>> Dave Fisher wrote:
>>> Put another way does switching to Git require careful discussion of
>> update scenarios?
>>
>> No. Updates use version numbers, that are defined (to some people, this
>>
>> may be a bug rather than a feature!) explicitly in configuration files;
>>
>> so they are not linked at all to the revision control system in use.
>>
>> The revision number/hash is only significant for dev builds, where the
>> update mechanism does not apply.
>>
>> Regards,
>>   Andrea.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden email]
>> For additional commands, e-mail: [hidden email]


smime.p7s (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: get Revision from Git (short Hash)

Andrea Pescetti-2
Matthias Seidel wrote:
> We already have the build id, the build
> date and now the git hash (which is a unique link to the last commit it
> was based on)
> This is how we did it with SVN, why should we change it?

Because we are dropping information. The SVN revisions are always
increasing, and thus (independent on the build date, which can be at any
moment) I can compare two builds and retain information on which came first.

With git of course this doesn't hold, i.e., you cannot say which commit
came earlier between abcd1234 and 5678abcd. So I see some added value if
we enrich it this way.

Regards,
   Andrea.

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: get Revision from Git (short Hash)

Matthias Seidel
Hi Andrea,

Am 14.08.19 um 16:51 schrieb Andrea Pescetti:

> Matthias Seidel wrote:
>> We already have the build id, the build
>> date and now the git hash (which is a unique link to the last commit it
>> was based on)
>> This is how we did it with SVN, why should we change it?
>
> Because we are dropping information. The SVN revisions are always
> increasing, and thus (independent on the build date, which can be at
> any moment) I can compare two builds and retain information on which
> came first.
>
> With git of course this doesn't hold, i.e., you cannot say which
> commit came earlier between abcd1234 and 5678abcd. So I see some added
> value if we enrich it this way.
OK, then we could do it like Peter suggested and add the (commit) date
after the Git hash.

Something like this (in case of my build):

AOO420m2(Build:9821)  -  Rev. 20ef23374c  -   Mon Aug 12 21:11:24 2019 +0200
2019-08-13 15:58 - CYGWIN_NT-10.0 x86_64 - Development Test Build

Matthias

>
> Regards,
>   Andrea.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>


smime.p7s (5K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: get Revision from Git (short Hash)

Peter Kovacs-3
We need to check if local commit dates change with pull or push to gitbox.
I would prefer git commit number over dates, drawn from gitbox as additional information.

Am 14. August 2019 17:03:04 MESZ schrieb Matthias Seidel <[hidden email]>:

>Hi Andrea,
>
>Am 14.08.19 um 16:51 schrieb Andrea Pescetti:
>> Matthias Seidel wrote:
>>> We already have the build id, the build
>>> date and now the git hash (which is a unique link to the last commit
>it
>>> was based on)
>>> This is how we did it with SVN, why should we change it?
>>
>> Because we are dropping information. The SVN revisions are always
>> increasing, and thus (independent on the build date, which can be at
>> any moment) I can compare two builds and retain information on which
>> came first.
>>
>> With git of course this doesn't hold, i.e., you cannot say which
>> commit came earlier between abcd1234 and 5678abcd. So I see some
>added
>> value if we enrich it this way.
>
>OK, then we could do it like Peter suggested and add the (commit) date
>after the Git hash.
>
>Something like this (in case of my build):
>
>AOO420m2(Build:9821)  -  Rev. 20ef23374c  -   Mon Aug 12 21:11:24 2019
>+0200
>2019-08-13 15:58 - CYGWIN_NT-10.0 x86_64 - Development Test Build
>
>Matthias
>
>>
>> Regards,
>>   Andrea.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden email]
>> For additional commands, e-mail: [hidden email]
>>
Reply | Threaded
Open this post in threaded view
|

Re: get Revision from Git (short Hash)

Jim Jagielski
FWIW, this is what AOO 4.1.7 looks like:

Reply | Threaded
Open this post in threaded view
|

Re: get Revision from Git (short Hash)

Jim Jagielski
In reply to this post by Andrea Pescetti-2


> On Aug 14, 2019, at 10:51 AM, Andrea Pescetti <[hidden email]> wrote:
>
> Matthias Seidel wrote:
>> We already have the build id, the build
>> date and now the git hash (which is a unique link to the last commit it
>> was based on)
>> This is how we did it with SVN, why should we change it?
>
> Because we are dropping information. The SVN revisions are always increasing, and thus (independent on the build date, which can be at any moment) I can compare two builds and retain information on which came first.
>
> With git of course this doesn't hold, i.e., you cannot say which commit came earlier between abcd1234 and 5678abcd. So I see some added value if we enrich it this way.
>

Is that needed though? I had thought the basic reason for having the SVN ID is that the end-user knows, for sure, which SVN revision their app was built from.


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: get Revision from Git (short Hash)

Marcus (OOo)
Am 14.08.19 um 22:02 schrieb Jim Jagielski:

>> On Aug 14, 2019, at 10:51 AM, Andrea Pescetti <[hidden email]> wrote:
>>
>> Matthias Seidel wrote:
>>> We already have the build id, the build
>>> date and now the git hash (which is a unique link to the last commit it
>>> was based on)
>>> This is how we did it with SVN, why should we change it?
>>
>> Because we are dropping information. The SVN revisions are always increasing, and thus (independent on the build date, which can be at any moment) I can compare two builds and retain information on which came first.
>>
>> With git of course this doesn't hold, i.e., you cannot say which commit came earlier between abcd1234 and 5678abcd. So I see some added value if we enrich it this way.
>
> Is that needed though? I had thought the basic reason for having the SVN ID is that the end-user knows, for sure, which SVN revision their app was built from.

it's unrealistic that the commit was done, e.g., today but the build
weeks later. So, Git hash and build date is not done at the exact same
date and time. But nearly. And here it think it's sufficiant.

But when we decide to prefix the hash with a date value it's OK for me, too.

Marcus

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: get Revision from Git (short Hash)

Kay Schenk-2
On Wed, Aug 14, 2019 at 1:24 PM Marcus <[hidden email]> wrote:

> Am 14.08.19 um 22:02 schrieb Jim Jagielski:
> >> On Aug 14, 2019, at 10:51 AM, Andrea Pescetti <[hidden email]>
> wrote:
> >>
> >> Matthias Seidel wrote:
> >>> We already have the build id, the build
> >>> date and now the git hash (which is a unique link to the last commit it
> >>> was based on)
> >>> This is how we did it with SVN, why should we change it?
> >>
> >> Because we are dropping information. The SVN revisions are always
> increasing, and thus (independent on the build date, which can be at any
> moment) I can compare two builds and retain information on which came first.
> >>
> >> With git of course this doesn't hold, i.e., you cannot say which commit
> came earlier between abcd1234 and 5678abcd. So I see some added value if we
> enrich it this way.
> >
> > Is that needed though? I had thought the basic reason for having the SVN
> ID is that the end-user knows, for sure, which SVN revision their app was
> built from.
>
> it's unrealistic that the commit was done, e.g., today but the build
> weeks later. So, Git hash and build date is not done at the exact same
> date and time. But nearly. And here it think it's sufficiant.
>
> But when we decide to prefix the hash with a date value it's OK for me,
> too.
>
> Marcus
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>
I think the date and hash should be displayed in the "build information"
screen as the revision information was previously. In Jim's sample display,
although the date is displayed, there is no indication of actual "revision"
(hash).

--
"And in the end, only kindness matters."
   -- Jewel, "Hands"
________________________________________
MzK
Reply | Threaded
Open this post in threaded view
|

Re: get Revision from Git (short Hash)

Matthias Seidel
Hi Kay,

Am 15.08.19 um 00:02 schrieb Kay Schenk:

> On Wed, Aug 14, 2019 at 1:24 PM Marcus <[hidden email]> wrote:
>
>> Am 14.08.19 um 22:02 schrieb Jim Jagielski:
>>>> On Aug 14, 2019, at 10:51 AM, Andrea Pescetti <[hidden email]>
>> wrote:
>>>> Matthias Seidel wrote:
>>>>> We already have the build id, the build
>>>>> date and now the git hash (which is a unique link to the last commit it
>>>>> was based on)
>>>>> This is how we did it with SVN, why should we change it?
>>>> Because we are dropping information. The SVN revisions are always
>> increasing, and thus (independent on the build date, which can be at any
>> moment) I can compare two builds and retain information on which came first.
>>>> With git of course this doesn't hold, i.e., you cannot say which commit
>> came earlier between abcd1234 and 5678abcd. So I see some added value if we
>> enrich it this way.
>>> Is that needed though? I had thought the basic reason for having the SVN
>> ID is that the end-user knows, for sure, which SVN revision their app was
>> built from.
>>
>> it's unrealistic that the commit was done, e.g., today but the build
>> weeks later. So, Git hash and build date is not done at the exact same
>> date and time. But nearly. And here it think it's sufficiant.
>>
>> But when we decide to prefix the hash with a date value it's OK for me,
>> too.
>>
>> Marcus
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden email]
>> For additional commands, e-mail: [hidden email]
>>
>>
> I think the date and hash should be displayed in the "build information"
> screen as the revision information was previously. In Jim's sample display,
> although the date is displayed, there is no indication of actual "revision"
> (hash).
This is simply because the code we are discussing about is still not
committed.

I applied Peters patch and it looks like this:

https://www.dropbox.com/s/tkal1y9b09vrhse/VirtualBox_Windows%2010%20AOO-Build_14_08_2019_16_14_33.png?dl=0

Matthias

>


smime.p7s (5K) Download Attachment
12