Lazarus

Announcements => Lazarus => Topic started by: Martin_fr on July 26, 2021, 11:18:38 am

Title: We are now using GIT
Post by: Martin_fr on July 26, 2021, 11:18:38 am
Lazarus has moved

The new official repository is now available at
     https://gitlab.com/freepascal.org/lazarus/lazarus

All bug-reports have been moved to Gitlab too, and the new tracker can be found at the above address.


Mirrors for Git read access are at
  https://github.com/fpc
  https://sourceforge.net/p/lazarus/git/ci/main/tree/



EDIT:
Couple of notes/rules.



FPC has moved

FPC bugs has also moved.

[Edited to indicate move complete]
Title: Re: We are now using GIT
Post by: del on July 26, 2021, 11:37:19 am
Very cool.
Title: Re: We are now using GIT
Post by: Artlav on July 26, 2021, 12:21:15 pm
Was FPC issue tracker fully moved over? I can't find any of the recent issues, i.e. https://bugs.freepascal.org/view.php?id=39275
At least some of the old ones as well, actually.

Also, any plans for redirects? The old links are giving rather unhelpful 403 messages.
Title: Re: We are now using GIT
Post by: lucamar on July 26, 2021, 12:28:58 pm
Artlav, this announcement is only for Lazarus. FPC will have its own repository, tracker, etc. (that is, if I understood correctly; I'm not a core developer in any of the projects :-[)
Title: Re: We are now using GIT
Post by: korba812 on July 26, 2021, 12:31:10 pm
I see the Lazarus bugtracker has been moved. But where do I find reports from the "CCR" section of the old bugtraker?
Title: Re: We are now using GIT
Post by: Martin_fr on July 26, 2021, 12:50:01 pm
Was FPC issue tracker fully moved over? I can't find any of the recent issues, i.e. https://bugs.freepascal.org/view.php?id=39275
At least some of the old ones as well, actually.

Also, any plans for redirects? The old links are giving rather unhelpful 403 messages.

FPC is still moving

They will have an issue tracker in the same gitlab account, but in their sub group.
Title: Re: We are now using GIT
Post by: ccrause on July 26, 2021, 05:09:26 pm
Anyone knows how to move a branch with commit history from Github to GitLab and preserve commit history?  Work started as a branch of a fork of Martin's Lazarus Github mirror.  Would like to move this branch across to a fork of the official GitLab Lazarus project if possible.

I can recreate the branch from scratch and copy the changes across, but this would not have the commit history.
Title: Re: We are now using GIT
Post by: Martin_fr on July 26, 2021, 05:42:25 pm
yep.
Checkout both repositories.

It your github clone, add a new remote, as url use the path to your gitlab checkout.
  git remote update.

now you have both in the same local repro.

Code: Text  [Select][+][-]
  1. git rebase --reapply-cherry-picks --onto  <commit_in_new_local_gitlab>   <upstream_in_old_githup_e_g_master>  <branch_in_old_github>

Then push the rebased branch to your local gitlab clone.


Unfortunately some files in the conversion are checked in with wrong line endings.
This can, if you switch to older commits, lead to files showing as modified, and blocking rebase. In that case make sure you are on "main" head, before starting rebase.

You can also temporary create a file .git/info/gitattributes  and put the affected files in there as binary (IIRC  /path/file -text )
Or disable core.autocrlf


Title: Re: We are now using GIT
Post by: DonAlfredo on July 26, 2021, 06:00:38 pm
Another alternative way. Export all commits your are interested in as a patch. Followed by an import all patches into your new repo.
Example of export:
Code: Pascal  [Select][+][-]
  1. git format-patch --output-directory "../patches" --root origin --since="Dec 25, 2020"
Title: Re: We are now using GIT
Post by: jamie on July 26, 2021, 11:06:27 pm
The connection to the gitlab lazarus link repositories is very unreliable.

I get a 404 almost every try..

if I get lucky I will see the page but mostly 404.

Seems to be band width issues or just plane rejecting me.

If I first go to the fpc page that logs in every time and from there I attempt the Lazarus page which is a shot in the dark for me.

 btw.
   What do I need to do change my SVN URL in the existing trunk I have ? I am using the windows desk top version of it.

   I know where the URL properties are, do I need only to change that or do I need to do a complete checkout again ?

EDIT2
  I don't know what to say, its working now.. ?

  but still need some insight to directing the SNV path ?

Title: Re: We are now using GIT
Post by: Martin_fr on July 27, 2021, 12:04:09 am
Gitlab has been working fine for me all the time. Both webpage and repro access.
Maybe some routing on the way.
Or maybe your IP was in the same range as that of someone doing malicious stuff?


 btw.
   What do I need to do change my SVN URL in the existing trunk I have ? I am using the windows desk top version of it.

   I know where the URL properties are, do I need only to change that or do I need to do a complete checkout again ?


The url is on the github site. Just drop down the "clone" button. (as if you wanted the git link / svn is the same link)

Since github reverse translates git to svn, all the revision numbers will have changed. I doubt you can simply change the url in your client. (But I have not tested, maybe it does something useful, or at least recoverable...)
I guess remove the current checkout, and do a new checkout.

And again, while the choice to use this is there, the svn revision numbers will be useless in conversations about what works and what does not.
No one in the team (afaik) has that checkout. So we will have no idea what any rev number actually points to.

Title: Re: We are now using GIT
Post by: Martin_fr on July 27, 2021, 12:09:02 am
Gitlab has been working fine for me all the time. Both webpage and repro access.
Maybe some routing on the way.
Or maybe your IP was in the same range as that of someone doing malicious stuff?

Ah, well yes. Actually.

Just recalling, there was/is some more maintenance. So we have/had to temporarily make the repro private. That explains the 404.
Sorry about that.

I have to get the exact feedback, but I estimate it should be done by tomorrow.

Title: Re: We are now using GIT
Post by: dsiders on July 27, 2021, 12:15:00 am
Gitlab has been working fine for me all the time. Both webpage and repro access.
Maybe some routing on the way.
Or maybe your IP was in the same range as that of someone doing malicious stuff?

Not working here. 
https://gitlab.com/freepascal.org/lazarus/lazarus returns 404.

CLI git pull returns:
remote: The project you were looking for could not be found or you don't have permission to view it.
fatal: repository 'https://gitlab.com/freepascal.org/lazarus/lazarus.git/' not found
Title: Re: We are now using GIT
Post by: Martin_fr on July 27, 2021, 12:18:28 am
See my 2nd post.

We "forgot" to move some bug from mantis to gitlab. We are doing that now.

But in order to be able to do that, we need to disable access.

----------
Should have been better communicated. But it was just realized maybe an hour ago. I even forgot when I made the first reply earlier....
Title: Re: We are now using GIT
Post by: dsiders on July 27, 2021, 12:44:15 am
See my 2nd post.

We "forgot" to move some bug from mantis to gitlab. We are doing that now.

But in order to be able to do that, we need to disable access.

----------
Should have been better communicated. But it was just realized maybe an hour ago. I even forgot when I made the first reply earlier....

Sorry. I overlooked that one.
Title: Re: We are now using GIT
Post by: LacaK on July 27, 2021, 08:15:11 am
When migration will be done can be "bugs.freepascal.org" redirected to new location on GitLab?
Title: Re: We are now using GIT
Post by: PascalDragon on July 27, 2021, 08:59:26 am
When migration will be done can be "bugs.freepascal.org" redirected to new location on GitLab?

Once all bugs are migrated suitable redirects will be placed.
Title: Re: We are now using GIT
Post by: ccrause on July 27, 2021, 09:02:05 am
yep.
Checkout both repositories.

It your github clone, add a new remote, as url use the path to your gitlab checkout.
  git remote update.

now you have both in the same local repro.

Code: Text  [Select][+][-]
  1. git rebase --reapply-cherry-picks --onto  <commit_in_new_local_gitlab>   <upstream_in_old_githup_e_g_master>  <branch_in_old_github>

Then push the rebased branch to your local gitlab clone.
Thanks for the tips Martin.  I struggled a bit with getting the rebased github branch into gitlab, but eventually got it working.

Another alternative way. Export all commits your are interested in as a patch. Followed by an import all patches into your new repo.
Example of export:
Code: Pascal  [Select][+][-]
  1. git format-patch --output-directory "../patches" --root origin --since="Dec 25, 2020"
Hi Alfred, thanks for the alternative.  Git certainly is very flexibile.
Title: Re: We are now using GIT
Post by: Martin_fr on July 27, 2021, 08:21:46 pm

Currently offline again
More info to follow soon
Title: Re: We are now using GIT
Post by: Martin_fr on July 27, 2021, 10:47:33 pm
Please see: https://forum.lazarus.freepascal.org/index.php?topic=55551
Title: Re: We are now using GIT
Post by: lucamar on July 28, 2021, 01:09:51 pm
While we are at it, what will happen with the repo at:
https://svn.freepascal.org/svn/lazarus/
???
Title: Re: We are now using GIT
Post by: PascalDragon on July 28, 2021, 01:19:50 pm
It will be removed once the conversion is done.
Title: Re: We are now using GIT
Post by: ChrisR on July 28, 2021, 01:41:09 pm
I think that the transition to GitLab is a great idea for long term us, and I applaud the developers that ported the issues from mantis to GitLab.

I do also want to applaud those that developed and maintained the Mantis Bug Tracker for years. It served us well for a long time. It is the end of an era.
Title: Re: We are now using GIT
Post by: DonAlfredo on July 29, 2021, 07:54:35 am
Quote
It will be removed once the conversion is done.
If possible, I would like to ask for the non-changing sources (and binaries) to remain available through SVN for at least another year. Non-changing: everything except trunk and current fixes.
As the (future) releases (binaries) will still be hosted on on sourceforge (if I understood correct), a second request might be to make the accompanying sources of these releases also available through SVN.
Title: Re: We are now using GIT
Post by: PascalDragon on July 29, 2021, 09:00:06 am
Quote
It will be removed once the conversion is done.
If possible, I would like to ask for the non-changing sources (and binaries) to remain available through SVN for at least another year. Non-changing: everything except trunk and current fixes.
As the (future) releases (binaries) will still be hosted on on sourceforge (if I understood correct), a second request might be to make the accompanying sources of these releases also available through SVN.

No. The SVN service will be shutdown, because the server running it it will phased out. We switched to a new server without SVN installed and there is no desire to install it there (which was one reason why we moved now, so that we can avoid double payment).
Title: Re: We are now using GIT
Post by: JuhaManninen on July 29, 2021, 02:46:36 pm
If possible, I would like to ask for the non-changing sources (and binaries) to remain available through SVN for at least another year. Non-changing: everything except trun,k and current fixes.
This means the fixes branches of releases, right?
Everything will be available through SVN by a Github mirror.  Martin has explained it in one of his posts.
Title: Re: We are now using GIT
Post by: DonAlfredo on July 29, 2021, 03:45:13 pm
@JuhaManninen
Its good to know that github also give access through SVN.
However, I meant to have the non-changing sources remain available for a while to make the transition a bit smooth.
I understand now that these sources are currently hosted on a server that will be decommissioned. So, its understandable that this is not possible.
Title: Re: We are now using GIT
Post by: JuhaManninen on July 29, 2021, 04:16:01 pm
However, I meant to have the non-changing sources remain available for a while to make the transition a bit smooth.
The non-changing branches will remain in your computer's HD once you have downloaded them.
New users wanting to test and study history, can get them from Gitlab or Github.
I don't see a big issue here.
Title: Re: We are now using GIT
Post by: PascalDragon on July 30, 2021, 09:06:25 am
However, I meant to have the non-changing sources remain available for a while to make the transition a bit smooth.

The source archives and binary releases are still available on our own servers as well as SourceForge and this will continue to be so also for new releases. And the release tags from SVN will be migrated to Git as well.
Title: Re: We are now using GIT
Post by: Martin_fr on July 30, 2021, 10:34:57 am
I think this is about fpcupdeluxe.

Which a lot of people have, and have with the current url.  For those people the notice is unfortunate short. But it can't be helped.

The only replacement (if git is not an immediate option) is the github svn.
But that is not a 1 to 1 replacement. It has different revision numbers, and I am not sure what other oddities may lurk around.
Title: Re: We are now using GIT
Post by: DonAlfredo on July 30, 2021, 11:59:43 am
Quote
I think this is about fpcupdeluxe.
Yes it is. I would have preferred all non-changing installs (all stables from present to past) to remain valid.
But again, the change towards gitlab is already very time consuming for the FPC and Lazarus devs, so the challenge of fpcupdeluxe will be to work around the absence of SVN sources. No problem.
The only thing I am still investigating is the sequential revision numbering. But we already had some discussions about this. Fpcupdeluxe has now an experimental implementation.
Title: Re: We are now using GIT
Post by: prof7bit on July 30, 2021, 01:22:49 pm
Fpcupdeluxe has now an experimental implementation.
Its already broken again, the repository is now "testconversion" and not "testconversion2" anymore :-(

I wonder why the svn server has been taken down before everything is in place on gitlab with permanent repository urls.
Title: Re: We are now using GIT
Post by: Martin_fr on July 30, 2021, 01:43:43 pm
Fpcupdeluxe has now an experimental implementation.
Its already broken again, the repository is now "testconversion" and not "testconversion2" anymore :-(

I wonder why the svn server has been taken down before everything is in place on gitlab with permanent repository urls.

See my replies in the other thread:


Was it really necessary to take down the svn server before everything is in place on gitlab?

It wasn't planned...

We had aimed to move on the 14th (start + 2 or 3 days for the move)

We've tested the move over and over in the past 2 month.
But despite this, some last minute issues came in. (not all technical, but some technical).

So we where forced to move it back by one week. (knowing that the server would go offline at the end of the month).
And then it took more than the 3 days planed...

Of course, even that would have left "only" 2 weeks for everyone to switch from svn to git.

Btw, Lazarus repro is avail on the Github mirror, including githubs "git to svn" svn access. (which you may be able to use in FpcUpDeluxe for the time being)



That said, retrospectively a lot could have done better. Better communicated too.
But, this isn't our normal line of work. So we didn't foresee every detail.
If we were starting the move now, with the knowledge we gained => that would be a diff story.




Fortunately I have btrfs and snapshots, otherwise I would not have a working Lazarus installation anymore now :-/.

Someone needs to check if FpcUpDeluxe works with SVN access to:
    https://github.com/fpc/Lazarus.git

Yes it says .git. But github supports svn on that url.

Mind, keep to tags => revision numbers will be diff from the existing, as this is translated back from the git repro.
(On the other hand, it even gets new commits)
Title: Re: We are now using GIT
Post by: Martin_fr on July 30, 2021, 01:49:35 pm
Ok, Lazarus is available now at:

https://gitlab.com/freepascal.org/lazarus/lazarus.git
Title: Re: We are now using GIT
Post by: Martin_fr on July 30, 2021, 02:36:01 pm
You can search your old mantis issues as follows:

"** mantisname"   // Full name from Mantis

Monitored:
   "» @gitlabname"
   "» mantisname"   ONLY if you did not give a gitlab name
Title: Re: We are now using GIT
Post by: jamie on August 01, 2021, 03:14:22 am
Can i use the Windows GUI version of TorteiseSVN  with Git ?

I assume i need to do the checkout with a new local copy, if so what URL link do i need to specify for this ?

 I see the CLONE option to get the files via HTTPS or using a SSH etc...

 I would really like to use the Windows GUI method instead of using the command line GIT....

 The last time I did this all I did was create the checkout from the repository folder online but things have changed a little from what I can see.
Title: Re: We are now using GIT
Post by: skalogryz on August 01, 2021, 05:53:36 am
Can i use the Windows GUI version of TorteiseSVN  with Git ?
You mean TortoiseGit?
yes, you can definitely use it.

Beware though, while "TortoiseGit" and "TortoiseSVN" might look (and sound) alike, they're not the same.
In fact you will need understanding of git itself, in order to use TortoiseGit well.
Title: Re: We are now using GIT
Post by: marcov on August 01, 2021, 02:33:08 pm
Beware though, while "TortoiseGit" and "TortoiseSVN" might look (and sound) alike, they're not the same.
In fact you will need understanding of git itself, in order to use TortoiseGit well.

You will actually need git, as it doesn't come with TortoiseGIT. And be prepared for a 20 fold Q&A.
Title: Re: We are now using GIT
Post by: Martin_fr on August 01, 2021, 02:38:05 pm
Beware though, while "TortoiseGit" and "TortoiseSVN" might look (and sound) alike, they're not the same.
In fact you will need understanding of git itself, in order to use TortoiseGit well.

You will actually need git, as it doesn't come with TortoiseGIT. And be prepared for a 20 fold Q&A.

That is only if you want/need the command line git too.

You can use tortoise-git without command line. (but then you can't have any scripts or the like)
Title: Re: We are now using GIT
Post by: jamie on August 01, 2021, 07:09:40 pm
I have both the GUI and GIT.EXE installed and running..

I cloned the Repository and rebuilt the files and executed lazarus.

All seems well except for the fat I don't have any of the packages I added to the early tunk but I guess I can installed at some point.

 I was looking at the features I have to work with were it seems a little lesser than the SVN i was using..

 now I need to figure out how to do updates from the repository instead of complete down loads unless the clone feature figures that out for me..

 Also I need to learn the process of submitting patches now.


P.S.
  I found all the things I was looking for, I created one too many nested directories by mistake during the cloning process.

 have a good day.

Title: Re: We are now using GIT
Post by: ASBzone on August 01, 2021, 09:05:26 pm
That said, retrospectively a lot could have done better. Better communicated too.
But, this isn't our normal line of work. So we didn't foresee every detail.
If we were starting the move now, with the knowledge we gained => that would be a diff story.


I do project management and infrastructure changes for a living, and with projects of this size and scope, there are always issues that show up inconveniently.  Frankly, I get shocked by a very smooth migration.   :D

Overall, good work all considered, even with the lumps, bumps and humps.

-ASB
Title: Re: We are now using GIT
Post by: PascalDragon on August 02, 2021, 09:07:40 am
now I need to figure out how to do updates from the repository instead of complete down loads unless the clone feature figures that out for me..

You need to do the git clone only once (it's roughly the equivalent to svn checkout). For updates you do git pull (which is roughly equivalent to svn update). There are corresponding menu entries in the context menu of TortoiseGit.
Title: Re: We are now using GIT
Post by: El Salvador on August 02, 2021, 10:19:52 am
There are corresponding menu entries in the context menu of TortoiseGit.
For git starters (and especially TortoiseSVN users), I highly recommend using TortoiseGit on Windows. Otherwise you can use Github desktop client.
Title: Re: We are now using GIT
Post by: PeterBB on August 28, 2021, 11:49:44 am
I'm curious as to what has happenend to my bug report 37556
https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/37556 (https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/37556)

Items 37554 & 37555 have vanished too.  37553 & 37557 are OK.

Title: Re: We are now using GIT
Post by: PascalDragon on August 28, 2021, 12:12:34 pm
37554 (https://bugs.freepascal.org/view.php?id=37554) and 37555 (https://bugs.freepascal.org/view.php?id=37555) are part of the FPC (https://gitlab.com/freepascal.org/fpc/source/-/issues) project, not the Lazarus (https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues) project.

Do you remember what 37556 was about? Maybe we can find out where it vanished to.
Title: Re: We are now using GIT
Post by: PeterBB on August 28, 2021, 12:28:22 pm
Its about the fpgui widget set not compiling

https://web.archive.org/web/20201202041052/https://bugs.freepascal.org/view.php?id=37556 (https://web.archive.org/web/20201202041052/https://bugs.freepascal.org/view.php?id=37556)


Title: Re: We are now using GIT
Post by: PascalDragon on August 28, 2021, 02:23:06 pm
I've forwarded this to the core mailing list so that the one responsible for the conversion might take a look.
Title: Re: We are now using GIT
Post by: PeterBB on August 29, 2021, 01:31:25 am
Thanks
Title: Re: We are now using GIT
Post by: avra on August 30, 2021, 11:57:11 am
Unfortunately we can not close issues our selves, so I have to ask here someone to close issue https://gitlab.com/freepascal.org/lazarus/ccr/-/issues/35160. Thanks!
Title: Re: We are now using GIT
Post by: PeterBB on September 02, 2021, 10:57:42 pm
I've forwarded this to the core mailing list so that the one responsible for the conversion might take a look.

Hi, do you have a link for this?
I can't see anything relevant here
https://lists.lazarus-ide.org/pipermail/lazarus/2021-August/thread.html (https://lists.lazarus-ide.org/pipermail/lazarus/2021-August/thread.html)

Title: Re: We are now using GIT
Post by: Fred vS on September 02, 2021, 11:43:44 pm
I've forwarded this to the core mailing list so that the one responsible for the conversion might take a look.

Hi, do you have a link for this?
I can't see anything relevant here
https://lists.lazarus-ide.org/pipermail/lazarus/2021-August/thread.html (https://lists.lazarus-ide.org/pipermail/lazarus/2021-August/thread.html)

Hello.

For fpGUI related things, better to create a issue on his GitHub site:
https://github.com/graemeg/fpGUI/issues

Or mailing-list:
http://geldenhuys.co.uk/webnews/

Fre;D
Title: Re: We are now using GIT
Post by: PeterBB on September 03, 2021, 12:27:25 am
Hi Fred,

We were talking about a Lazarus bug being lost, that refers to Lazarus code that does not compile.
https://web.archive.org/web/20201202041052/https://bugs.freepascal.org/view.php?id=37556 (https://web.archive.org/web/20201202041052/https://bugs.freepascal.org/view.php?id=37556)

Native fpgui compiles just fine.
Title: Re: We are now using GIT
Post by: Fred vS on September 03, 2021, 12:43:59 am
Hi Fred,

We were talking about a Lazarus bug being lost, that refers to Lazarus code that does not compile.
https://web.archive.org/web/20201202041052/https://bugs.freepascal.org/view.php?id=37556 (https://web.archive.org/web/20201202041052/https://bugs.freepascal.org/view.php?id=37556)

Native fpgui compiles just fine.

Ooops, ok, sorry for the noise.

But, afaik, LCL-fgGUI is "under work" and far to be ready to use (in opposite of true native fpGUI).
Title: Re: We are now using GIT
Post by: PeterBB on September 03, 2021, 02:01:26 am
I noticed 37556 had gone because I'm the reporter. I guess my main concern, is that if one bug got lost in the move, how many others went missing?

The LCL-fgGUI would be closer to readiness if the patch I supplied were applied. At least it would compile!
The patch is only a few lines. I was hoping it might make 2.2.0

Cheers,
Pete
Title: Re: We are now using GIT
Post by: PascalDragon on September 03, 2021, 03:33:33 pm
I've forwarded this to the core mailing list so that the one responsible for the conversion might take a look.

Hi, do you have a link for this?
I can't see anything relevant here
https://lists.lazarus-ide.org/pipermail/lazarus/2021-August/thread.html (https://lists.lazarus-ide.org/pipermail/lazarus/2021-August/thread.html)

No, there is no link, because I posted it to the internal developer mailing list.

I noticed 37556 had gone because I'm the reporter. I guess my main concern, is that if one bug got lost in the move, how many others went missing?

Probably all that had neither FPC, nor Lazarus, nor Lazarus CCR, nor Pas2JS as their project.
Title: Re: We are now using GIT
Post by: PeterBB on September 03, 2021, 05:03:47 pm
Thanks for the explanation.

Would it make sense for me to just repeat the bug on the new system (with Lazarus as the project)


Cheers,
Pete
Title: Re: We are now using GIT
Post by: Martin_fr on September 03, 2021, 06:15:50 pm
We are looking into this.

The problem appears to be the entire "fpgui" section of mantis.
We still have the issues on backup. But currently it is not clear how many of them apply to LCL, and how many to actual fpgui itself.

Do you recall, if the patch that was attached was to be applied to Lazarus code (as is in our current repro)? Or was it for the fpgui project?
In the latter case, the issue needs to be reported against fpgui.

Title: Re: We are now using GIT
Post by: Martin_fr on September 03, 2021, 07:26:49 pm
Restored: https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/39354
Title: Re: We are now using GIT
Post by: PeterBB on September 04, 2021, 02:12:35 pm
Restored: https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/39354

Thanks Martin,

Cheers,
Pete
Title: Re: We are now using GIT
Post by: MarkMLl on September 04, 2021, 02:43:06 pm
Apropos patches and things. Svn-based Lazarus-trunk reports a revision number in the about box, what is the equivalent now that it's been gittified? Is there a way of asking the Lazarus IDE "have you received such-and-such a hash-numbered patch?"

MarkMLl
Title: Re: We are now using GIT
Post by: Martin_fr on September 04, 2021, 02:57:04 pm
From my "main" build:
Code: Text  [Select][+][-]
  1. Lazarus 2.3.0 rmain-2_3-306-gbbe0b81f62 FPC 3.2.0 x86_64-win64-win32/win64

That is "git desclibe"

306 commits since the tag main-2_3 on commit bbe0b81f62

The 306 is not always "exact". In case of branches (within main) it could be on either side. After a merge it counts both sides.

The leading "r" is a bug somewhere....
Title: Re: We are now using GIT
Post by: MarkMLl on September 04, 2021, 03:08:12 pm
OK, but it's not possible to find out from the IDE whether a particular patch etc. has been applied?

MarkMLl
Title: Re: We are now using GIT
Post by: Martin_fr on September 04, 2021, 04:28:00 pm
OK, but it's not possible to find out from the IDE whether a particular patch etc. has been applied?

No, but it wasn't before.

Say you knew a patch was applied in svn 55123 and the IDE was at 55500, then you still had to check that 55123 was on the same svn branch (fixes or trunk) as the IDE build on 55500.

Now you know the sha1 (and the branch, derived from the tag). You then have to check the git log, same as with svn.


Of course if you know the patch was applied at
   main-2_3-106-.....
And you know you current main is not on a diverged part of main, then you know if it is in or not.

Title: Re: We are now using GIT
Post by: dsiders on September 04, 2021, 08:50:38 pm
OK, but it's not possible to find out from the IDE whether a particular patch etc. has been applied?

MarkMLl

For any given git question, you'll get 100+ ways to do any given thing. Here's what I use:

There is a commit that fixes some QT issues.

Code: Bash  [Select][+][-]
  1. 52f2a8b88f Qt,Qt5: Fixed menu radio items. issue #37741

It has been applied to main, but not fixes_2_2. I use the git command lines:

Code: Bash  [Select][+][-]
  1. git  log --oneline origin/main | grep 52f2a8b88f
  2. git  log --oneline origin/fixes_2_2 | grep 52f2a8b88f

That'll show a result in main, and no result in fixes_2_2.

YMMV.

Title: Re: We are now using GIT
Post by: MarkMLl on September 04, 2021, 08:56:05 pm
That'll show a result in main, and no result in fixes_2_2.

YMMV.

But I'm not asking about the repository, I'm asking about the IDE.

MarkMLl
Title: Re: We are now using GIT
Post by: Martin_fr on September 04, 2021, 10:15:32 pm
Code: Bash  [Select][+][-]
  1. git  log --oneline origin/main | grep 52f2a8b88f
  2. git  log --oneline origin/fixes_2_2 | grep 52f2a8b88f

That'll show a result in main, and no result in fixes_2_2.

@Dsiders: While you did not put it as a question, I add some more answer anyway (not reaching 100+ though):

Code: Text  [Select][+][-]
  1.  git log -1 "main^{/issue #37741}"
  2.  git log -1 "fixes_2_2^{/issue #37741}"

or If you know its a commit in main (check with)
Code: Text  [Select][+][-]
  1.  git branch --contains 52f2a8b88f --all
Then you can search fixes (assuming there is a "cherry picked" notice
Code: Text  [Select][+][-]
  1.  git log -1 fixes_2_2^{/52f2a8b88f}

or you could check, if an unmodified merge (no conflict / same patch) exists
Code: Text  [Select][+][-]
  1. git cherry fixes_2_2   52f2a8b88f 52f2a8b88f~1
52f2a8b88f is in main, the result will either be +52f2a8b88f or -52f2a8b88f => where "-" means it is merged. ("+" still avail for merging)
But that does not work if there was a conflict, or if the merge for some other reason was modified.


Title: Re: We are now using GIT
Post by: dsiders on September 04, 2021, 10:22:34 pm
@Dsiders: While you did not put it as a question, I add some more answer anyway (not reaching 100+ though):
...
 does not work if there was a conflict, or if the merge for some other reason was modified.

Thank you @Martin_fr. I'll add some of these to my cheat sheet.
Title: Re: We are now using GIT
Post by: prof7bit on October 07, 2021, 04:28:59 pm
From my "main" build:
Code: Text  [Select][+][-]
  1. Lazarus 2.3.0 rmain-2_3-306-gbbe0b81f62 FPC 3.2.0 x86_64-win64-win32/win64

That is "git desclibe"

306 commits since the tag main-2_3 on commit bbe0b81f62

The 306 is not always "exact". In case of branches (within main) it could be on either side. After a merge it counts both sides.

If git describe is called with
Code: Pascal  [Select][+][-]
  1. --first-parent
then it will not search along merge branches.

The output of git describe is a "commit-ish", that is it can be used to specify a revision in any of the commands that expect a hash, a tag, a branch name, it can be checked out, reverted or or cherry-picked or anything else you can do with a commit.
Title: Re: We are now using GIT
Post by: prof7bit on October 07, 2021, 04:34:27 pm
That'll show a result in main, and no result in fixes_2_2.

YMMV.
But I'm not asking about the repository, I'm asking about the IDE.
For this to work the compiled IDE would need to have the entire git log compiled into it, that would currently be 61115 entries in the main branch as of today.
Title: Re: We are now using GIT
Post by: Martin_fr on October 07, 2021, 05:22:11 pm
From my "main" build:
Code: Text  [Select][+][-]
  1. Lazarus 2.3.0 rmain-2_3-306-gbbe0b81f62 FPC 3.2.0 x86_64-win64-win32/win64

That is "git desclibe"

306 commits since the tag main-2_3 on commit bbe0b81f62

The 306 is not always "exact". In case of branches (within main) it could be on either side. After a merge it counts both sides.

If git describe is called with
Code: Pascal  [Select][+][-]
  1. --first-parent
then it will not search along merge branches.

Yes, but the "306" is still not "exact" => as in: you can recompute the commit from the 306.

The 306 is in both cases "exact" as in reproducible.

If I have commits on main as follows:
Code: Text  [Select][+][-]
  1. main-2_3 => C1 => C2 => C3 => C4=> M => C5
  2.                \> M1 => M2        =^
  3.  
Then with or without first-parent:
- if I am on C2 I get: main-2_3-  2  -gC2
- if I am on M2 I get: main-2_3-  2  -gM2
In both cases, I am 2 commits after the tag.

However if I am on C5 then first-parent makes a diff
- with first-parent: main-2_3-  6  -gC5
- without first-parent: main-2_3-  8  -gC5

Both is correct, as long as you know which setting was used.



Neither contains any info if a reference to
  main-2_3-123-gxxxxx
is on the official repo,
or an un-merged branch on a fork.
Title: Re: We are now using GIT
Post by: Martin_fr on October 07, 2021, 05:29:21 pm
For this to work the compiled IDE would need to have the entire git log compiled into it, that would currently be 61115 entries in the main branch as of today.
I had to look it up the original question was
OK, but it's not possible to find out from the IDE whether a particular patch etc. has been applied?

And I said before
No, but it wasn't before.

Say you knew a patch was applied in svn 55123 and the IDE was at 55500, then you still had to check that 55123 was on the same svn branch (fixes or trunk) as the IDE build on 55500.

So the revision info in the IDE dialog has at no point in time (with the exception before the first fixes branch in svn was created) given any info about a particular fix/patch being included or not.


Mind that I have seen examples where fixes/patches were first committed to the fixes branch, and then merged to main.
While I am not aware of any "fix being forgotten to be merged to main", that could happen, and therefore even in svn, if you were on a higher revision than that of the fix, you might not have the fix at all.
Title: Re: We are now using GIT
Post by: prof7bit on October 07, 2021, 05:38:41 pm
If I have commits on main as follows:
Code: Text  [Select][+][-]
  1. main-2_3 => C1 => C2 => C3 => C4=> M => C5
  2.                \> M1 => M2        =^
  3.  
However if I am on C5 then first-parent makes a diff
- with first-parent: main-2_3-  6  -gC5
- without first-parent: main-2_3-  8  -gC5

Edit: Ignore the next sentence, I just put my glasses on and noticed the symbol that indicates the merge.

Are you sure? I would expect it to output 6 in both cases.

First parent is for constellations where a side branch was merged back INTO the current branch, for example a merge request was merged into main. In that case first-parent would ignore everything on the side branch and follow only the branch it was merged INTO, in this case the main branch.

If you place tags on strategic places you can get pretty descriptive output from git describe. And if I see this correctly then the Lazarus devs have placed tags at the beginnings of (important) branches exactly for that purpose.

In your example if you place a tag called "feature_foo" on M1 to indicate that here you branched for the new foo feature and call git describe on M2 it would print "feature_foo-1-gM2".

If you then merge it back into the upper branch and use --first-parent then it would ignore that tag, even if it is much closer than "main-2_3".

Edit2: I keep writing "label" when I really mean "tag", I don't know what causes this even after 5 years of using git.
Title: Re: We are now using GIT
Post by: Martin_fr on October 07, 2021, 06:28:10 pm
Well, yes. first parent may have some advantages.
Need to see, if that should be changed.

And in case, if all the scripts could be updated in time.
tools/installer/* contain scripts, duplicating svn2revisioninc.


TinyPortal © 2005-2018