[fpc-pascal] How to get fpc and lazarus sources when svn has shut down?

wkitty42 at windstream.net wkitty42 at windstream.net
Thu Aug 12 12:12:33 CEST 2021

On 8/11/21 4:22 PM, Michael Van Canneyt via fpc-pascal wrote:
> On Wed, 11 Aug 2021, Bo Berglund via fpc-pascal wrote:
>> echo "Downloading version $FPCVER of FPC"
>> cd "$FPCDIR"
>> svn co https://svn.freepascal.org/svn/fpc/tags/$FPCTAG/ $FPCVER
> # Get sources
> git clone https://gitlab.com/freepascal.org/fpc/source.git  $FPCVER
> # switch to branch/tag
> cd $FPCVER
> git checkout $FPCTAG
> cd ..

FWIW: remember that "clone" is _only for the first time_, too... after that you 
would "fetch" and/or "pull" to bring in the changes...

to clarify:
"fetch" tells your local git to retrieve the latest meta-data info from the 
original repo but it doesn’t do any file transfers...

"pull" tells your local git to retrieve the latest meta-data info and to also do 
the actual transfers and apply them to your clone...

i use a bash script that contains the following routine which does the main work 
of *updating* my local repos... selection of the repo and changing into its 
directory are done outside this fairly generic routine...

----->8 snip 8<-----
function _gitUpdate(){
   if [ "$DOWNLOAD" != "y" ]; then

   local branch="$1"
   set +e
   git diff --exit-code 2>&1 > /dev/null
   if [[ $? != 1 ]]; then
     set -e
     git fetch origin
     git checkout --force "$branch"
     git pull --rebase
     set -e
     git fetch origin
     git stash save --include-untracked --quiet
     git checkout --force "$branch"
     git pull --rebase
     git stash pop --quiet
----->8 snip 8<-----

this routine checks if there have been upstream updates... if you have any local 
changes, they will be stashed first, then the upstream updates will be pulled 
after which your stash will be applied so your local changes are available... if 
you have no local changes, then no stashing and popping are involved...

if there is a conflict when popping, it requires fairly standard conflict 
resolution and cleanup... i'll leave that to the reader to follow up and 

hopefully this helps and doesn't add to the confusion...

  NOTE: No off-list assistance is given without prior approval.
        *Please keep mailing list traffic on the list where it belongs!*

More information about the fpc-pascal mailing list