Merging a set of files from one branch to another in Subversion

0

I want to do something which I think should be straightforward. I've been searching and experimenting for hours, and can't seem to find the answer.

I'm using Subversion 1.7 for a project, mainly through Subclipse but also TortoiseSVN, dropping down to svn command line when necessary.

As recommended, every time I do a production release, I create a tag. To do a prod patch, I create a new release branch from the prod tag, do the work, then release from the branch, which creates a new tag (from the branch).

Different problems require different prod patch strategies. The one which is confusing me is where the change is made to the trunk, is confined to a set of files, and those files can basically be "copied" directly into the prod environment. If I understand correctly, this is a merge from the trunk to the release branch.

I had to do this the other day. The relevant files were scattered across the directory structure (basically, changes to html, css and js files). I wanted to "multi-select" (or tag or whatever) the relevant files, and perform one merge command.

I can't figure out how to do it.

The svn manual discusses cherrypicking, which is basically what I'm trying to do, but they're talking about cherrypicking revision ranges and/or changesets, not the trunk-heads of a set of files which are orthogonal to changesets, AFAICT.

Changelists looked promising too, but changelists are not a valid option for the merge command. It also does not seem to be implemented in Subclipse or TortoiseSVN, which would be ideal for visually identifying the set of files.

The Subclipse merge screen shows an option for a "change-set based merge" which got my hopes up but then sends you to a screen trying to sell you CollabNet TeamForge and CollabNet Desktop, which appear to be commercial products.

I ended up merging each file individually, which (IMO) is painful and error prone, and makes reverting problematic.

In addition, when something like this happens, it is often a clue that there's something fundamental about svn that I'm misunderstanding.

Can someone either explain how to merge an arbitrary set of files, or enlighten me as to why this isn't supported?

Roger Kaplan

Posted 2019-05-03T14:40:00.197

Reputation: 1

No answers