How do I use SVN in a group project?

Get help using Construct 2

Post » Sat Oct 06, 2012 3:26 pm

We already have an SVN server and we saved our project as a project and not a single file.

But how can we merge 2 different changes that 2 different level designers have made?

Me and my friend did a test. I made a sprite with a blue dot and he made a sprite with a red dot.
Then I did a SVN Commit and it seemed to work okay. And then he did as well but the revision count did not go up when he commited(uploaded his changes).
So now his red dot does not appear.

Are we supposed to use something else then commit? Or is this not possible at all?
B
4
G
3
Posts: 39
Reputation: 1,003

Post » Sat Oct 06, 2012 3:49 pm

You should update before committing. Then SVN will receive everyone else's changes, merge them, and then allow you to commit a project including all the changes. If someone else commits, you then need to update yourself again to receive their changes and merge it in to your own local working copy. BTW I highly recommend using TortoiseSVN on Windows, it's a really nice point-and-click GUI which makes it all really easy.Ashley2012-10-06 15:49:26
Scirra Founder
B
359
S
214
G
72
Posts: 22,951
Reputation: 178,578

Post » Sat Oct 06, 2012 3:50 pm

Thanks a lot for the reply!
I just thought that updating before commiting would overwrite the changes I had made.
B
4
G
3
Posts: 39
Reputation: 1,003

Post » Sat Oct 06, 2012 3:54 pm

Updating should actually merge everything together. SVN never just steamrollers your work - if someone changes the same thing you changed, it will mark it as a conflict and ask you to manually determine what to use. However as long as you don't work on the same parts of the project at the same time, conflicts should be rare and everything should just merge silently.
Scirra Founder
B
359
S
214
G
72
Posts: 22,951
Reputation: 178,578

Post » Sat Oct 06, 2012 3:55 pm

I'm testing it
B
4
G
3
Posts: 39
Reputation: 1,003

Post » Sat Oct 06, 2012 4:04 pm

Alright we both created 2 sprites to test it. He saved his changes and commited them.
I saved my changes and I updated before I commited and it said that the .caproj file was in a conflicted state and it finished the update anyways.

I shrugged it off and did a commit and it gave me this:
[code]
Command: Commit
: E:\Workshop\rpg\Layouts\Layout 1.xml
Error: Commit failed (details follow):
Error: Aborting commit: 'E:\Workshop\rpg\Layouts\Layout 1.xml' remains in conflict
Completed!:   
[/code]
B
4
G
3
Posts: 39
Reputation: 1,003

Post » Sat Oct 06, 2012 4:06 pm

The commit hasn't worked, you need to resolve the conflict. Something like TortoiseSVN will make it an awful lot easier to do that, otherwise you have to go digging around in strangely formatted text files.
Scirra Founder
B
359
S
214
G
72
Posts: 22,951
Reputation: 178,578

Post » Sat Oct 06, 2012 4:08 pm

And how do you resolve conflicts exactly? Do you rename something? Is there some feature in Tortoise that does it for you maybe?

EDIT: Oh and we have been using tortoise in case you didn't know.Wheeze2012012-10-06 16:10:11
B
4
G
3
Posts: 39
Reputation: 1,003

Post » Sat Oct 06, 2012 4:11 pm

TortoiseSVN integrates with Windows Explorer, just browse to the file, right-click it and there should be an option like 'resolve conflicts'. Try to avoid working on the same layout/event sheet, and always update before you commit - that will help avoid conflicts.
Scirra Founder
B
359
S
214
G
72
Posts: 22,951
Reputation: 178,578

Post » Sat Oct 06, 2012 4:15 pm

Alright that seemed to work! Thanks a lot for the help :D Real friendly community indeed.
B
4
G
3
Posts: 39
Reputation: 1,003

Next

Return to How do I....?

Who is online

Users browsing this forum: No registered users and 20 guests