Welcome, Guest
Username: Password: Remember me
General discussions, feature requests for CodeTyphon Project and discussions that don't fit in any of the other specific CodeTyphon forum categories.
  • Page:
  • 1

TOPIC:

Lazarus SVN Pkg - Setup and Usage 11 years 9 months ago #3157

  • Kevin Black
  • Kevin Black's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 22
  • Thank you received: 0
Hi,

I have SVN installed under Tools in Lazarus. I do not profess to be an SVN expert and I am having issues understanding how this works (I cannot find any documentation and am wasting time guessing how this might happen).

Ideally what I want is to have the repository on a (remote) server so a geographically dispersed team can access it. Once the files are checked out, I want team members to be able to work locally on their 'bits' and, when finished, check them back in (commit). I want others who try to check out a unit/form to be informed it is already checked out by FRED etc etc. Not very sophisticated, but I just cannot seem to see how the whole SVN package works within Lazarus

Assumptions (which may be wrong):

1. Need an SVN server running on the (remote) server
2. Need to have created a repository and populated it with the project

The SVN tool only has Upload and Commit as commands:

1. How do I do the Checkout?
2. How do I Add additional files

Are these activities done outside Lazarus?

In the Tools>SVN>Settings:

1. Is the project file name just the file name in the SVN repository?
2. OR the location and file name of the project file on my LOCAL system?
3. Is the repository path the path of the project folder on the (Remote) server where SVN Server is running?

Like I said I am no SVN guru. What I need is the idiot's guide to setting up an SVN project within Lazarus and the idiot's guide on how to use it thereafter.

Does such documentation exist, if not, can anyone shed any light.

Thanks,
Kevin

Please Log in or Create an account to join the conversation.

Lazarus SVN Pkg - Setup and Usage 11 years 9 months ago #3158

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Offline
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4535
  • Thank you received: 1114
Sir
my suggestion is to start from here

but, Lazarus and FPC SVN "trunk" have problems here

SVN web view of FPC here and
SVN web view of lazarus here

have fun...
PilotLogic Architect and Core Programmer

Please Log in or Create an account to join the conversation.

Last edit: by Sternas Stefanos.

Lazarus SVN Pkg - Setup and Usage 11 years 9 months ago #3168

  • Kevin Black
  • Kevin Black's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 22
  • Thank you received: 0
Sternas,

Thank you (although I'm not quite sure what you were getting at).

Regardless, the SVN package in Lazarus is very buggy (yes I know it's alpha), and is really unworkable.

We are using Syncro SVN to see how that works. Although it is done manually, it is about the best fit we have (I assume you could use Tortoise SVN or any of the other SVN clients).

After Setting up the repository on the remote server (VPN and mounted network Drive) and your working directory on your local machine here's the protocol we are adopting (which may get some tweaking, but it appears to work). Not trying to insult the intelligence of those who have been doing this for years, but it might be useful to someone trying to work out how to use Version Control with Lazarus:

Note: Because you will usually be working on a form (*.lfm) file and the associated code (*.pas) file you need to ensure that you lock/unlock/add/commit the two corresponding files NOT JUST the *.pas file. Remember to Refresh the view in (Your SVN Client) SVN since your local version may not always represent the state of the repository on the remote server. The overarching rules are:

1. Do not edit anything without first checking to see if it is locked and then placing your lock on it
2. When finished (or if you are not going to use the files for a while) if unedited the simply unlock, else Commit the files back to the repository
3. Remember that each *.pas file will (usually) have a *.lfm file, perform the SVN operations on both

Managing files using (Your SVN Client) SVN:

Existing files

1. Determine which file(s) (*.pas and corresponding *.lfm) you want to EDIT
2. Do a LOCK CHECK using Synco SVN
3. If LOCKED then END (you can see who has it locked and negotiate its release)
4. If NOT LOCKED place a LOCK on the *.pas and corresponding *.lfm files
5. EDIT as required using Lazarus
6. When finished editing (or when a substantial edit has been done):
. COMMIT the files
. If finished with the file then REMOVE the LOCKS
. Else continue EDITING

Adding New Files

1. CREATE the file (unit etc) in Lazarus
2. This will create a *.pas and *.lfm file in Working Directory
3. EDIT as required using Lazarus
4. When finished exit Lazarus and In Syncro SVN:
. Right Click *.pas file and ADD the File to version control
. Right Click *.lfm file and ADD the File to version control
. COMMIT the *.pas file
. COMMIT the *.lfm file
5. The files can now be edited as in Existing Files above

Cheers,
Kevin

Please Log in or Create an account to join the conversation.

Last edit: by Kevin Black.
  • Page:
  • 1