[fpc-pascal] Extended SVN class available
Reinier Olislagers
reinierolislagers at gmail.com
Wed Mar 28 09:22:59 CEST 2012
Working on fpcup, Ludo Brands and I extended the fppkg SvnCommand unit.
Functionality:
- detects svn clients automatically (even a few well-known if not in
path on Windows); client path can be specified by user, too.
- checkout, update commands; default HEAD, but you can specify a desired
revision
- lets you perform a checkoutorupdate command: updates a directory if
possible, otherwise checks out (with HEAD/desired revision)
- detects when you're trying to update an existing SVN repo with the
wrong remote URL
- detects when you're using an SVN client version that's too old to work
with the remote server
- get diffs for any local changes (including subdirectories)
- revert command
- command to get commit log
- command to get local revision
The code can be found in fpcup (e.g.
https://bitbucket.org/reiniero/fpcup/src; you can also checkout with hg
or download an archive with all files) in svnclient.pas and I hope it
can be useful for others as well.
It uses an extended TProcess unit, but used to be based on regular
TProcess and should be adaptable quite quickly, if necessary.
Comments, improvement ideas of course very welcome as well.
Thanks,
Reinier
More information about the fpc-pascal
mailing list