1

Topic: Moving SVN trunk to GIT

I intend to move the contents of the SVN trunk to Git. Translators, contributors: is this a problem for you?

We stay on Tuxfamily.org off course.

For french guys Carl wrote a best Howto :
https://carlchenet.com/category/debuter-avec-git/

https://faq.tuxfamily.org/GIT/En

2

Re: Moving SVN trunk to GIT

+1

It's probably also a good idea to limit push access to master to only core maintainers.
People should push code to their branch and the maintainer should then review & merge said changes to master.

In any case, development will be easier in the long run.

3

Re: Moving SVN trunk to GIT

The GIT repository is now created, but empty. So I'm thinking of pushing SVN trunk history sometime next week. 
I hope so.
https://git.tuxfamily.org/qet/qet.git/

4

Re: Moving SVN trunk to GIT

Import finished.

5

Re: Moving SVN trunk to GIT

apt-get install git-cola gitk
https://download.tuxfamily.org/qet/forum_img/qtcreator_git_config_1.png
Import qet.git
https://download.tuxfamily.org/qet/forum_img/qtcreator_git_config_2.png

6

Re: Moving SVN trunk to GIT

For translators, and other contributors :

git clone ssh://Your_user_TF_login@git.tuxfamily.org/gitroot/qet/qet.git

Now you have a local GIT repository on your machine:

Translate your TS file, save it, and publish it in linguist program as you did before for SVN.

Refresh your local directory to server change before push files:

git pull

See files who have changed.

git status

Add your changes in lang/  folder :

git add -A

Commit your change :

git commit -v

It's open nano/vim etc in terminal  write commit message and save.

Push your commit to master branch

git push origin master

7

Re: Moving SVN trunk to GIT

Using GIT as an anonymous user :

git clone git://git.tuxfamily.org/gitroot/qet/qet.git qet_git

Update :

cd qet_git
git pull     # or git fetch

Found latest short head :

git rev-parse --short HEAD

95d1fca17

Count commits :

git rev-list HEAD --count

5475


Found latest short head on remote:

git ls-remote https://git.tuxfamily.org/qet/qet.git/ | head -1 | cut -c1-10

95d1fca171

8

Re: Moving SVN trunk to GIT

Petite explication sur le nouveau nommage des paquets :
GIT diffère de SVN pour les commits, j'aurai bien pu me servir de "git rev-list HEAD --count" mais ce comptage est faux (5475) il ne compte que les commits effectués avant dans l'ancien SVN trunk, alors que le SVN incrémente le compteur total même si un commit est fait dans une autre branche(5947).
Ce qui aurai eu pour effet de faire d’être vu par apt comme un downgrade sur les paquets deb si je m'en étais servi comme autrefois pour incrémenter la version.


GITCOMMIT=$(git rev-parse --short HEAD)
HEAD=$(date +%Y%m%d%H)$GITCOMMIT

Donc un paquet qelectrotech-0.70-RC2+git201907010295d1fca17-x86-win32-readytouse.7z

Veut dire version 0.7 release candidate 2 buildé le 2019 07 01 à 02H 95d1fca17 etant le commit GIT.

QElectroTech V 0.70-RC2+95d1fca17
Compilation: GCC 8.3.0 - built with Qt 5.11.3 - Date : Jul 1 2019 : 00:43:48 - run with Qt 5.11.3 using 16 thread(s)
OS : linux - x86_64 - Version : Debian GNU/Linux 10 (buster) - Kernel : 5.1.15-vanilla

9

Re: Moving SVN trunk to GIT

A/the standard way of versioning builds from git is

git describe

which yields

LAST_TAG-COMMITS_SINCE_THAT_TAG-LAST_COMMIT_HASH

10

Re: Moving SVN trunk to GIT

qelectrotech_0.70.r20190702024d79751d3-2ubuntu2.dsc: Version older than that in the archive. 0.70.r20190702024d79751d3-2ubuntu2 <= 0.70.r201907010295d1fca17-2ubuntu2


Mauvaise idée beaucoup d'outils sur les depots deb ne suivent plus reprepro, etc, je vais donc revenir sur une incrémentation des paquets basé sur le nombre de commits GIT (git rev-list HEAD --count) + ~473 .

GITCOMMIT=$(git rev-parse --short HEAD)
A=$(git rev-list HEAD --count)
HEAD=$(($A+473))

11

Re: Moving SVN trunk to GIT

The mirror repository on GitHub has been created: https://github.com/qelectrotech/qelectr … rce-mirror

It is strictly a (complete) mirror, with only one-way synchronization. This means that pull requests there will be generally ignored.
If you have something to pull from, contact an upstream maintainer with your changes in a branch of your fork/repository.

@Laurent: The sync script is already set up and I need you to add the cronjob; I don't have the rights to do so.

12

Re: Moving SVN trunk to GIT

Added, thanks Max.