Comment collaborer sur des projets avec SVN

1

Index

Taggé

Statistiques

6,984 visites, 13,500 vues

Outils

Partager

License

This tutorial is licensed under CC BY 4.0. Please refer to the license text if you wish to reuse, share or remix the content contained within this tutorial.

Published on 2 Jul, 2018. Last updated 25 Feb, 2019

Some useful tools

The right-click TortoiseSVN menu in Windows Explorer provides lots of handy tools. You should refer to the TortoiseSVN documentation for a complete reference. However, here are some of our favourites:

Right-click an individual changed file and choose TortoiseSVN -> Diff. You can easily see what you've changed but not committed yet.

Right-click an individual changed file and choose TortoiseSVN -> Show log. You can see a historical log of all changes on that file, who made them, what the commit message was, and the diff to highlight the changes made in each commit. Do this on the root folder and you can see a log for the entire project.

TortoiseSVN -> Update to revision on the root folder allows you to roll back the entire project to a previous version, by its revision number.

TortoiseSVN -> Revert will undo your changes since the last update. Warning: your work will be lost, so use with care! However it can be useful to do something like try a crazy experiment, and if it doesn't work, instantly undo everything you changed and go back to where you were before.

TortoiseSVN -> Blame shows the file with each line annotated with the name of the person who last changed it, and the revision number each particular line was last changed. As the name suggests, if someone did something like set a project property to the wrong value, you can find out who to blame!

Branching and tagging are additional useful features, but outside the scope of this tutorial. Refer to TortoiseSVN documentation for more information on these and other features. The TortoiseSVN help is comprehensive and has a great 'Daily Use Guide'.

Some Construct 2 specific quirks

Construct 2 assigns UIDs to objects in the editor. These are saved in the layout XML files for each instance. Construct 2 will assign a newly placed instance the lowest unused UID. This means if two clients who both place a new instance then merge their projects, it's possible the XML file uses the same UID for two objects. Luckily Construct 2 handles this gracefully: if it reads a project which specifies two objects with the same UID, it will simply assign one of the objects a different UID. This will show up next time you commit - you might notice an object you didn't think you modified got a new UID, but it's just Construct 2 making sure that it really is a unique ID!

Several project elements get assigned a SID. This is used internally by Construct 2 to be able to refer to things independently of their name. Note Construct 2 used an incrementing-number scheme for assigning SIDs until r126. This doesn't play well with source control, since similarly to the above problem, it's possible to end up with two things having the same SID after merging. Having two things with the same SID will cause problems and Construct 2 doesn't reassign SIDs that it sees are already used. To solve this, r127+ assign SIDs based on 16-digit random numbers, which should allow projects to be merged without ever duplicating a SID.

Conclusion

Source control software tools like TortoiseSVN are mature and advanced tools for effectively collaborating on a project. They are widespread in traditional software development, but source control tools are general-purpose enough that teams using Construct 2 can take advantage of them as well. Since these tools are so well-established and thorough, there should be little need for any specific collaboration features in Construct 2.

Source control is widely regarded as mandatory for any kind of professional development. Merging by hand is so slow, difficult and error-prone that it is well worth your time to learn source-control tools, even if it seems difficult at first. It's even handy for individual developers for all the additional tools it provides. If you're working in a team, get everyone on source control, and I'm sure before long you'll wonder how you got by without it!

  • 0 Comments

Want to leave a comment? Login or Register an account!