How to merge branch back to trunk in SVN with all commit history?

后端 未结 5 580
长情又很酷
长情又很酷 2021-01-30 17:32

How to merge branch back to trunk in SVN with all commit history? I know in Git I can use

merge -squash

Is there any equivalent command in SVN?

5条回答
  •  攒了一身酷
    2021-01-30 18:20

    It sounds like you want to:

    1. Merge from possibly several branches.
    2. Have all the merges properly recorded as such.
    3. Commit as one new revision only.

    I think this is supported by the underlying SVN architecture. But I don't know if there are any clients that provide it (though svnmucc will do it for multiple cp, mv, rm commands). Unless you want to do more research than I have (which would not take much), or write your own client which can drive the SVN libraries to do it (which may be hard but still doable); then I think you will have to sacrifice one of 2. and 3. above.

    (If you sacrifice 3 you could dump the repository immediately after and hack the dump file to use one revision only, but I don't think it's worth the risk just to have a minutely simpler revision history...)

提交回复
热议问题