When working with text files such as source code, the “copy-modify-merge” workflow method is preferable to the “lock-modify-unlock” method because it allows for two users to work on the same file simultaneously as long as their edits do not conflict with each other.
In Assembla Subversion repositories, you can review changes made in branches, and then merge them back into the trunk or any SVN directory using a merge request.
NOTE: It is important to remember that the branch/merge method does not work with unmergeable files such as binary files. For binary files, the recommended method to avoid conflicts in changes is to use file locks.
Adding a new merge request in your SVN repository
To add a new merge request, simply go to the Merge Requests sub-tab of your desired SVN repository, and then select New Merge Request to the right of the screen.
From there, select the source branch from the From dropdown menu. Select the target branch under To. Use the green circle between the From and To sections to reverse the selections.
A title for the merge request is generated automatically from the title of the first commit on that branch. You can change the title before proceeding. It is generally best practice limit merge request titles to under 100 characters and make them as descriptive as possible for easy reference later.
Additionally, in the description for the merge request, you can reference tickets with the same syntax used to reference tickets in commits (re: #ticket_number).
Pro Tip: If you've already associated tickets with commits in the merge request, they are automatically associated with the respective merge request.
If you want to delete the source branch after the merge request is either merged or ignored, simply check the box under the merge request's title. Also, if you want to squash the commits into a single merge, check the appropriate box.
The commits and affected files on the source branch appear at the bottom of the window and the Affected tickets section on the right displays a list of the tickets referenced in the commits to that branch.
Once the target and source branches are selected, click Create Merge Request to finish creating your request.
From there, you can request teammates to review your changes, communicate about any changes that need to be made, and ultimately merge you work once your team approves.
Understanding merge request options
Once you create your merge request, you can find it in the Merge Requests sub-tab. To access it, simply click it. In your merge request page, you’ll see the following options:
Upvote or downvote a merge request. After each revision, you can upvote a merge request or downvote it.
Merge and Close button. If everything is correct, you can merge the changes and close the request with one button.
Ignore button. If a merge request was created by accident or if it’s irrelevant you ignore it.
New version. If there is a new commit on the branch, a new version of the merge request is automatically created.
Using inline comments
You can add inline comments by clicking on the green icon on each line of code. To view files, click the Files tab, and then click the down arrow to view the differences.
You can find inline comments in the following locations:
Files sub-tab where it was submitted.
Comments sub-tab enabled from the Tool Settings page.
The inline comments have a direct link which redirects you to the affected file and opens the inline comment automatically.
Each inline comment includes a reply button where you can easily respond to someone and it sends a mention to that person.
Marking comments resolved
Once you pushed the changes requested by a reviewer, simply click the comment in the merge request interface to mark it "resolved." This provides a handy indicator of the status of the changes implicated by their comment.
See also Assembla Merge Requests.
Have questions? Email us at support@assembla.com