Android Studio – unable to merge from SVN branch

Phew, haven’t used SVN in a while… 🙂

But from what I can remember Branch locations should be the folder containing your branches folders (and not each individual branch folder).

You see, typically a SVN repo follows a standard naming convention and folder structure:

trunk/
branches/
  Feature_A2/
  Feature_A3/
tags/
  v1.01/
  v1.02/

and so on...

trunk is where the main development takes place, and branches are for features, long-term or risky projects, or for different stages (such as QA and pre-prod).

So, as far as I remember, Android Studio expects you to set Branch locations to branches folder. In your case I think it should be http://192.168.0.64/svn/.../Android/Feature.

Also, your trunk is not Feature_A2 – Feature_A2 is just another branch.
Although I can’t see the content, I think http://192.168.0.64/svn/.../Android/Development might be your trunk.

Which shouldn’t bother you much, since you don’t have to merge to your trunk, you can also merge between branches (e.g. merge Feature_A3 into Feature_A2).

So, to recap:

  1. Although not mandatory, I recommend renaming your folders to match the conventions (you can easily do it by right clicking in Tortoise SVN, but only AFTER all teammates commit, otherwise merge will be a HELL for them).
  2. Try setting Branch locations to http://192.168.0.64/svn/.../Android/Feature
  3. And Trunk to http://192.168.0.64/svn/.../Android/Development (only if it indeed contains sources, similar to Feature_A2/3)
  4. Consider “tagging” your releases in a tags folder (it’s pretty much just copying the trunk/branch folder to tags, but you have a command for that).

    If you do so, you can also add tags folder to Branch locations, that way you’ll be able to compare your current source with any previous release (which is handy).

P.S: "unresolved conflicts" error can also mean you have unresolved conflicts (duh :)). Conflicts are are usually created when both you and a teammate change the same lines in file (or if he deletes a file you changed) and you update to get his changes.

SVN won’t let you merge until you manually resolve these conflicts/changes.

You can find conflicts in the Version Control tab at the bottom, they’ll be mark in red.
(But I don’t think that was the problem in your case)

Let me know if that works for you!

Leave a Comment