Try this. I don't have access to an IBMi machine at the moment or I'd try it.

Install the AIX binaries for SVN in /QOpenSys.

Start QSH and add the path where you installed above to your path.

Use the "svn import" command to copy your source files directly from QSYS into the repository. Something like:
svn import -m "Source files from IBMi" /qsys.lib/yoursource.lib

You should get a path in the repository under "yoursourcelib" for each source file in the library. Each of those paths should have all the source files like yoursourcelib/QRPGSRC.file .Within those those paths should be all the members as individual files. The files may have .mbr extensions.

Good question if the CCSID of the files will be preserved. Good question if the date and sequence number fields will copy out or not. I think IBMi will recognize the source files are EBCDIC and translate them to ASCII for storage in SVN.

After making the repository, I'd start working with the ASCII files using RDi. Create a working directory in IFS with something like:
svn checkout /source/yoursourcelib

That command should build a working copy directory with all the source files as directories within the working copy. There should also be a .svn path in each directory.

You should be able to create a new source library from the repository with something like
svn export /qsys.lib/newsourcelib.lib

You may have to create "newsourcelib" first. The files may be created as ordinary physical files instead of source member files. Once again, the contents may or may not be translated to the appropriate CCSID.

Remember that subversion is a version control tool, not a backup tool. All the old versions are preserved and modifications are stored as diffs. When using subversion, the repository becomes your main resource and your source libraries are all copies of the repository "at" a given revision.

----- Original Message ----- From: "James Rich" <james@xxxxxxxxxxx>
To: "Midrange Systems Technical Discussion" <midrange-l@xxxxxxxxxxxx>
Sent: Monday, March 03, 2014 11:39 AM
Subject: Re: Subversion and RPG source change management

On Sat, 1 Mar 2014, Richard Schoen wrote:

Possible options:
Use the RDI development environment and iProjects. You can hook that up
to SVN, but now your core projects would have to live off the i.

Roll your own approach. Not for the faint of heart :-)

Ok. I was looking for a way to include my DDS and RPGLE code into an
existing svn repository. We use svn for everything else and the IBM i
stuff just sits sort of on its own outside the repository. It would be
nice to have all the source in one place. I'm not faint of heart, but I'm
also not convinced it is worth spending a lot of time on.

James Rich

if you want to understand why that is, there are many good books on
the design of operating systems. please pass them along to redmond
when you're done reading them :)
- Paul Davis on ardour-dev
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives

This thread ...


Return to Archive home page | Return to MIDRANGE.COM home page