Wednesday, September 21, 2016

SE475 - Branching, Merging, and Refactoring (Submit 9 - 16)

What's up everybody!

So I finally finished Homework 2, and learned how to branch and merge in Perforce. Also, refactored SeLinkList to be a double linked list.

Branching 

I really thought I'd screw this part up, and I almost did! Turns out it was a lot simpler than it looks, all I had to do was right-click the folder with the project, click branch, and in the branch window, type the folder target name  HW2_DL(.../student/agarcin/HW2_DL/...). After seeing the preview of the branching, and several tries later to not get errors, I finally was able to create the branch, and start coding in that branch.

Merging nightmares

I admit, the title is very exaggerated but merging can be a pain if not done properly. when merging the branch to the main codeline, it nearly went as smooth as I wanted but there was my first conflict in main.cs. Fortunately I previewed the merge first and then noticed that there was only 1 conflicting file. I used the Merge tool window(?) and started resolving each file, one by one and making sure there we're no further conflicts. Since main.cs was going to be refactored, I kept the original file and then just refactored it as asked in the Submit 16.

Well, that was fun! branching can e very helpful when you want to try out some new code you just thought about, without ruining the main code.

I'll keep you posted, but until then, back to work!

No comments:

Post a Comment