Grouping committed files together (as a single commit) after you've already committed them to the repository in Svn?

夙愿已清 提交于 2019-12-01 20:19:37

I find the best solution to use a higher level tool to group revisions together and track changes.

We use redmine to document all tasks, and our svn revisions are automatically stamped against that. Working this way, even though a fix may take 7 or 8 commits, you can quickly search your log and roll the fixes for Bug #366 into release as a single unit.

Redmine, trac, fogbugz, bugzilla, tfs, all good.

Once you make a commit, there is intentionally no way to modify it. This way r123 always refers to the same thing. If you could add files to a commit afterwards, then a person who checked-out r123 before the change would have a different view than someone who checked-out r123 after the change, breaking a key goal of any version control system.

This really is no different than the question "what should I do if I commit code that has a syntax error in it and won't build?" The answer is to commit something else that has a fix in it. The two cases create the same problems and have the same solution.

No, for this kind of power you would need a tool like Git.

To follow up on a previous answer.

I use Git SVN almost exclusively at this point for its ability to keep local revisions and then merge them into the SVN tree when i am fully done with the feature. When working with Git SVN, I commit my changes locally and when I am completely done, then sync to SVN.

A workaround: reverse-merge all the revisions in question, commit, apply again the changes from those revisions to your WC, commit all at once.

Disclaimer: I haven't tried it.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!