开发者

SVN: Vendor branches + patching + history?

We have a rather large library that we need to periodically import (and then patch) to our code base.

The SVN Book seems to reccomend a "vendor branch" scheme where we keep our patched version of the "vendor drops". 开发者_运维知识库This would work, except that the vendor also uses SVN and gives us read access to their reop.

It would be great to have access to history of the vendor files when we need to update our patches.

So my question is:

Is there a way to have a patched "vendor branch" that also somehow keeps access to the history for the vendor files?

(I've seen mention of svn:external folders, but I'm not sure I really understand the full ramifications in terms of pegging a revision, nor how exactly we would maintain our own patches against that.)

What is the correct route to take here? (FWIW, the vendor releases once a month. We intend to pull updates about once/twice a year.)

Thanks


Okay, here's the rub, you want the vendor's source along with history, but you also apply your patch to the vendor's source. Getting their source with history is easy. Getting their source with history and then applying your patches and continually do this, that is tough.

Now assuming you don't place the vendor's source directory into your source (meaning you build the two projects separately), you have couple of options if you keep the two source in separate repositories.

If you wanted the vendors source along with history, you can set up an svnsync to the vendors repository and pull their changes on a regular interval. Svnsync is a wonderfull way to get something remotely as a local copy with a complete set of history. But the one caveat to svnsync is that is the repository becomes read-only. So you cannot apply the patch to their source.

Now, since you do this only once or twice a year, you could go through the process of pulling down a new copy of their repository using svnsync. Break the sync and make your copy of the vendor's repo writable and then apply your patches.

The other option would be have the vendor do a dump of their repo and send it to you. Then you would load that dump into your own repository and make read/write.

With either option, you'll have to reapply your patches to your copy of the vendor's repository every time you go through this process. At least you only do this once or twice a year.

Now, if you have to have their source in your source, still do the above, but use the svn:external like you noted in your question. You'll still need to apply any patches you need to make to the vendor's source to your copy of the vendor's repository.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜