gdat issueshttps://gitlab.epfl.ch/spc/gdat/-/issues2019-07-19T07:43:48Zhttps://gitlab.epfl.ch/spc/gdat/-/issues/1Check git repo creation with or without tags2019-07-19T07:43:48ZFederico FeliciCheck git repo creation with or without tagsDiscussion on how to move SPC TCV toolboxes to GIT.
Commands used: (also documented on [SPC wiki](https://spcwiki.epfl.ch/wiki/GIT)) when final commands are defined..
Inspired from this [git manual](https://git-scm.com/book/en/v2/Git-a...Discussion on how to move SPC TCV toolboxes to GIT.
Commands used: (also documented on [SPC wiki](https://spcwiki.epfl.ch/wiki/GIT)) when final commands are defined..
Inspired from this [git manual](https://git-scm.com/book/en/v2/Git-and-Other-Systems-Migrating-to-Git)
and from [here](https://gist.github.com/epicserve/1219858/9f30d5ffca7d6b6e4130c4b9b300b8167c868a5f) and [here](http://john.albin.net/git/convert-subversion-to-git)
```
# Generate empty Authors table
svn log -q https://spcsvn.epfl.ch/repos/TCV/gdat | \
awk -F '|' '/^r/ {sub("^ ", "", $2); sub(" $", "", $2); \
print $2" = "$2" <"$2">"}' | sort -u > authors.txt
# Then fill in the authors table e.g. username = FirstName LastName <name.lastname@bla.com>
# Clone from SVN with separate branches and tags, ignoring matlast
git svn clone --trunk /gdat/trunk --branches /gdat/branches/* --tags=/gdat/tags/* --ignore-refs=.*matlast \
https://spcsvn.epfl.ch/repos/TCV --authors-file=authors.txt gdat
# inspect all the branches (incl remote)
git branch -av
# turn tag branches into real git tags and remove branches (may need to play with cut -f argument)
git for-each-ref --format='%(refname)' refs/remotes/origin/tags/ | cut -d / -f 5 |
while read ref; do
git tag "$ref" "refs/remotes/origin/tags/$ref" && git branch -D -r "origin/tags/$ref";
done
# inspect the result
git tag
# Create local branches from remote branches and delete remote branches
# (may need to play with cut -f argument).
# This is necessary since git-svn stores remote branches in a non-default way
# to keep backwards compatibility with the svn repository (which we don't want).
git for-each-ref --format='%(refname)' refs/remotes/origin/ | cut -d / -f 4 |
while read ref;
do
git branch "$ref" "refs/remotes/origin/$ref" && git branch -D -r "origin/$ref";
done;
# inspect the result
git branch -av
# remove trunk branch (identical to master)
git branch -d trunk
# test pushing to a local git repo
git init --bare ~/test-bare.git
git remote add bare ~/test-bare
git push --all bare
git push --tags bare
#then clone a new repo from bare and inspect the result
cd ..
git clone ~/test-bare test
# Go back to the original repo and inspect its size.
du -d1 -h
# If it is unreasonably large (more than a few 10MB typically means it's too large)
# then clean it using tools like [BFG](https://rtyley.github.io/bfg-repo-cleaner/)
# finally (in original extraction repo)
git remote add origin <remote (gitlab) repository url>
git push --all origin
git push --tags origingdat migration to gitlabJoan DeckerJoan Deckerhttps://gitlab.epfl.ch/spc/gdat/-/issues/2Push git repo to gitlab2019-07-19T07:29:23ZFederico FeliciPush git repo to gitlab```
cd existing_repo
git remote rename origin old-origin
git remote add origin git@gitlab.epfl.ch:spc/tcv/tbx/gdat.git
git push -u origin --all
git push -u origin --tags
``````
cd existing_repo
git remote rename origin old-origin
git remote add origin git@gitlab.epfl.ch:spc/tcv/tbx/gdat.git
git push -u origin --all
git push -u origin --tags
```gdat migration to gitlabJoan DeckerJoan Deckerhttps://gitlab.epfl.ch/spc/gdat/-/issues/3Setup automated testing2019-07-19T07:29:09ZFederico FeliciSetup automated testinggdat migration to gitlabFederico FeliciFederico Felicihttps://gitlab.epfl.ch/spc/gdat/-/issues/4Set gdat SVN to read-only2019-08-19T09:00:09ZFederico FeliciSet gdat SVN to read-onlygdat migration to gitlabAntoine MerleAntoine Merlehttps://gitlab.epfl.ch/spc/gdat/-/issues/9Set up tag-based deployment for gdat2019-08-15T10:01:21ZFederico FeliciSet up tag-based deployment for gdatgdat migration to gitlabFederico FeliciFederico Felici