svn and comparing 2 files in different branches... that are not in same package

Hi guys,

I finished going through some refactoring in one branch, and I'd like to bring some of those changes to a new branch we have.  Say branch A and branch B.  The code that is changed in branch A, and branch B contains up and coming code which has also been refactored.  Doing a simple compare with branch... in subversion menus in idea makes idea look for the same class file in branch A and B and assumes same location and same package.

I keep looking through the available menus in subversion and it seems like there is a significant omission (or maybe I'm not recognizing an obvious menu name which does this)  I would like to:

Open a file in Branch A and choose a menu setting that says compare with... (and I know that's there but it doesn't do what I want) and be able to choose a file in another branch entirely even if it is in a different package.

Right now what I do is open both files in idea, so the file from Branch A is in the current project, and Branch B version is out of the project (so it shows the J with / on it), copy the contents of file in Branch B and go back to file in Branch A and choose compare with clipboard.  That's very very painful to do and incredibly time consuming.

What would be even better would be to have IDEA be smart and recognize that the file is not in the same location, but find files which are in Branch B that have the same name and suggest/ask if we'd like to compare it with that file.  Would be much much quicker.

Thanks again...  sorry it's been a while since I've been in here, so please don't take it as I only come on to gripe


1 comment
Comment actions Permalink

I may have answered my own question partially.  I tried the dreaded Integrate File... option since it provides me with the choice of picking 2 separate files.  In one case when there was a merge conflict it gave me the option to merge the changes (woot I got to pick).  This seems to work right now because at the very least the package name is different, and so IDEA/SVN will not know which one to pick so it's almost like a sure fire trigger to get the merge window.  In the case that the package is not different, there is a better than average chance that IDEA may not detect a conflict, and cause a mess by pushing everything in.  My objective is to always have the merge option come up so I can decide what to merge.  I don't see that yet, but I'll keep looking.



Please sign in to leave a comment.