Error
Unable to retrieve information for structure id "478"
Express tutorial (video)
An express tutorial has been made and is available at : https://doc.tiki.org/VideoTutorial-2743-Tiki%20and%20Git%20workflow
Git repository information
A Tiki Git repository is available at git.tiki.org and is synced with SVN repository at SF.net, so that developers can either develop using Git or SVN. The complete workflow is being implemented and is documented at Git and SVN combined workflow.
The workflow is now experimental. If you want write access to git.tiki.org, ask Marc Laporte
Setup
Here are some tips that will make life easier when changing a development environment from SVN to Git:
Git Tips
Git cache on VMs
Since Tiki integrates with external services, sometimes one VM per branch is an important setup. One possible setup to solve this is having the tiki.reference in your host and use sshfs to mount it inside your VM:
The instructions below will configure that to be automatically mounted, adjust user and directories to your local setup:
Copy to clipboard
mkdir gitcache
su -
apt install sshfs fuse autofs
modprobe fuse
echo fuse >> /etc/modules
echo '/home/lfagundes/gitcache /etc/auto.sshfs uid=1000,gid=1000,--ghost' >> /etc/auto.master
echo 'tiki.reference -fstype=fuse,rw,nodev,nonempty,noatime,allow_other,max_read=65536 :sshfs\#lfagundes@host\:/home/lfagundes/devel/tiki.reference' > /etc/auto.sshfs
exit
ln -s gitcache/tiki.reference
Development habits
The magic synchronization of SVN and Git, done by Subgit, is a complex problem. We've have observed a weird behaviour when commit order is not chronological, probably consequence of a git pull --rebase
. To keep things simpler for synchronization to work as expected, here are some tips:
- Don't use
git pull --rebase
. Instead, do a git fetch; git rebase --ignore-date
.
- Avoid git merges inside same branch. If a git pull causes a merge, abort the merge and run the fetch/rebase above.
- Better to push your changes as soon as you commit them, so you don't stack changes with same datetime when rebasing.
Legacy info
Information below concerns the Git repository at GitHub, which used to be synced with sync2git and is not working properly. Information remains here while git.tiki.org is evaluated and implemented.
Git mirror information
If you prefer to download Tiki via GIT, which might be more useful for your internal development processes, you can access that mirror here: https://github.com/tikiorg/tiki
Note: This page needs more info on how one can effectively use GIT within one's own development process
Some notes regarding setting up the upstream branch in Linux or Mac OS.
- cd into your local mfm git master clone, and make sure it's up to date with
Copy to clipboard
$ git pull
Copy to clipboard
$ git status
- to check you haven't got anything stuck in there to push (if you want to clear any changes and LOSE them do "git reset --hard origin/master")
- Then
Copy to clipboard
$ git remote add upstream https://github.com/changi67/tiki.git
$ git fetch upstream
- and it should start downloading the entire internet (actually just Tiki i think, takes a while)
- If you get any errors about SSL certificates try "git config --global http.sslVerify false" and retry the fetch upstream one.
- Then to actually do the merge do
Copy to clipboard
$ git pull upstream 12.x
To add new branches from Tiki to your local git repo do
Copy to clipboard
$ git fetch upstream
And you may need to close and reopen your IDE project to show the new branches.
Other notes
Why does the Git mirror sometimes stop updating and what to do
This should not happen now, as there is now a script to auto update the authors file to avoid this from happening. But leaving this section here until we are sure this info is no longer needed
Whenever there is a new committer to Tiki, the sync2git code will fail, as it tries to map the new committer in SVN to the GIT committer, or some other problem might be causing the issue.
First thing to do would be to check /var/log/sync2git.log, or to try running the sync2git again.
If the problem is due to new committer: You will receive an error saying that a certain committer could not be found. On the community server ovh.tiki.org, there is a file: /etc/sync2git/projects/tiki/authors.txt
Add a new line at the end of the authors.txt:
committersfaccountname = committersfaccountname <committersfaccountname@users.sf.net>
But first, make sure the name does not already exist in the file so that you are adding the right committer.
Once you added that line, save the file, and then you need to remove the lock file:
sudo rm /var/lib/sync2git/tiki/.lock
Finally, execute sync2git:
sudo sync2git
{toc structId="478" shownum="1"}
!! Express tutorial (video)
An express tutorial has been made and is available at : https://doc.tiki.org/VideoTutorial-2743-Tiki%20and%20Git%20workflow
!! Git repository information
A [https://gitlab.com/tikiwiki/tiki|Tiki Git repository] is available at git.tiki.org and is synced with SVN repository at SF.net, so that developers can either develop using Git or SVN. The complete workflow is being implemented and is documented at ((Git and SVN combined workflow)).
The workflow is now experimental. If you want write access to git.tiki.org, ask Marc Laporte
!! Setup
Here are some tips that will make life easier when changing a development environment from SVN to Git:
((Git Tips))
!!! Git cache on VMs
Since Tiki integrates with external services, sometimes one VM per branch is an important setup. One possible setup to solve this is having the tiki.reference in your host and use sshfs to mount it inside your VM:
The instructions below will configure that to be automatically mounted, adjust user and directories to your local setup:
{CODE()}
mkdir gitcache
su -
apt install sshfs fuse autofs
modprobe fuse
echo fuse >> /etc/modules
echo '/home/lfagundes/gitcache /etc/auto.sshfs uid=1000,gid=1000,--ghost' >> /etc/auto.master
echo 'tiki.reference -fstype=fuse,rw,nodev,nonempty,noatime,allow_other,max_read=65536 :sshfs\#lfagundes@host\:/home/lfagundes/devel/tiki.reference' > /etc/auto.sshfs
exit
ln -s gitcache/tiki.reference
{CODE}
!! Development habits
The magic synchronization of SVN and Git, done by Subgit, is a complex problem. We've have observed a weird behaviour when commit order is not chronological, probably consequence of a -+git pull --rebase+-. To keep things simpler for synchronization to work as expected, here are some tips:
* Don't use -+~np~git pull --rebase~/np~+-. Instead, do a __ -+~np~git fetch; git rebase --ignore-date~/np~+- __.
* Avoid git merges inside same branch. If a git pull causes a merge, abort the merge and run the fetch/rebase above.
* Better to push your changes as soon as you commit them, so you don't stack changes with same datetime when rebasing.
! Legacy info
Information below concerns the Git repository at GitHub, which used to be synced with sync2git and is not working properly. Information remains here while git.tiki.org is evaluated and implemented.
!!Git mirror information
If you prefer to download Tiki via GIT, which might be more useful for your internal development processes, you can access that mirror here: [https://github.com/tikiorg/tiki]
Note: This page needs more info on how one can effectively use GIT within one's own development process
!! Some notes regarding setting up the upstream branch in Linux or Mac OS.
* cd into your local mfm git master clone, and make sure it's up to date with
{CODE()}$ git pull{CODE}
* then
{CODE()}$ git status{CODE}
* to check you haven't got anything stuck in there to push (if you want to clear any changes and LOSE them do "git reset --hard origin/master")
* Then
{CODE()}$ git remote add upstream https://github.com/changi67/tiki.git
$ git fetch upstream{CODE}
* and it should start downloading the entire internet (actually just Tiki i think, takes a while)
*If you get any errors about SSL certificates try "git config --global http.sslVerify false" and retry the fetch upstream one.
* Then to actually do the merge do
{CODE()}$ git pull upstream 12.x{CODE}
!! To add new branches from Tiki to your local git repo do
{CODE()}$ git fetch upstream{CODE}
And you may need to close and reopen your IDE project to show the new branches.
!!Other notes
!!!Why does the Git mirror sometimes stop updating and what to do
^This should not happen now, as there is now a script to auto update the authors file to avoid this from happening. But leaving this section here until we are sure this info is no longer needed^
Whenever there is a new committer to Tiki, the sync2git code will fail, as it tries to map the new committer in SVN to the GIT committer, or some other problem might be causing the issue.
First thing to do would be to check /var/log/sync2git.log, or to try running the sync2git again.
If the problem is due to new committer: You will receive an error saying that a certain committer could not be found. On the community server ovh.tiki.org, there is a file: /etc/sync2git/projects/tiki/authors.txt
Add a new line at the end of the authors.txt:
committersfaccountname = committersfaccountname <committersfaccountname@users.sf.net>
But first, make sure the name does not already exist in the file so that you are adding the right committer.
Once you added that line, save the file, and then you need to remove the lock file:
sudo rm /var/lib/sync2git/tiki/.lock
Finally, execute sync2git:
sudo sync2git