1

A company I am working for has the following setup using subversion:

  • trunk is checked out on the production server
  • the "staging" branch is checked out on the staging server
  • the "development" branch is checked out on the development server (and tested by jenkins)
  • then we have feature branches made off of development.

The issue I've encountered is that there were a suite of related features, and the first few were each done in their own feature branch, but then to "save time" the others were done all together in an "omnibus" branch -- except that the first few features were reintegrated into development and also included in the omnibus, so now when I'm trying to reintegrate the omnibus into development, I've gotten a couple dozen tree conflicts.

The conflicts are a mix of directories and files, but all of them have this line following the "C" line from svn status local add, incoming add upon merge

I am still investigating, but so far, they seem to be conflicts in name only -- ie no difference in the content of the files. So I'm wondering if I need to do anything other than the equivalent of "mark as merged" (as it would be called in eclipse). What is the command line equivalent? Or if I should be doing something else, what would that be?

FWIW, I want the command line solution because I'm trying to produce a script that will automate feature branch merges.

Jeff
  • 2,095
  • 25
  • 18
  • if you know which revisions were merged to both the branches and the omnibus branch, then you can exclude them when doing your reintegration. I find this is usually the easiest way to avoid the conflicts involved in merging trees that have already been merged 'elsewhere'. – gbjbaanb Sep 01 '16 at 22:33
  • @gbjbaanb sure, ideally. Is there an svn command line that performs a "revisions diffs" on two branches to make knowing that information convenient? – Jeff Sep 14 '16 at 20:07

2 Answers2

0

The command I was looking for is

svn resolve --accept working *filename*

And as I said, there were no substantive conflicts, so I was able to batch it with

svn status | sed -ne '/^      C /{s/      C /svn resolve --accept working /;p}'

If you try this and your files do have conflicts within the actual content, you could end up in a world of hurt, so caveat lector!

Jeff
  • 2,095
  • 25
  • 18
0

After replying to @gbjbaanb's comment, in the interest of completeness, I did a search for "subversion list revisions two branches" and found this helpful explanation of the svn mergeinfo command How to merge branch back to main branch and avoid tree conflicts - TortoiseSVN

Community
  • 1
  • 1
Jeff
  • 2,095
  • 25
  • 18