github some cool feature

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
User avatar
bernd
Posts: 8441
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

github some cool feature

Postby bernd » Tue Jan 30, 2018 12:09 pm

For a long time I was looking for some simple possibility to show the commit list starting at aspecific commit. Just realized this is really really easy. If you have the specific commit like in the following screen.

pic1.jpg
pic1.jpg (312.79 KiB) Viewed 1087 times



just add a "s" to commit and it will look like this:

pic2.jpg
pic2.jpg (393.36 KiB) Viewed 1087 times



:D I'm quite excited that is why I just like to show this to you guys. Bernd :mrgreen:
chrisb
Posts: 18991
Joined: Tue Mar 17, 2015 9:14 am

Re: github some cool feature

Postby chrisb » Tue Jan 30, 2018 12:47 pm

bernd wrote:
Tue Jan 30, 2018 12:09 pm
just add a "s"
Thanks for sharing. Now as you became a Master Of Git: Where do have to put the "s" in order to see the FreeCAD version number belonging to a certain commit? :)
User avatar
bernd
Posts: 8441
Joined: Sun Sep 08, 2013 8:07 pm
Location: Zürich, Switzerland

Re: github some cool feature

Postby bernd » Tue Jan 30, 2018 1:53 pm

pic one commit without s, pic two commits with s in browser address ... :mrgreen:
chrisb
Posts: 18991
Joined: Tue Mar 17, 2015 9:14 am

Re: github some cool feature

Postby chrisb » Tue Jan 30, 2018 3:05 pm

bernd wrote:
Tue Jan 30, 2018 1:53 pm
pic one commit without s, pic two commits with s in browser address ... :mrgreen:
Sorry I wasn't very serious and I didn't make myself clear: I was asking for a simple possibility to derive the FreeCAD version number - e.g. 13180, 13181, ... from the git commit number. Now I compare the git number on the FreeCAD site with the single numbers in the list on git.
Last edited by chrisb on Tue Jan 30, 2018 9:50 pm, edited 1 time in total.
User avatar
Kunda1
Posts: 5799
Joined: Thu Jan 05, 2017 9:03 pm

Re: github some cool feature

Postby Kunda1 » Tue Jan 30, 2018 3:41 pm

Some other tips:
Want to contribute back to FC? Checkout:
#lowhangingfruit | Use the Source, Luke. | How to Help FreeCAD | How to report FC bugs and features
wandererfan
Posts: 3080
Joined: Tue Nov 06, 2012 5:42 pm

Re: github some cool feature

Postby wandererfan » Tue Jan 30, 2018 7:35 pm

chrisb wrote:
Tue Jan 30, 2018 3:05 pm
Sorry I wasn't very serious and I didn't make myself clear: I was asking for a simple possibility to derive the FreeCAD version number - e.g. 13180, 13181, ... from the git commit number. No wI compare the git number on the FreeCAD site with the single numbers in the list on git.
this discussion tells how to find the version number of current branch. So you could checkout commit 12345678 then use rev-list to find the version number.
User avatar
sgrogan
Posts: 5424
Joined: Wed Oct 22, 2014 5:02 pm

Re: github some cool feature

Postby sgrogan » Tue Jan 30, 2018 10:21 pm

wandererfan wrote:
Tue Jan 30, 2018 7:35 pm
this discussion tells how to find the version number of current branch. So you could checkout commit 12345678 then use rev-list to find the version number.
chrisb wrote:
Tue Jan 30, 2018 3:05 pm
Sorry I wasn't very serious and I didn't make myself clear: I was asking for a simple possibility to derive the FreeCAD version number - e.g. 13180, 13181, ... from the git commit number. Now I compare the git number on the FreeCAD site with the single numbers in the list on git.
https://forum.freecadweb.org/viewtopic. ... 60#p212589

I think I know where chrisb is going with this.

Imagine the following without a git clone on your system.
wmayer makes a classic "git commit 12345" post on the forum in response to a bug/feature request.
Wow, this is great, what version does this correspond to? (Maybe we can use the GitHub web API)
Wow, this is even more great, I wonder if the "daily" builds have this yet? (maybe there is a way to use the GitHub Releases API and/or Launchpad API)

This has the makings of a pretty nifty macro tied to a global custom toolbar.
chrisb
Posts: 18991
Joined: Tue Mar 17, 2015 9:14 am

Re: github some cool feature

Postby chrisb » Wed Jan 31, 2018 12:44 am

sgrogan wrote:
Tue Jan 30, 2018 10:21 pm
I think I know where chrisb is going with this.
And you are right, that is exactly the usecase I had in mind. Perhaps the development download page could tell which version the current ppa has.
User avatar
sgrogan
Posts: 5424
Joined: Wed Oct 22, 2014 5:02 pm

Re: github some cool feature

Postby sgrogan » Wed Jan 31, 2018 9:42 pm

chrisb wrote:
Wed Jan 31, 2018 12:44 am
And you are right, that is exactly the usecase I had in mind. Perhaps the development download page could tell which version the current ppa has.
Not directly without some fancy webhooks I don't know.
I could add a link like I posted above in the release desciption? Would that help?
bernd wrote:
Tue Jan 30, 2018 12:09 pm
:D I'm quite excited that is why I just like to show this to you guys. Bernd : Lol:
Sorry to highjack the thread bernd :oops: Your next task is to show the commits before the referenced commit. I will try -s :geek:
chrisb
Posts: 18991
Joined: Tue Mar 17, 2015 9:14 am

Re: github some cool feature

Postby chrisb » Thu Feb 01, 2018 1:53 am

sgrogan wrote:
Wed Jan 31, 2018 9:42 pm
I could add a link like I posted above in the release desciption? Would that help?
Yes. And thanks for the effort.