Description of the problem:
I manually edited an experiment in gitlab. I need to change the JS in a few places in order to accomplish some specific things. After editing, I realized there were some things in my experiment that needed to be changed. So in psychopy I went and changed them, and pushed the changes assuming they would overwrite the JS edit I did. It seems that although in Gitlab the files were overwritten as expected, when I go to pilot or run the experiment it will only run the version that had the JS changes. Any ideas as to why this is and what I can do to solve it?
I have tried changing the status of the experiment and have certainly double checked that the files being pushed have synced.
Thanks in advance for your help,
I could probably fix the issue by starting over and saving the project elsewhere and thus creating a new repository, however I will need to make these JS edits again for when I publish the experiment. If I need to tweak anything down the road, then I wouldn’t want to create a new repo every time.
Regarding the first confusion, when you did the sync that pushed the local changes it should have merged the edits rather than overwrite them unless you make an additional edit to the same lines (eg. an incompatible edit to the same component of the experiment). The way this works on a technical level (in git terms) is that it:
- git commit: creates a “commit” that tracks your local changes
- git pull: then fetches the changes on the server and attempts to merge those locally
- git push: then pushes those merged changes to the server
Regarding the issue of why these aren’t reflected in the running experiment, it’s hard to know exactly what happened. If a merge conflict arises somewhere (because of conflicting changes to the same file) then Pavlovia currently sticks with what it has but I’m not clear why a merge conflict would have arisen.
I think you might resolve the issue on Pavlovia side by making the study INACTIVE and then RUNNING again.
Thank you for your reply Jon.
I had tried to make the study inactive and then running yesterday and although that did not solve the issue yesterday, it seems to have fixed itself today.
I will note that my manual git code was overwritten (however that is okay with me). I am going to make the manual edits again and if I have to change anything in psychopy I will see whether the code gets merged like you described or overwritten. When that happens I will post here for you or other psychopy user’s references.
Actually just tested it and it worked okay. Thank you