Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2015-09

Storing projects in subversion (or git etc.)

26 messages · 8 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Mark Morgan Lloyd

Looking at some projects filed away here, I find I've been inconsistent so would appreciate it if somebody could say authoritatively: what types of file should be put in a repository, and what is regenerated reliably?

Obviously .lpi, .lpr, .lfm and .pas or .pp should be saved, and any static .inc files.

I presume that anything machine-generated and usually put into the lib directory shouldn't be stored even if it ends up elsewhere: .ppu, .o, .a, .res, .or.

What about things like .lrs and .rst?

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Michael Van Canneyt
to Mark Morgan Lloyd
Mark Morgan Lloyd wrote 12 lines
Looking at some projects filed away here, I find I've been inconsistent so would appreciate it if somebody could say authoritatively: what types of file should be put in a repository, and what is regenerated reliably? Obviously .lpi, .lpr, .lfm and .pas or .pp should be saved, and any static .inc files. I presume that anything machine-generated and usually put into the lib directory shouldn't be stored even if it ends up elsewhere: .ppu, .o, .a, .res, .or. What about things like .lrs and .rst?

.rst is also regenerated, no need to store them.

Michael.

Reply by email

Graeme Geldenhuys
to Mark Morgan Lloyd: Looking at some projects filed away here, I find I've been inconsistent so would…
Mark Morgan Lloyd wrote
What about things like .lrs and .rst?

I have the following in my .gitignore file.

*.[oa]
*.ppu
*.dcu
*.lps
*.compiled
*.bak*
*.rst
*.lrs

There is a Github project which collects all such .gitignore settings for every language you can think of. Very useful.

https://github.com/github/gitignore

Regards,
- Graeme -

fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/

Reply by email

Mark Morgan Lloyd
to Graeme Geldenhuys
Graeme Geldenhuys wrote 19 lines
On 2015-09-20 09:49, Mark Morgan Lloyd wrote: > What about things like .lrs and .rst? I have the following in my .gitignore file. *.[oa] *.ppu *.dcu *.lps *.compiled *.bak* *.rst *.lrs There is a Github project which collects all such .gitignore settings for every language you can think of. Very useful. https://github.com/github/gitignore

Although I'd point out that this is an implementation issue rather than a language one, since ISTM feasible for Lazarus to support a language other than pascal with the same form etc. structure.

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Mark Morgan Lloyd
to Michael Van Canneyt: .rst is also regenerated, no need to store them. Michael.
Michael Van Canneyt wrote 17 lines
On Sun, 20 Sep 2015, Mark Morgan Lloyd wrote: > Looking at some projects filed away here, I find I've been > inconsistent so would appreciate it if somebody could say > authoritatively: what types of file should be put in a repository, and > what is regenerated reliably? > > Obviously .lpi, .lpr, .lfm and .pas or .pp should be saved, and any > static .inc files. > > I presume that anything machine-generated and usually put into the lib > directory shouldn't be stored even if it ends up elsewhere: .ppu, .o, > .a, .res, .or. > > What about things like .lrs and .rst? .rst is also regenerated, no need to store them.

Thanks Michael, it was your comment about ResourceStrings that reminded me to ask this.

What about .lrs, since it looks as though it's generated from .lfm?

It's actually .lrs that I find I'm storing inconsistently :-)

svn ls http://svn.freepascal.org/svn/lazarus/trunk/ide | cut -d . -f 2 |sort |uniq returns

dci
fpc
ico
inc
lfm
lpi
lpr
pas
pp
rc
res
xml

i.e. specifically includes .rc and .res but not .lrs.

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Michael Van Canneyt
to Mark Morgan Lloyd
Mark Morgan Lloyd wrote 22 lines
Michael Van Canneyt wrote: > On Sun, 20 Sep 2015, Mark Morgan Lloyd wrote: > >> Looking at some projects filed away here, I find I've been inconsistent so >> would appreciate it if somebody could say authoritatively: what types of >> file should be put in a repository, and what is regenerated reliably? >> >> Obviously .lpi, .lpr, .lfm and .pas or .pp should be saved, and any static >> .inc files. >> >> I presume that anything machine-generated and usually put into the lib >> directory shouldn't be stored even if it ends up elsewhere: .ppu, .o, .a, >> .res, .or. >> >> What about things like .lrs and .rst? > > .rst is also regenerated, no need to store them. Thanks Michael, it was your comment about ResourceStrings that reminded me to ask this. What about .lrs, since it looks as though it's generated from .lfm?

It depends.

For newer lazaruses, .lrs is no longer used, since Lazarus uses the .lfm files directly for new projects.

If you have {$i something.lrs} in your sources, you'd probably better still store the .lrs in svn.

I got rid of the .lrs files a long time ago. Just a matter of replacing

{$i something.lrs}

with

{$r something.lfm}

Michael.

Reply by email

leledumbo
to Michael Van Canneyt
For newer lazaruses, .lrs is no longer used, since Lazarus uses the .lfm

files directly for new projects.

and even in older lazarus, only .lfm is used for streaming. you can regenerate .lrs simply by either compiling it with lazres or make a trivial change in the form designer.

View this message in context: http://free-pascal-lazarus.989080.n3.nabble.com/Lazarus-Storing-projects-in-subversion-or-git-etc-tp4044037p4044043.html Sent from the Free Pascal - Lazarus mailing list .

Reply by email

Mark Morgan Lloyd
to Michael Van Canneyt: It depends. For newer lazaruses, .lrs is no longer used, since Lazarus uses the .lfm…
Michael Van Canneyt wrote 43 lines
On Sun, 20 Sep 2015, Mark Morgan Lloyd wrote: > Michael Van Canneyt wrote: >> On Sun, 20 Sep 2015, Mark Morgan Lloyd wrote: >> >>> Looking at some projects filed away here, I find I've been >>> inconsistent so would appreciate it if somebody could say >>> authoritatively: what types of file should be put in a repository, >>> and what is regenerated reliably? >>> >>> Obviously .lpi, .lpr, .lfm and .pas or .pp should be saved, and any >>> static .inc files. >>> >>> I presume that anything machine-generated and usually put into the >>> lib directory shouldn't be stored even if it ends up elsewhere: >>> .ppu, .o, .a, .res, .or. >>> >>> What about things like .lrs and .rst? >> >> .rst is also regenerated, no need to store them. > > Thanks Michael, it was your comment about ResourceStrings that > reminded me to ask this. > > What about .lrs, since it looks as though it's generated from .lfm? It depends. For newer lazaruses, .lrs is no longer used, since Lazarus uses the .lfm files directly for new projects. If you have {$i something.lrs} in your sources, you'd probably better still store the .lrs in svn. I got rid of the .lrs files a long time ago. Just a matter of replacing {$i something.lrs} with {$r something.lfm} Michael.

Thanks very much, I think I did as well but I'll check. I've got one or two things that I'm trying to keep running for sufficiently-old versions of the compiler and IDE that they can generate a GTK1- or NT-compatible binary, which means carefully avoiding things like frames in the user interface.

The rationale here is not so much for local use, but because they're of potential use to a small number of niche hackers and at all costs I want to avoid giving them cause to grumble because a particular OS or compiler version is required. I'm talking about the likes of mainframe programmers here, many of whom have had sufficient time to elevate curmudgeonliness to an artform :-)

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Mark Morgan Lloyd
to leledumbo: files directly for new projects. and even in older lazarus, only .lfm is used for…
leledumbo wrote 6 lines
> For newer lazaruses, .lrs is no longer used, since Lazarus uses the .lfm files directly for new projects. and even in older lazarus, only .lfm is used for streaming. you can regenerate .lrs simply by either compiling it with lazres or make a trivial change in the form designer.

Would lazres be automatically invoked by lazarus or lazbuild is the .lsr was missing?

The trouble with making a change to the .lfm is that some very old versions of Lazarus (approx 0.9.24) can add properties that give newer ones problems, and you obviously have to be careful about getting that sort of thing into a repository. I can't give an example off the top of my head, but I'm not just talking about TNotebook which was obviously a significant glitch.

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Mattias Gaertner
to Mark Morgan Lloyd
Show quoted text 10 lines
leledumbo wrote: >> For newer lazaruses, .lrs is no longer used, since Lazarus uses the .lfm > files directly for new projects. > > and even in older lazarus, only .lfm is used for streaming. you can > regenerate .lrs simply by either compiling it with lazres or make a trivial > change in the form designer. Would lazres be automatically invoked by lazarus or lazbuild is the .lsr was missing?

No.
They share the code, so they call the same procedure. Lazarus and lazbuild auto generate the lrs files.

Mattias

Reply by email

Mark Morgan Lloyd
to Mattias Gaertner
Mattias Gaertner wrote 16 lines
On Sun, 20 Sep 2015 11:42:51 +0000 Mark Morgan Lloyd wrote: > leledumbo wrote: >>> For newer lazaruses, .lrs is no longer used, since Lazarus uses the .lfm >> files directly for new projects. >> >> and even in older lazarus, only .lfm is used for streaming. you can >> regenerate .lrs simply by either compiling it with lazres or make a trivial >> change in the form designer. > Would lazres be automatically invoked by lazarus or lazbuild is the .lsr > was missing? No. They share the code, so they call the same procedure. Lazarus and lazbuild auto generate the lrs files.

That's the important thing, and what I actually meant. So in practical terms, a .lrs is rebuilt when needed in all cases.

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Mark Morgan Lloyd
to Lukasz Sokol
Lukasz Sokol wrote 9 lines
On 20/09/15 10:14, Graeme Geldenhuys wrote: [...] > There is a Github project which collects all such .gitignore settings > for every language you can think of. Very useful. > > https://github.com/github/gitignore > No FreePascal or Lazarus entries there... ?

No, but I had visions of Graeme typing feverishly before anybody noticed ;-)

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Lukasz Sokol
to Mark Morgan Lloyd: No, but I had visions of Graeme typing feverishly before anybody noticed ;-) Mark Morgan…
Mark Morgan Lloyd wrote 13 lines
Lukasz Sokol wrote: > On 20/09/15 10:14, Graeme Geldenhuys wrote: > [...] >> There is a Github project which collects all such .gitignore settings >> for every language you can think of. Very useful. >> >> https://github.com/github/gitignore >> > > No FreePascal or Lazarus entries there... ? No, but I had visions of Graeme typing feverishly before anybody noticed ;-)

Seems there is one in gitignore/Global sub dir (as Patrick pointed out, thanks again ;) )

el es

Reply by email

Marco van de Voort
to Mark Morgan Lloyd: Looking at some projects filed away here, I find I've been inconsistent so would…
Mark Morgan Lloyd wrote 6 lines
Looking at some projects filed away here, I find I've been inconsistent so would appreciate it if somebody could say authoritatively: what types of file should be put in a repository, and what is regenerated reliably? Obviously .lpi, .lpr, .lfm and .pas or .pp should be saved, and any static .inc files.

.rc

I presume that anything machine-generated and usually put into the lib directory shouldn't be stored even if it ends up elsewhere: .ppu, .o, .a, .res, .or.

3rd party .res might need to be stored (e.g. a windows icon).

Reply by email

Mark Morgan Lloyd
to Lukasz Sokol: Seems there is one in gitignore/Global sub dir (as Patrick pointed out, thanks again ;) )…
Lukasz Sokol wrote 13 lines
On 21/09/15 09:21, Mark Morgan Lloyd wrote: > Lukasz Sokol wrote: >> On 20/09/15 10:14, Graeme Geldenhuys wrote: >> [...] >>> There is a Github project which collects all such .gitignore settings >>> for every language you can think of. Very useful. >>> >>> https://github.com/github/gitignore >>> >> No FreePascal or Lazarus entries there... ? > No, but I had visions of Graeme typing feverishly before anybody noticed ;-) > Seems there is one in gitignore/Global sub dir (as Patrick pointed out, thanks again ;) )

I wish whoever wrote that had put in a URL for the wiki page, since searching for "gitignore" doesn't seem to bring up anything useful.

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Mark Morgan Lloyd
to Marco van de Voort: .rc 3rd party .res might need to be stored (e.g. a windows icon).
Marco van de Voort wrote 9 lines
On Sun, Sep 20, 2015 at 08:49:14AM +0000, Mark Morgan Lloyd wrote: > Looking at some projects filed away here, I find I've been inconsistent > so would appreciate it if somebody could say authoritatively: what types > of file should be put in a repository, and what is regenerated reliably? > > Obviously .lpi, .lpr, .lfm and .pas or .pp should be saved, and any > static .inc files. .rc

Should that be stored in all cases or is it version-specific?

Show quoted text 5 lines
> I presume that anything machine-generated and usually put into the lib > directory shouldn't be stored even if it ends up elsewhere: .ppu, .o, > .a, .res, .or. 3rd party .res might need to be stored (e.g. a windows icon).

[Nod] although these will usually stand out since they won't have the same basename as a form or unit.

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Mark Morgan Lloyd
to Marco van de Voort
Marco van de Voort wrote 9 lines
On Mon, Sep 21, 2015 at 09:35:13AM +0000, Mark Morgan Lloyd wrote: >>> of file should be put in a repository, and what is regenerated reliably? >>> >>> Obviously .lpi, .lpr, .lfm and .pas or .pp should be saved, and any >>> static .inc files. >> .rc > Should that be stored in all cases or is it version-specific? Only the ones you made yourself. IOW the same as with .res.

Thanks, got it.

Is there a Wiki page for "collected wisdom" relating to both Subversion and Git, or would it be useful if I created one?

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email

Mattias Gaertner
to Mark Morgan Lloyd: Thanks, got it. Is there a Wiki page for "collected wisdom" relating to both Subversion…
Show quoted text 15 lines
Marco van de Voort wrote: > On Mon, Sep 21, 2015 at 09:35:13AM +0000, Mark Morgan Lloyd wrote: >>>> of file should be put in a repository, and what is regenerated reliably? >>>> >>>> Obviously .lpi, .lpr, .lfm and .pas or .pp should be saved, and any >>>> static .inc files. >>> .rc >> Should that be stored in all cases or is it version-specific? > > Only the ones you made yourself. IOW the same as with .res. Thanks, got it. Is there a Wiki page for "collected wisdom" relating to both Subversion and Git, or would it be useful if I created one?

About file types: maybe this page can be extended:

http://wiki.lazarus.freepascal.org/File_extensions

Mattias

Reply by email

Mark Morgan Lloyd
to Mattias Gaertner
Mattias Gaertner wrote 20 lines
On Tue, 22 Sep 2015 09:09:07 +0000 Mark Morgan Lloyd wrote: > Marco van de Voort wrote: >> On Mon, Sep 21, 2015 at 09:35:13AM +0000, Mark Morgan Lloyd wrote: >>>>> of file should be put in a repository, and what is regenerated reliably? >>>>> >>>>> Obviously .lpi, .lpr, .lfm and .pas or .pp should be saved, and any >>>>> static .inc files. >>>> .rc >>> Should that be stored in all cases or is it version-specific? >> Only the ones you made yourself. IOW the same as with .res. > Thanks, got it. > > Is there a Wiki page for "collected wisdom" relating to both Subversion > and Git, or would it be useful if I created one? About file types: maybe this page can be extended: http://wiki.lazarus.freepascal.org/File_extensions

Seems like a useful place to put it. Done, with redirects for gitignore and svn:ignore.

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email