Domanda

Sorry if this isn't a valid question (I hope I'm right that it is).

The project I'm working on, using SVN, is comprised of two "branches". The trunk is where most of the development is done, and there's the "Publish" branch which is where final versions are published from.

The idea is that while I make changes on the trunk and test them, these changes are only merged into the branch and published when I'm confident that most/all bugs have been found. However, the branch will never be exactly the same as the trunk. This is because it uses different connection strings, different icons etc.

As a result, every time I merge new revisions from the trunk into the branch, the svn:mergeinfo property keeps growing bigger. Right now its value is "/trunk:2216-2225,2231-2234,2239,2246-2247,2253,2255,2259-2268,2271". As the project continues, merged revision numbers will keep getting appended into it.

Note: This is the only svn:merginfo property that exists, and is there at the root of the branch.

So my question is whether I need this (eventually huge) value to stay there or if I can just delete it.

Edited to clarify: The branch will never be merged back into the trunk. Only trunk-to-branch merges will ever be done. The reason the branch exists is so that the latest published version is always available, but a tag wouldn't do the job because of the necessary changes from the trunk.

I've seen similar questions asked but they all seemed to be about projects where an updated branch is identical to the trunk at the time of the latest merge or where several svn:merginfo properties exist, so I'm not sure the same answers apply here.

Thank you.

È stato utile?

Soluzione

The mergeinfo is there so SVN can remember which revisions have been mertged already. So if you merge trunk -> branch without explicitly specifying any revisions to merge, it will merge all the ones that hav not yet been merged.

If you always explicitly "cherry pick" which revisions to merge, then this is not going to be of any use to you and you can delete the mergeinfo (though I usually manually elide it by changing it to read "1-2271" which keeps the mergeinfo in case you do need it, whist cutting down on the parsing it needs to do.

Generally though, you might as well keep it around, it doesn't hurt to have it.

PS in SVN parlance, a 'tag' is a branch, just named differently to indicate its purpose. Branches are known as short-lived for development that will be merged to trunk. Tags are long-lived, but under the covers, they're the same thing.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top