Sign in Join

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

Mailing lists / lazarus / 2013-04

OT: beginner question about best way to develop

4 messages · 4 people ·

Reply by email Subscribe to this list Your subscription

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

Lubos Pintes

Hi,
I have Lazarus SVN repo. Occasionally I do svn up and then rebuild. Say I made some changes and test them. Say in ideal case, I would like to send a patch for possible inclusion. So I do
svn diff >patch.txt
However, my test patch contains files I never touched, and I don't understand why. Here it is for reference (approx. 9400 bytes) https://dl.dropbox.com/u/5629472/patch.txt
Only last 6 lines are mine. So what happened in my copy of repo? I am using cygwin on windows 7 pro 64 bit. Is it possible that it messes file dates so they look like changed?

Also, it is a good idea to make small changes and document them. I however have almost no experience with this. Could I import a copy of repo for example to git and do the commits there? And what about syncing with original SVN?
I "simply" need a basic way to track changes and possibly generate and send some patch in the future.
Many thanks for any help!

Reply by email

Graeme Geldenhuys
to Lubos Pintes
Lubos Pintes wrote
svn diff >patch.txt However, my test patch contains files I never touched, and I don't understand why.

New Lazarus revisions sometimes triggers rebuilding of translation files (the *.po files).

To fix your issue. Simply specify the exact file, in the 'svn diff' command you want to create a patch for. Unfortunately svn is a bit stupid and does all or nothing. So if you have multiple unrelated changes in a single file, they are all going to end up in the same patch. :-/

Alternatively, use the Git repository. Then you can use 'git gui' (a graphical tool included with a Git install) where you can clearly and easily see the files that changed. You can view the diffs, and can even break a lot of changes in a single file, into smaller patches (commits), by selecting the changed lines and only commit that. Then generate patch files off your local commits (with 'git format-patch origin/upstream'). The Lazarus wiki has more details on the Git mirror repositories and work-flows.

Regards,
- Graeme -

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

Reply by email

Mattias Gaertner
to Graeme Geldenhuys
Show quoted text 7 lines
On 2013-04-05 16:07, Lubos Pintes wrote: > svn diff >patch.txt > However, my test patch contains files I never touched, and I don't > understand why. New Lazarus revisions sometimes triggers rebuilding of translation files (the *.po files).

Yes. Although in this case that is not the only change (see ide/ide.pas).

Show quoted text 5 lines
To fix your issue. Simply specify the exact file, in the 'svn diff' command you want to create a patch for. Unfortunately svn is a bit stupid and does all or nothing. So if you have multiple unrelated changes in a single file, they are all going to end up in the same patch. :-/

You can specify the files with svn.

Show quoted text 8 lines
Alternatively, use the Git repository. Then you can use 'git gui' (a graphical tool included with a Git install) where you can clearly and easily see the files that changed. You can view the diffs, and can even break a lot of changes in a single file, into smaller patches (commits), by selecting the changed lines and only commit that. Then generate patch files off your local commits (with 'git format-patch origin/upstream'). The Lazarus wiki has more details on the Git mirror repositories and work-flows.

Such micro management is probably the reason for the big diff. Some developer has committed only those files he changed, but not the files that the IDE updated automatically. Then an user updates, rebuilds, the IDE automatically updates the files and the user gets the big diffs.

Mattias

Reply by email

Jesus Reyes
to Graeme Geldenhuys: New Lazarus revisions sometimes triggers rebuilding of translation files (the *.po files).

--- El vie 5-abr-13, Graeme Geldenhuys escribi?:

Show quoted text 14 lines
De: Graeme Geldenhuys On 2013-04-05 16:07, Lubos Pintes wrote: > svn diff >patch.txt > However, my test patch contains files I never touched, and I don't > understand why. New Lazarus revisions sometimes triggers rebuilding of translation files (the *.po files). To fix your issue. Simply specify the exact file, in the 'svn diff'

....

Show quoted text 6 lines
generate patch files off your local commits (with 'git format-patch origin/upstream'). The Lazarus wiki has more details on the Git mirror repositories and work-flows.

However, the translation maintainer has expressed many times before that it prefers full .po files instead of diffs.

Jesus Reyes A.

Reply by email