1. Integrating Git for Euphoria

I have been getting compile failures and since version information is loaded from Mercurial, we need to integrate Git the way Mercurial was integrated before. Rather than failing, it should write unknown, unknown but when there is a .git directory we should be able to get something like what we had before.

There is no concept of a linear numeric rev in git as far as I can tell. Right now, I have some changes that integrate git version information into the build of Euphoria.

I want to do basically the git equivalent to:

hg push -f 

The git branch, basically adapts to the use git. It is based off 4.0.5. Later, we can replay changes on the tip of 4.0 and 4.1.

new topic     » topic index » view message » categorize

2. Re: Integrating Git for Euphoria

SDPringle said...

There is no concept of a linear numeric rev in git as far as I can tell.

Correct. We should just use the commit ID and the date moving forward.

https://stackoverflow.com/a/1968001/2300395

  • Use git rev-parse HEAD to get the commit ID.

https://stackoverflow.com/a/3815007/2300395

  • Use git show -s --format=%ci HEAD to get the commit date string.
SDPringle said...

Right now, I have some changes that integrate git version information into the build of Euphoria.

I want to do basically the git equivalent to:

hg push -f 

The git branch, basically adapts to the use git. It is based off 4.0.5. Later, we can replay changes on the tip of 4.0 and 4.1.

https://stackoverflow.com/a/6232535/2300395

  • Use git push -u origin <branch> to set the upstream for your branch to origin.

https://stackoverflow.com/a/4089452/2300395

  • Use git remote show origin to show your remote URLs and branch information.

-Greg

new topic     » goto parent     » topic index » view message » categorize

3. Re: Integrating Git for Euphoria

SCM_REV is returned by eu_info. It must be set to something. I am setting it to -1.

new topic     » goto parent     » topic index » view message » categorize

4. Re: Integrating Git for Euphoria

SDPringle said...

SCM_REV is returned by eu_info. It must be set to something. I am setting it to -1.

Actually, I figured that out too, sort of. While Git doesn't support a commit ID per se, you can just use the number of commits to date, which should always increment.

https://stackoverflow.com/a/4061706/2300395

git rev-list --all --count

Edit: although, it may be best to leave it at -1 since to signify the change to Git.

-Greg

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu